4 Replies Latest reply on Aug 20, 2008 9:30 AM by Kerdudou Ronan

    is it possible to use rich:panelBar's valueChangeListener to

    wang yufeng Newbie

      Hi, guys, I'd like to make a partial-page rerender with rich:panelBar select a different panelBarItem. But I find rich:panelBar's valueChangeListener doesn't work on this. is it possible to use rich:panelBar's valueChangeListener to monitor panelBarItem selection event on server-side?
      Any suggestions are welcome.


        • 1. Re: is it possible to use rich:panelBar's valueChangeListene
          Ilya Shaikovsky Master


           <rich:panelBar height="400" width="500" valueChangeListener="#{userBean.valueChanged}">
           <a4j:support event="onitemchange"></a4j:support>
           label="Leverage the whole set of JSF benefits while working with AJAX">
           Ajax4jsf is fully integrated into the JSF lifecycle. While other frameworks only
           give you access to the managed bean facility, Ajax4jsf advantages the action and value
           change listeners as well as invokes server-side validators and converters during the
           AJAX request-response cycle.
           label="Add AJAX capability to existing JSF applications">
           The framework is implemented using a component library. The library set Ajax
           functionality into existing pages, so there is no need to write any JavaScript
           code or to replace existing components with new Ajax one. Ajax4jsf enables page-wide
           Ajax support instead of the traditional component-wide support and it gives the
           opportunity to define the event on the page. An event invokes an Ajax request and areas
           of the page which are synchronized with the JSF Component Tree after changing the data
           on the server by Ajax request in accordance with events fired on the client.
           label="Write your own custom rich components with built-in AJAX support">
           Component Development Kit (CDK) is a design-time extension for Ajax4jsf. The CDK includes
           a code-generation facility and a templating facility using a JSP-like syntax. These
           capabilities help to avoid a routine process of a component creation. The component
           factory works like a well-oiled machine allowing the creation of first-class rich
           components with built-in Ajax functionality even more easily than the creation of
           simpler components by means of the traditional coding approach.
           label="Package resources with the application's Java classes ">
           In addition to its core, Ajax functionality of Ajax4jsf provides an advanced
           support for the different resources management: pictures, JavaScript code, and
           CSS stylesheets. The resource framework makes possible to pack easily these
           resources into Jar files along with the code of your custom components.
           <rich:panelBarItem label="Easily generate images on-the-fly">
           Resource framework can generate images on-the-fly so that it becomes possible
           to create images using the familiar approach of the Java graphic2D library.
           label="Create a modern rich user interface look-and-feel with skins-based technology">
           Ajax4jsf provides a skinnability feature that allows easily define and manage
           different color schemes and other parameters of the UI with the help of named
           skin parameters. Hence it is possible to access the skin parameters from JSP
           code and the Java code (e.g. to adjust generated on-the-fly images based on
           the text parts of the UI). Note: skinnability is not an equivalent of traditional
           CSS, but a complement.
           label="Test the components, actions, listeners, and pages as you are creating them">
           An automated testing facility is in our roadmap for the near future. This facility
           will generate test cases for your component as soon as you develop it. The testing
           framework will not just test the components, but also any other server-side or
           client-side functionality including JavaScript code. What is more, it will do all
           of this without deploying the test application into the Servlet container.


          public void valueChanged(ValueChangeEvent event) {

          seems do the work you need.

          • 2. Re: is it possible to use rich:panelBar's valueChangeListene
            Ilya Shaikovsky Master

            just rerender the components you need after some activities in listener.

            • 3. Re: is it possible to use rich:panelBar's valueChangeListene
              wang yufeng Newbie

              Hi, Thanks for your advice, but your method does not work :-(

              • 4. Re: is it possible to use rich:panelBar's valueChangeListene
                Kerdudou Ronan Apprentice

                I successfully used a code
                like the following :

                <rich:panelBarItem name="aPanelBarItem" label="aPanelBarItem" >
                 <a4j:support event="onenter" reRender="aPanelBarItemContent"
                 <h:panelgroup id="aPanelBarItemContent">...