0 Replies Latest reply on May 17, 2012 9:46 AM by bucpatr1

    Using itemCreationPolicy with a custom component

    bucpatr1 Level 2

      I'm working on a project where the users need to be able to have a 'filtered' view of one of the edit dialogs. I'm using view states to control which of the input fields show up for each view. The 'save' logic is the same for both states, so I still need to be able to pull data for the inputs even if they are not currently displayed. I tried setting itemCreationPolicy to immediate with no success. Some of the inputs were getting created but the initial values were not being set. The issue seems to be that the input component (an extended version of DropDownList) defers setting the selected value until the commitProperties() method. Since the inpit isn't actually being shown, the commitProperties() method is never getting called and the value is never being set.


      Can anyone suggest a workaround for this issue? The only thing I can think of would be to use includeInLayout and visible to show/hide the inputs, but that is going to get really messy since I would have to apply it to every input and the FormItem components that enclose them.