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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T20:27:40+00:00 2026-05-14T20:27:40+00:00

I have a IceFaces-form and several input fields. Let’s say I have this: <ice:selectOneMenu

  • 0

I have a IceFaces-form and several input fields.

Let’s say I have this:

<ice:selectOneMenu id="accountMenu"
    value="#{accountController.account.aId}"
    validator="#{accountController.validateAccount}">
    <f:selectItems id="accountItems"
            value="#{accountController.accountItems}" />
</ice:selectOneMenu>

and this:

<ice:selectOneMenu id="costumerMenu"
    value="#{customerController.customer.cId}"
    validator="#{customerController.validateCustomer">
    <f:selectItems id="customerItems"
            value="#{customerController.customerItems}" />
</ice:selectOneMenu>

If I change one value, the respective validator is called, what is fine. But also the other validator is called, which is not fine, because the user get’s an irritating message to insert a value to a field he maybe was just going to pay attention to. It’s like poking the user with a stick to “Hurry up now!”. BAD!

I thought the attribute “partialSubmit” is controlling this behaviour, so only the one DOM-part is submitted, which is affected by the user interaction, but if I declare the both components to be partially submitted, nothing changes. Still both validators are called if one component value is changed.

How can I prevent the whole form from being validated until it is submitted completely?

  • 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-05-14T20:27:41+00:00Added an answer on May 14, 2026 at 8:27 pm

    When a partial submit is executed, the full JSF lifecycle is still executed. Thus, the validation phase is still processed, and all of the components in the component hierarchy are validated.

    There are good reasons for this. A change in one component could cause a (potentially invalid) change in another component. For example, a selection from a selectOneMenu could set a value in a inputText.

    ICEfaces alters processing in one significant way: During a partial submit, ICEfaces temporarily marks all components other than the one that triggered the sumbit as optional (required="false"). Thus, “required” validations are skipped. However, ICEfaces does not disable the other validations.

    There are two possible solutions to this problem:

    1. Set immediate="true" in addition to partialSubmit. This changes the lifecycle slightly for the component when the partial submit is executed to perform the validation in the apply request values phase. This may cause the other validations to be skipped.

    2. Detect if a partial submit occurred in your custom validator. Skip the validation if it isn’t the component that triggered the partial submit. Unfortunately, there isn’t any documentation on how to detect a partial submit, but I found the solution in the source code for the com.icesoft.faces.application.PartialSubmitPhaseListener class.

      It turns out that ICEfaces adds two request parameters when a partial submit is executed:

      • ice.submit.partial – set to “true” to indicate that a partial submit was done.
      • ice.event.captured – contains the component ID of the component that generated the partial submit.

    You can take advantage of these two parameters in your validation methods. Here’s an example:

    public void validateAccount(FacesContext context, 
      UIComponent component, Object value) 
    {
      if(!partiallySubmitted(context) || 
         componentWasPartiallySubmitted(context, component)
        // Perform validation
      }
    
    }
    
    public boolean partiallySubmitted(FacesContext context) {
        ExternalContext externalContext = context.getExternalContext();
        Map parameterMap = externalContext.getRequestParameterMap();   
    
        return "true".equals(parameterMap.get("ice.submit.partial"));
    }
    
    public boolean componentWasPartiallySubmitted(FacesContext context, 
      UIComponent component) {
        ExternalContext externalContext = context.getExternalContext();
        Map parameterMap = externalContext.getRequestParameterMap();   
    
        String componentId = (String) parameterMap.get("ice.event.captured");
    
        return component.getClientId(context).equals(componentId);
    }
    

    Of course, accessing the two request parameters directly is probably unsupported. However, until the ICEfaces team provides a supported way to “detect” a partial submit, it may be your only option.

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

Sidebar

Related Questions

I have an IceFaces form with several HtmlCommandButtons on it. I have some input
Posting this one for a friend. They have an Icefaces app that uses Icefaces's
I have a two simple IceFaces buttons created this way. (I don't use xhtml
I have this piece of code: <ice:panelGroup menuPopup=menuPopup1 onclick=fireContextMenu(this, event);> <img src=/resources/images/external/bg-suppliers.gif> </img> </ice:panelGroup>
If I have a simple button: <ice:panelGroup> <ice:commandButton value=foobar action=#{fileManager.openNoFlashVisiblePopup} /> </ice:panelGroup> Is it
i have a strange problem. I have an ICEFaces(1.8.2) + Facelets application im working
I'm still on the road of learning JSF. I have an IceFaces tree with
I have a small problem with double-click handling with icefaces. There are two methods
I have a JSF 1.2 dataTable using ICEfaces 1.8. In one column, I would
While evaluating ICEfaces I have used Eclipse and its Web Page Editor to visually

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.