Update custom component through Ajax

UI Components for JSF
Post Reply
ikoen
Posts: 10
Joined: 10 Jun 2010, 10:54

10 Jun 2010, 10:59

Hi,

I'm currently creating a custom component which I would like to update after an ajax request. In my case, after a submit, messages could appear to inform the user whether or not the input is correct.

Code: Select all

<h:panelGrid id="grid" style="padding-top:20px" >
 <ctb:myCustomComponent value="#{genericFormController}" showInlineErrorMessages="true">
  <f:facet name="save">
   <p:commandButton value="First Save" ajax="true" action="#{genericFormController.save}" update="grid"></p:commandButton>
  </f:facet>
 </ctb:myCustomComponent >
</h:panelGrid>
<p:commandButton value="Second Save" action="#{genericFormController.save}" update="grid" ajax="true"/>
The message do not appear after invalid input. When I do a complete refresh, the messages do appear.
Am I doiing something wrong?

Thanks in advance,

Koen

mafarah
Posts: 2
Joined: 10 Jun 2010, 19:03

10 Jun 2010, 19:07

Hi Koen,

if the code below is inside a form, try using the following parameter in it:

prependId="false"

that solved my problem which was very similar to yours.

-- Mauricio

ikoen
Posts: 10
Joined: 10 Jun 2010, 10:54

29 Jun 2010, 09:03

Thanks for your reply! Unfortunately it does not solve my problem.

Regards,

Koen Verhulst

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 31 guests