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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:05:09+00:00 2026-05-26T19:05:09+00:00

I am using a <rich:tabpanel> with 3 tabs. In the 2nd tab I have

  • 0

I am using a <rich:tabpanel> with 3 tabs. In the 2nd tab I have 3 <rich:fileUpload> components. All the 3 fields are mandatory. Hence I perform validation in the backing bean on submit of the contents in the page.

If I select a file in one of the file upload components and leave other 2 empty, then I get the validation messages for the 2 empty components as expected. However the first component is also re-rendered and is not retaining the selected file, even though the file contents are still stored in the property of the backing bean.

How can I retain the selected file on re-render?

  • 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-26T19:05:10+00:00Added an answer on May 26, 2026 at 7:05 pm

    Just do not re-render the input fields itself, but only the holder(s) of the validation messages. You can do that with <a4j:commandButton> wherein you specify the IDs of the message component(s) in the reRender attribute (I am assuming that you’re using RichFaces 3.3, not 4.0, as it’s not by default possible to have a single file selection for file upload in the current 4.0).

    Note that you don’t need to validate for requireness in the action method. Just setting required="true" on the input component(s) is sufficient.

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

Sidebar

Related Questions

I have the following code: <rich:tabPanel switchType=client> <rich:tab name=tab1 label=tab1 onclick=alert('Hello');> ... </rich:tab> <rich:tab
HI I would like to create vertical tabs using the rich faces tab controls.
The scenario is like this. I have a rich:tabPanel with about 5 tabs. On
I have tries to upload the file using rich:fileupload componenet.When i tried to upload
I am a newbie for Richfaces components. When I am using the <rich:listShuttle> ,
I have the following scenario (using rich faces): ... <a4j:outputPanel id=foo> <h:commandButton disabled=#{not _user.selected}
I have a Django model with a text field. I'm using a rich text
I am using rich:dataTable with rich:dataTableScroller . And I don't want load all my
I have menu build on Richfaces using rich:menuitem. I need to determine, which menuitem
I have a problem as follows: We're using a rich text editor (TinyMCE, but

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.