update attribute of button component issue

UI Components for JSF
Post Reply
junico
Posts: 15
Joined: 05 Mar 2009, 16:23

05 Mar 2009, 17:25

Hi, I'm playing with the examples...

In the first example of PPR:

<h:form>
[...]
<p:button value="Ajax Submit" update="display" async="true" />
[...]
<h:panelGrid id="display" columns="2">
<h:outputText value="Firstname:" />
<h:outputText value="#{PPRBean.firstname}" />

<h:outputText value="Surname:" />
<h:outputText value="#{PPRBean.surname}" />
</h:panelGrid>
</h:form>

it doesn't update the fields,

but putting one id in the form tag:

<h:form id="mainform">

and calling

<p:button value="Ajax Submit" update="mainform:display" async="true" />

works fine.

I don't if this is a issue or not, but anyway...
Mojarra 2.1.1
Primefaces 3M2-SNAPSHOT
Jboss 6

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

06 Mar 2009, 15:52

Junico, PrimeFaces PPR uses client ids, not server ids. This choice is done to be compatible with JSF 2.0 and speed up partial page rendering. So if you use;

Code: Select all

<h:form prependId="false">
...
It'll work.

junico
Posts: 15
Joined: 05 Mar 2009, 16:23

06 Mar 2009, 18:06

hi, You are right cagatay.
Thanks :D
Mojarra 2.1.1
Primefaces 3M2-SNAPSHOT
Jboss 6

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 50 guests