Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
Infragitics Ajax call
posted

Hi,

 I am trying to update the value for <h:inputhidden> component from <ig:dropdown> 's value change listern. I have also defined the smartRefreshIds. My code goes fine but i m not able to update the value for hidden component.

 I am using 2007 version 2.

 Can anyone please help me for that

  • 1579
    posted

    Hello, aweeks!

    You should bind an instance in your Backing Bean with your <h:inputHidden> component on your JSF page, e.g.

    private UIOutput input = null;

    and accordingly

    <h:inputHidden id="displaySelectionInputField" binding="#{backing_bean.input}"></h:inputHidden>

    Then you should update the value of input in your valueChangeListener, e.g.

    public void onChangeValue(ValueChangeEvent event){

    ...

    input.setValue(country.getValue());

    ...

    }

    where country is the instance, that is binded to your dropDownList component:

    <ig:dropDownList dataSource="#{backing_bean.countryList}"

    binding="#{backing_bean.country}"

    valueChangeListener="#{backing_bean.onChangeValue}"

    smartRefreshIds="displaySelectionInputField">

    </ig:dropDownList>

    I made it this way and it worked. Hope, I have helped you a little.

    Regards,

    --Bozhidar