Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

H:commandButton onClick issue

Sumeet Singh Aryan
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

In my page i have one rich:dataTable (say DT1) which includes multiple records and one colum have command button (Say BTN1), on click of BTN1 one modal panel opens. Modal panel (Say MP1) include one textarea and one commandbutton (say BTN2), textarea in this modal panel can't be blank so i provided the required=true validations. on BTN2 click the DT1 must be reRendered and the MP1 must be hide. so i provided the oncomplete code of BTN2 in the action method of bean class so that the modal panel will only hide when the action method call.

NOTE: in case of validation failure on textArea, the action method will not execute

The whole scenario is working fine for the first case but when the DT1 rerendered properly and if i again hit on BTN1, the MP1 will appear but if the textArea is blank then the modal panel hide. (I don't want this scenario)....

Please help
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic