rich:popupPanel (buttons, ajax and other problems) - RF4 final
kanal Jun 27, 2011 12:46 PMHi,
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"> someTitle </f:facet> <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" /> </h:selectOneMenu> </h:panelGrid> <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" /> </h:commandButton> </div> </rich:popupPanel>
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?