Note that there are some explanatory texts on larger screens.

plurals
  1. POAjax Call method more than Once in jsf
    primarykey
    data
    text
    <p>I have a Composit Component that use Ajax on <code>&lt;p:selectOneButton/&gt;</code>, when Ajax call the <code>actionListener</code> on <code>&lt;p:commandButton/&gt;</code> it calls 10 times then run the method. I think the problem cause by <code>&lt;p:dataGrid/&gt;</code> because when i put my <code>&lt;p:commandButtton/&gt;</code> out of <code>&lt;p:dataGrid/&gt;</code> access , it works normally but when i used it in <code>&lt;p:dataGrid/&gt;</code> The Ajax call <code>actionListener</code> more than once.</p> <p>Here is the .xhtml:</p> <pre><code>&lt;table style="width: 100%"&gt; &lt;tr&gt; &lt;td&gt;&lt;p:selectOneButton value="#{inviteRequestManagedBean.filterType}"&gt; &lt;f:selectItem itemLabel="#{inviteRequest_msg.request}" itemValue="request" /&gt; &lt;f:selectItem itemLabel="#{inviteRequest_msg.archive}" itemValue="archive" /&gt; &lt;f:ajax event="change" render="requestDataGrid" /&gt; &lt;/p:selectOneButton&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;p:dataGrid id="requestDataGrid" var="tBusinessPartnerRequestInfo" value="#{inviteRequestManagedBean.filterBusinessRequest()}" columns="1" rows="2"&gt; &lt;p:column&gt; &lt;div&gt; &lt;table border="0" width="100%"&gt; &lt;tr&gt; &lt;td&gt;&lt;p:graphicImage value="#{tBusinessPartnerRequestInfo.partySender_imageUrl}" /&gt;&lt;/td&gt; &lt;td&gt; &lt;div&gt; &lt;table border="0" width="100%"&gt; &lt;tr&gt; &lt;td&gt;&lt;h:outputLabel value="#{tBusinessPartnerRequestInfo.requestDate}" /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;h:outputLabel value="#{tBusinessPartnerReques`enter code here`tInfo.partySender_fullName}" /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;/td&gt; &lt;td&gt;&lt;p:commandButton id="acceptCommonButton" value="#{inviteRequest_msg.accept}" process="@this" actionListener="#{inviteRequestManagedBean.acceptRequest(tBusinessPartnerRequestInfo.id)}"&gt; &lt;/p:commandButton&gt;&lt;/td&gt; &lt;td&gt;&lt;p:commandButton id="noNowCommonButton" value="#{inviteRequest_msg.notnow}" actionListener="#{inviteRequestManagedBean.notNowRequest(tBusinessPartnerRequestInfo.id)}"&gt; &lt;/p:commandButton&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;hr /&gt; &lt;/p:column&gt; &lt;/p:dataGrid&gt; &lt;p:panel&gt; &lt;/p:panel&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; </code></pre> <p>How can i fix this problem?</p> <p>Thanks.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload