3 Replies Latest reply on Oct 20, 2008 5:45 AM by Martin Höller

    <a4j:support action=

    Martin Höller Newbie


      This is a repost as the Ajax4JFS Users Forum is now closed.

      What I want to achieve is to update input elements in a form by selecting an item from a select input. This should act like a template mechanism: select a template => form inputs are filled in with predefined values.

      My idea was to define some select input like <rich:inplaceSelect> with an <a4j:support> component like this:

      <rich:inplaceSelect defaultLabel="Load from template" value="#{mybean.fmtString}">
       <f:selectItem itemValue="###0" itemLabel="1234"/>
       <f:selectItem itemValue="###0,00" itemLabel="1234,56"/>
       <f:selectItem itemValue="#.##0" itemLabel="1.234"/>
       <f:selectItem itemValue="#.##0,00" itemLabel="1.234,56"/>
       <a4j:support event="onchange"
       reRender="someComponents" />

      My problem is, whenever mybean.updateFormat() is called the inplaceSelect's value has not been updated. The update seems to happen after the call of updateFormat().

      Does anybody know how I could get the new selected value to my updateFormat() method?

      Many thanks in advance,
      - martin