Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JSF and the fly likes Handling valueChangeListeners on multiple controls on a JSF Page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSF
Bookmark "Handling valueChangeListeners on multiple controls on a JSF Page" Watch "Handling valueChangeListeners on multiple controls on a JSF Page" New topic
Author

Handling valueChangeListeners on multiple controls on a JSF Page

surbhi goyal
Greenhorn

Joined: Jul 17, 2006
Posts: 1
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
 
Have you checked out Aspose?
 
subject: Handling valueChangeListeners on multiple controls on a JSF Page
 
jQuery in Action, 3rd edition