Hi All, I'm using a p:commandButton for File Export with ajax set to false.
I have a requirement to perform a server-side validation before generating the File.
Since this is a non-ajax button, if don't write the file data to the Response Stream upon validation Failure the page is getting completely refreshed.
I wanted to update the Ajax Requests in CommandButtonRenderer to follow the below logic:
i. onclick --> call a server side action method[use a new argument validate] and process all other ajax requests in Queue(i.e., process a change/select event from a p:calendar)
ii. if (args.validationFailed==false) then execute the non-ajax Request for FileDownload.
please suggest if this is a valid approach or if there is any other simpler way to solve the requirement.
adding a Validation Phase for non Ajax CommandButton
-
- Information
-
Who is online
Users browsing this forum: No registered users and 31 guests