5 Replies Latest reply on Sep 21, 2009 7:37 AM by argonist

    selectitem + rich:componentcontrol

    argonist

      Hi,

      Is is possible to work together between f:selectitem and rich:componentcontrol? If yes, then how?

      If an item in the list is selected, then will the popup windows using rich:modalPanel and rich:componentcontrol appear.

      Manu

        • 1. Re: selectitem + rich:componentcontrol
          nbelaevski

          Hi Manu,

          You can use rich:componentControl together with the component holding f:selectItem, e.g. h:selectOneMenu or h:selectOneListBox, but not with h:selectItem itself, because it doesn't have HTML event attributes.

          • 2. Re: selectitem + rich:componentcontrol
            argonist

            Hi nbelaevski,

            sorry, i am now here.

            <h:selectOneMenu value="#{categoryHandler.selectedAreas}">
             <f:selectItems value="#{categoryHandler.showAreasList}" />
            <f:selectItem itemLabel="Neue individuelle Dolmetscherliste" itemValue="new" />
            <rich:componentControl for="applicantsPanel" attachTo="newList" operation="show" event="onchange" />
            </h:selectOneMenu>
            


            • 3. Re: selectitem + rich:componentcontrol
              argonist

              again.....


              <h:selectOneMenu value="#{categoryHandler.selectedAreas}">
               <f:selectItems value="#{categoryHandler.showAreasList}" />
              <f:selectItem id="newList" itemLabel="Neue individuelle Dolmetscherliste" itemValue="new" />
              <rich:componentControl for="applicantsPanel" attachTo="newList" operation="show" event="onchange" />
              </h:selectOneMenu>
              


              There are many selectitems, but at only one selectitem (id="newList") should the event be fired to appear the popup windows. But how??

              Manu

              • 4. Re: selectitem + rich:componentcontrol
                ilya_shaikovsky

                You should attach component control to menu and not to select as Nick already said. And then add condition to modal panel onshow in order to check if the option is the one which needed.

                • 5. Re: selectitem + rich:componentcontrol
                  argonist

                  Thank you. It's solved.