File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Handling valueChangeListeners on multiple controls on a JSF Page
 
Similar Threads
t:graphicImage not being displayed in browser
Problem with JSF
how to get javascript value into bean
SessionAffinityManager setCookie SESN0066E: The response is already committed to the client.
menupopup ActionEvent problem