• Post Reply Bookmark Topic Watch Topic
  • New Topic

<p:commandButton> inside <ui:repeat> is not working  RSS feed

 
Farhad Rahmati
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello guys,

I have a silly problem, I have used a prime faces command button inside a <ui: repeat>, when you click on the button, the page get refreshed, I want the button to redirect to another page.

I appreciate if anyone can help me.

Thanks
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This can happen anywhere with any commandButton, not just PrimeFaces.

If you don't have a valid navigation destination specified, JSF will select the default destination, which is to redisplay the current view.

Also, if you have one or more invalid input control values on the form being submitted, JSF will short-circuit the value-update and action processing phases of its lifecycle and redisplay the current view. Normally you'd have placed some sort of error message display tags on the view definition to display what the problem is.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!