I have the following code.
<h:panelGroup id="adjudicateRefund">
<h:selectOneMenu id="refundRequestedBy" value="#{refundBean.selectedRefund.requestedLpUser}" converter="#{lpUserEntityConverter}">
<f:selectItem itemLabel="Select"/>
<f:selectItems value="#{refundBean.institutionUserList}" var="user" itemLabel="#{user.fullName}" itemValue="#{user}"/>
</h:selectOneMenu>
<p:calendar readOnlyInputText="true" value="#{refundBean.selectedRefund.refundDate}" onSelectUpdate="adjudicateRefund" selectListener="#{refundBean.refundDate_Select}" required="false" requiredMessage="Refund Date is required."/>
</h:panelGroup>
If I first select something from the dropdown menu, and then select something via the calendar, my dropdown value is lost or never set. Is there a way to make the calendar ajax similar to others using <p:ajax> so when an event happens to the calendar everything inside of my "adjudicateRefund" is updated?
p:calendar doesn't update other controls
Maybe you have to add a <h:form id="form"> to wrap your panelGroup and then set the onSelectUpdate of the calendar to "form:adjudicateRefund". This resolved some of my issues with components not updating.
Hope this helps, didn't test it myself though
Hope this helps, didn't test it myself though
I use the PrimeFaces 2.2RC but I have the same issue. I tried without listener to update the component inside a form as desribed above but id doesn't solved my problem. I wonder why doesn't work it but I suspect the problem is somewhere around the component id generation.
The same scenarios is worked for me if I tried on p:panel update with a p:commandLink.
Any idea?
[Update]
Thank you the fast repsond.
The same scenarios is worked for me if I tried on p:panel update with a p:commandLink.
Any idea?
[Update]
Thank you the fast repsond.
Last edited by lapras on 25 Jan 2011, 13:21, edited 1 time in total.
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
This is expected because calendar select only processes itself and ignores other components. I think we need to add onSelectProcess attribute to make this flexible, I've seen a similar case in another post.
See http://code.google.com/p/primefaces/iss ... il?id=1668
I'll add this now.
See http://code.google.com/p/primefaces/iss ... il?id=1668
I'll add this now.
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Done;
http://code.google.com/p/primefaces/iss ... il?id=1668
Now this should work;
http://code.google.com/p/primefaces/iss ... il?id=1668
Now this should work;
Code: Select all
<h:panelGroup id="adjudicateRefund">
<h:selectOneMenu id="refundRequestedBy" value="#{refundBean.selectedRefund.requestedLpUser}" converter="#{lpUserEntityConverter}">
<f:selectItem itemLabel="Select"/>
<f:selectItems value="#{refundBean.institutionUserList}" var="user" itemLabel="#{user.fullName}" itemValue="#{user}"/>
</h:selectOneMenu>
<p:calendar readOnlyInputText="true" value="#{refundBean.selectedRefund.refundDate}" onSelectUpdate="adjudicateRefund" onSelectProcess="@this adjudicateRefund"
selectListener="#{refundBean.refundDate_Select}" required="false" requiredMessage="Refund Date is required."/>
-
- Information
-
Who is online
Users browsing this forum: No registered users and 49 guests