• Post Reply Bookmark Topic Watch Topic
  • New Topic

Ajax event works at the second click but not at the first click  RSS feed

 
Joey Sanchez
Ranch Hand
Posts: 92
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Environment:
- Java 8
- Wildfly 10
- Primefaces 6
- JSF 2.2

I am trying to call a dialog to send a form inside it, but before I need to collect some data and pass from the button btn1.

The problem is that this code does not work at the first click (comandButton type="button"), but it properly works at the second click.

Test.xhtml


TestBean.java

 
Tim Holloway
Bartender
Posts: 18554
61
Android Eclipse IDE Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try moving the dialog to a separate h:form. The form containing the dialog should precede the form that invokes the dialog. Note that forms cannot be nested, so it must completely precede the invoking form.
 
Joey Sanchez
Ranch Hand
Posts: 92
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had thought that that was done for appendTo="@(body)" in the dialog, but it probably don't do because it worked!
Thanks
 
Joey Sanchez
Ranch Hand
Posts: 92
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It can be possible but now it does not work the second click!!!
 
Joey Sanchez
Ranch Hand
Posts: 92
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joey Sanchez wrote:It can't be possible but now it does not work the second click!!!
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!