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 9171437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:09:46+00:00 2026-06-17T16:09:46+00:00

Recently I have update my application to JSF 2.1.7 and PrimeFaces 3.4.2. When the

  • 0

Recently I have update my application to JSF 2.1.7 and PrimeFaces 3.4.2. When the below dialog is used for adding a new group, I get an “Name size must be between 1 and 40” validation error, prior to saving the new group. It happens when I click the picker’s add button. I understand that this message is shown because the validation failed. The validation error doesn’t appear when I add immediate=true to p:commandButton. I don’t know what triggered the validation.

<h:form id="formg" prependId="false">
    <!-- messages -->
    <p:growl id="msgsg" showDetail="true" />

    <!-- data table -->
    <ui:include src="/WEB-INF/flows/groupsTable.xhtml" />

    <p:separator />

    <!-- bottom tool bar -->
    <ui:include src="/WEB-INF/flows/groupsToolBar.xhtml" />

    <!-- preview, edit dialog -->
    <ui:include src="/WEB-INF/flows/groupsDialog.xhtml" />
</h:form>

<p:dialog id="dialogg" header="#{groupsBean.dialogTitle}"
    widgetVar="groupsDialog" dynamic="true" resizable="false" width="800"
height="600" showEffect="fade" hideEffect="fade" modal="true">
    <p:ajax event="close" listener="#{groupsBean.refresh}"
        immediate="true" update=":formg" global="false" process="@this" />

    <p:tabView id="tabPicker">
        <p:tab title="General">
            <h:panelGrid id="displayg" columns="2">
                <h:outputText value="#Group name*:" />
                <p:inputText value="#{groupsBean.selectedGroup.name}" size="40"
                    readonly="#{!groupsBean.updatable}" maxlength="40" />
            </h:panelGrid>
        </p:tab>
        <p:tab title="Members">
            <ui:include src="/WEB-INF/custom/picker.xhtml">
                ... some params passed to picker
            </ui:include>
        </p:tab>
    </p:tabView>
</p:dialog>

The picker is similar to <p:password> and it is made up from two p:dataTable components and 4 buttons between them. The buttons are grouped together with a h:panelGrid. The button attributes are similar. Here is button sample code:

<p:outputPanel autoUpdate="true">
    <p:commandButton actionListener="#{eval.evaluateAsMethod(pickerAdd)}"
    update="source, target, #{messages}" immediate="true"
    disabled="#{pickerSourceDisabled}"
    icon="ui-icon ui-icon-arrowthick-1-s" />
</p:outputPanel>

source, target are the ids of the two datatables. pickerAdd is passed as param with a value of groupsBean.picker.add. The tables contain FooDomain objects.

public class FooDomain implements Serializable {
    ...
    @NotNull  
    @Size(min = 1, max = 40)
    @Column(name = "NAME")
    private String name;
    ...
}
  • 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-17T16:09:47+00:00Added an answer on June 17, 2026 at 4:09 pm

    The PrimeFaces <p:commandButton> processes by default the entire form (as in, process="@form"), so it would by default trigger all validations. Your validation error is coming from the @Size restriction on the property. If you would like to process only the button’s own action, then you should add process="@this".

    <p:commandButton ... process="@this" />
    

    The immediate="true" can also be used to solve it, but it behaves under the covers somewhat different: the entire form is still processed, but the action is invoked in APPLY_REQUEST_VALUES phase instead of INVOKE_ACTION phase. And only the input components which also have immediate="true" set will also be processed and others will be skipped.

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

Sidebar

Related Questions

Recently I have updated my iOS application by introducing Spanish and German translations. After
Recently I have developed a web application with codeigniter. I am facing a session
We have recently released version 1.0.0 of our application and have sent out numerous
We have recently moved to a new web server (from IIS6 to IIS7.5) and
Update : I have tried using fuslogvw.exe to get logs. But what exactly am
Recently I have been tasked with creating an application for a business that basically
I have a java application which is used many computers in my office network.
An old web application I recently have to work with is having an issue.
I have recently started working for a new company and am now working on
I just recently update my Rails application to use Authlogic. The authentication works fine

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.