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

  • Home
  • SEARCH
  • 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 8342057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T05:39:41+00:00 2026-06-09T05:39:41+00:00

I have page in which I edit some entity. That page has two command

  • 0

I have page in which I edit some entity. That page has two command buttons. One is “Back” and one is “Save” and also on that page I have form with input fields (idInputSubject). Some of them are required, some are not.

How can I ensure that we I press “Back” button (cancel editing and go back) validation will be ignored, which is not the case now. Now, when I press either “Back” or “Save” button validation’s messages appear if I did’t fill required filed with the correct values (idInputSubject).

Both “Back” and “Save” buttons are in the same form:

<h:form id="idFormMeasureDetail" styleClass="bodyForm" prependId="false">
   ...
   <p:commandButton value="#{contentMB.msg.label_back.value}"
        action="#{chooseMeasureControllerMB.aSearch}"
        rendered="#{detailMeasureMB.navigation eq 0}" ajax="false"
        icon="ui-icon-arrowreturnthick-1-w"/>
   <p:commandButton value="#{contentMB.msg.button_save.value}" ajax="false" 
        icon="ui-icon-disk" actionListener="#{detailMeasureControllerMB.alApplyChanges}" 
                    title="#{contentMB.msg.tip_Apply.value}" />

   ...
   <p:inputTextarea id="idInputSubject" value="#{detailMeasureMB.measure.aufgabe}"
    readonly="#{!userSessionMB.supervisor and !detailMeasureMB.isCreator}"
    required="#{globalSessionMB.globalWebOptionsMap['MMRequiredSubject'].propvalue}"
            title="#{contentMB.msg.tip_Betreff.value}"
            autoResize="false" style="width:100%;" >
   </p:inputTextarea>
   <p:message id="inputSubjectMsg" for="idInputSubject" display="icon" />
   ...

</h:form>

ChooseMeasureControllerMB:

@ManagedBean(name = "chooseMeasureControllerMB")
@RequestScoped
public class ChooseMeasureControllerMB extends BaseMeasureControllerMB {
...
public String aSearch() {
            ...
    // navigate to target-page
    return "/pages/mm/showMeasuresList.xhtml?faces-redirect=true";
}
...
}
  • 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-09T05:39:43+00:00Added an answer on June 9, 2026 at 5:39 am

    If you want prevent/skip validation on certain button click use

    immediate="true" on that specific button

    For a good explanation about the immediate="true" read the following BalusC answer

    And here a nice diagram that shows how imemdiate=”true works”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay, so I have this page, which has one Ajax:AsyncFileUploader also some other ajax
I have one Page which is displaying details of some Client. I am using
I have a UIWebView which loads an HTML page which has some links to
Let's assume I have a web page which has some onmouseover javascript behaviour to
In my ASP.NET MVC app, I have a fairly complex edit page which combines
In my application I have an edit profile page which you can see below;
I have developed a small administration page for game servers which you can add/remove/edit
I have folders and pages /admin/add/index.php, /admin/edit/index.php & /admin/view/index.php which all are requiring page
I have a page which loads and then I do some JQuery upon it.
I have this page which has three peson searchs on them. Basically it's a

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.