I have a JSF page that contains a form with several elements, that correspond to different configurable attributes that the user can select, say
<h:form>
<h:selectManyCheckbox value="#{bean.p}">
<f:selectItem itemLabel="p1" itemValue="1" />
<f:selectItem itemLabel="p2" itemValue="2" />
<f:ajax render="panel1" />
</h:selectManyCheckbox>
<h:selectManyCheckbox value="#{bean.t}">
<f:selectItem itemLabel="t1" itemValue="1" />
<f:selectItem itemLabel="t2" itemValue="2" />
<f:ajax render="panel1" />
</h:selectManyCheckbox>
<h:panelGroup id="panel1">....</h:panelGroup>
</h:form>
My problem is that the moment the user selects a value for p, I lose the values stored for t in the bean and so the other way around.
I need this information to create a query that returns the results I display in panel1
, but at the moment I can only base this query on one parameter or the other.
Any help much appreciated