Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8734517
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:51:19+00:00 2026-06-13T09:51:19+00:00

I have a code as follows: <p:commandButton value=#{actualProductionEntry.val} onclick=confirmation.show()/> <p:confirmDialog id=confirmDialog message=Are you sure?

  • 0

I have a code as follows:

 <p:commandButton value="#{actualProductionEntry.val}" onclick="confirmation.show()"/>
 <p:confirmDialog id="confirmDialog" message="Are you sure?" header="Confirm Submission"                                 severity="alert" widgetVar="confirmation">         
     <p:commandButton id="confirm" value="Yes" oncomplete="confirmation.hide()" action="#   {actualProductionEntry.insert(login.userid,login.uid,login.dname,login.rptid)}"   update=":df:data :f1:p2 :dp:app"/>  
     <p:commandButton id="decline" value="No" onclick="confirmation.hide()" type="button" />                 
 </p:confirmDialog> 

Now, how can I do validation before confirmation without effecting my bean?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T09:51:20+00:00Added an answer on June 13, 2026 at 9:51 am

    PrimeFaces returns an args.validationFailed in the ajax response. You could check for that in the oncomplete attribute. Replace your onclick by

    <p:commandButton ... oncomplete="if (!args.validationFailed) confirmation.show()" />
    

    Alternatively, you could let the <p:commandButton> update the <p:confirmDialog> component and check in its visible attribute if according the FacesContext there’s a postback and validation has not failed:

    <p:commandButton ... update="confirmDialog" />
    <p:confirmDialog ... visible="#{facesContext.postback and not facesContext.validationFailed}" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have code as follows: $(#item_select).change(function() { var params = $(#item_select option:selected).val(); $.post('/account/ar_form.php', {idata:
I have some code as follows: <f:loadBundle basename=messages.application var=prop /> <ui:param name=currentUserAttr value=#{prop['currentUser']} />
I have a code as follows, it uses remove on a iterator as show:
Currently, I have some code as follows template<typename Type> Type* getValue(std::string name, bool tryUseGetter
I have code to run sql query in ruby as follows sql = ActiveRecord::Base.connection()
Suppose i have the code snippet as follows : ( clarification purpose/not well formed
I have php code that puts some values into an Array as follows: $hunter=addslashes($MessageArray[1]);
I have a piece of javascript code as follows: var data = { ...
I have 3 different jquery uses & put it into one code as follows:
I have menu bar and code is as follows <div style=background:#000; height: 25px;> <div

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.