1 Reply Latest reply on Feb 28, 2006 4:02 PM by Jakub Walkowicz

    JSF: Problem with method binding.

    Jakub Walkowicz Newbie

      I've got a page binded to two beans: managerBean and imageViewer bean.

      managerBean is assosiated with two drop down boxes (SelectOneMenu). Each of them has a value change listener registered to update imageViewer bean and "submit()" jstl attached to onChange event:

      <h:form>
       <h:panelGrid columns="2" styleClass="menuPanelGrid">
       <h:panelGroup>
       <h:panelGrid columns="2">
       <h:selectOneMenu id="userSelect" value="#{manager.user}"
       title="Owner: "
       valueChangeListener="#{manager.userChanged}"
       onchange="submit();"
       styleClass="menuListMenu">
       <f:selectItems value="#{manager.users}"/>
       </h:selectOneMenu>
      
       <h:selectOneMenu id="gallerySelect" value="#{manager.gallery}"
       title="Gallery owner: "
       onchange="submit();"
       valueChangeListener="#{manager.galleryChanged}">
       <f:selectItems value="#{manager.galleries}"/>
       </h:selectOneMenu>
       </h:panelGrid>
       </h:panelGroup>
       </h:panelGrid>
      </h:form>
      
      


      The imageViewer is associated with an view.jsp:
      <h:form>
      <h:panelGrid binding="#{imageView.imageTiles}" />
      </h:form>


      The problem is that the getImageTiles from imageViewBean is called only once, when the page is loaded. When I am chanign the values in dropdown boxes, the returned HtmlPanelGrid is always the same (no updated is taken from getImageTiles method)

      Thanks for a any help