p:commandLink update and Multiple Forms

UI Components for JSF
Post Reply
helloprimefaces
Posts: 56
Joined: 28 Sep 2009, 17:44

12 Feb 2010, 22:22

Hi,
Problem Description:
When a page has multiple forms, then p:commandLink component (may be other components too) doesn't work as expected. Its not calling the bean's action method or either updating/rerendering the component. I tried several times and found this problem after many hours, why p:commandLink gone crazy.

Code:

Code: Select all

<h:form prependId="false" id="Form1">
   <p:commandLink update="ShowDialogPanel"  oncomplete="extraContentDialog.show();"  action="#{extraBean.navigationExtraAction}" value="Ansprechpartner" >
		 <f:setPropertyActionListener value="4" target="#{extraBean.selectedType}" />
  </p:commandLink>

   <p:dialog id="MainDialog" header="Dialog" visible="false" 	widgetVar="extraContentDialog" modal="true" fixedCenter="true">
	<h:outputText value="#{extraBean.updatedContent}" />	 		 
   </p:dialog>
</h:form>

<h:form prependId="false" id="Form2">
    // whatever stuff
</h:form>
<h:form prependId="false" id="Form3">
    // whatever stuff
</h:form>
Please try it on your side and let us know the result.

Thanks in advance.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

13 Feb 2010, 20:01

Can't replicate this, tried the following segment and see the PRIMEFACES uppercase text in display outputText.

Code: Select all

<h:form id="Form1">
    <p:commandLink value="Submit" update="display" action="#{pprBean.toUpperCase}">
        <f:setPropertyActionListener value="PrimeFaces" target="#{pprBean.firstname}" />
    </p:commandLink>

    <h:outputText value="#{pprBean.firstname}" id="display" />
							
</h:form>
						
<h:form id="Form2">
    Form2
</h:form>
						
<h:form id="Form3">
    Form3
</h:form>
Tried with latest PrimeFaces-1.0.0-SNAPSHOT on Mojarra 1.2_12.

By the way having multiple forms with prependId="false" is not a good for practice.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 29 guests