2 Replies Latest reply on Mar 30, 2012 1:43 PM by Tanya Ruttenberg

    rich:popupPanel (buttons, ajax and other problems) - RF4 final

    Paul Ł. Newbie


      does anyone know something about those bugs? Or maybe there are some workarounds for them.

      Here are the problems:



      <rich:popupPanel id="popupId" modal="true" onmaskclick="#{rich:component('popupEditEmployeeId')}.hide()" height="300" minWidth="340">
           <f:facet name="header">
           <h:panelGrid columns="2">
                <h:outputText value="someLabel" />
                <h:selectOneMenu value="#{projectMB.placeholder.userId}">
                    <f:selectItems itemValue="#{user.userId}" value="#{projectMB.availableUsers}" var="user" itemLabel="#{user.userName}" />
                    <f:selectItem itemValue="123" itemLabel="123" />
                    <f:selectItem itemValue="133" itemLabel="133" />
                    <f:selectItem itemValue="143" itemLabel="143" />
                    <f:ajax listener="#{projectMB.ajaxDummyListener}" execute="@this" render="popupId" />
           <div style="margin-top: 10px;">
               <h:commandButton action="#{projectMB.updatepdate}" value="updateButton" />
               <h:commandLink action="#{projectMB.update}" value="updateLink" />
               <h:commandButton value="hideButton">
                   <rich:componentControl target="popupEditEmployeeId" operation="hide" />


      Here is the listener method for f:ajax tag:


      public void ajaxDummyListener(AjaxBehaviorEvent event) throws AbortProcessingException {
      UIInput input = (UIInput) event.getComponent();
      System.out.println( "UIInput value: " + ((Integer) input.getValue()) );  //in popup always value = 0
      System.out.println("userCompetenceID = " + placeholder.getUserId);   //in popup always value = 0


      System.out.println("ajaxDummyListener executed...");



      (i have no idea why this java code is pasted into table, i event put it into notepad first and then here but the final effect was the same)


      1. In popup commandButtons' actions are not executed (there is no reaction when clicing on them).

      2. Only the 'hide' button works which has rich:componentControl inside.

      3. commandLinks work as they should


      And the most important bug:

      4. selectOneMenu does not work as it should

      It has f:ajax inside and when i change value on the list, ajaxDummyListener is executed BUT there is always value '0' passed, no matter what i choose on the list. I even added threre selectItem tags just to be sure, and after selecting one of them, also '0' zero is passed.


      I tried retriving value from my 'placeholder' object but also tried getting it from 'event' which is my listener method argument.

      I copied that selecOneMenu code and put it outside the rich:popupPanel tag, and it warked good. ItemValues were passed as they should.


      5. After using selectOneMenu (i mean after choosing some option) my 'hide' button stop working. Even clicking outside to panel (on the mask) does not work. It can't be hidded. I suppose it's f:ajax tag fault?


      Any ideas?

        • 1. Re: rich:popupPanel (buttons, ajax and other problems) - RF4 final
          Paul Ł. Newbie

          Should I create bug on Jira for <rich:popupPanel>?


          I've noticed now that even when I don't use ajax, values are not passed to my bean. And it does not matter if I use selectBooleanCheckbox, inputText, selectOneMenu or any other input components.


          I've tried also the latest snapshot - the problem still remains.

          • 2. Re: rich:popupPanel (buttons, ajax and other problems) - RF4 final
            Tanya Ruttenberg Expert

            I'm having this problem too. I did open a JIRA, but have heard nothing. 


            There is this  https://issues.jboss.org/browse/RF-9529 but putting the form within my popupPanel did not help.


            I tried out the examples on this JIRA and they worked, but I don't really understand what they are doing.

            I want to put a button on there that fires an action and then uses the inputted data.


            <rich:popupPanel id="editPanel">
                <a4j:commandButton value="Cancel"
                  onclick="#{rich:component('editPanel')}.hide()" />

                <h:panelGrid columns="2" id="pg2">
                  <h:outputText value="Name: " />
                  <h:inputText value="#{contactView.editedAlternate.name}" >
                  <h:commandButton action="#{contactView.save()}" >
                   <a4j:ajax event="click" render="editPanel" />



            or something. This is just one incarnation of what I've been doing. Nothing has worked.

            And I'm on 4.2.0.Final btw.