Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Handling valueChangeListeners on multiple controls on a JSF Page

 
surbhi goyal
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On my first implementation of the jsf I created an Iceface the following tree:

<ice:tree id="tree" width="100%" value="#{scale.treeModel}" var="item"
hideRootNode="true" hideNavigation="false"
imageDir="./xmlhttp/css/xp/css-images/">
<ice:treeNode>

<f:facet name="icon">
<ice:panelGroup style="display: inline">
<h:graphicImage value="#{item.userObject.icon}"/>
</ice:panelGroup>
</f:facet>
<f:facet name="content">
<ice:panelGroup style="display: inline">
<h:commandLink value="#{item.userObject.text}" immediate="true" actionListener="#{item.userObject.nodeSelected}"/>


</ice:panelGroup>

</f:facet>
</ice:treeNode>
</ice:tree>

on click of its node the actionListener is working perfectly fine and populates my following listBox

<ice:selectOneListbox style="width:230" immediate="true" partialSubmit="true" value="#{scale.selectedScaleName}" onchange="this.form.submit();" valueChangeListener="#{scale.selectOneScale}">
<f:selectItems value="#{scale.scalelist}"/>
</ice:selectOneListbox>
but i want now to do something on the selection of any item from listbox, where I fail. Because if I implement the valueChangeListner as an attribute of the ice:selectOneListBox tag then it doesn't get triggered and if I implement the same using a separate class, then the valuechangelistner class's method gets trigger on the selection of tree node instead of selection of any item of listbox.

please give me the solution asap
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic