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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T12:29:55+00:00 2026-05-31T12:29:55+00:00

I need to do some basic validation on a form. The form data is

  • 0

I need to do some basic validation on a form. The form data is broken up among 5 tabs, and the user should be able to submit the form from any tab. So far so good. If the user hasn’t filled in a field, or has entered invalid data I want to stay on the current tab, display an error message and cancel the tab switch.

I have tried the various events that I can find. Does anybody have any idea if this is possible and how I might achieve it? I would prefer to keep it on the client side in javascript if possible.

Using a code sample such as below.

<rich:tabPanel selectedTab="Info" switchType="client" contentClass="hz-record-tabpanel" ontabchange="doTabChange();"  onbeforeitemchange="doTabChange();" onbeforetabchange="doTabChange();">
                <rich:tab name="Info" label="Tab Label" onlabelclick="doTabChange();">
                    <ui:include src="info.xhtml" />
                </rich:tab>
                <rich:tab name="Officers" label="Officers" onlabelclick="doTabChange();" ontableave="doTabChange();">
                    <ui:include src="officers.xhtml" />
                </rich:tab>
                <rich:tab name="CardServices" label="Card Services" onlabelclick="doTabChange();">
                    <ui:include src="cardservices.xhtml" />
                </rich:tab> 
                <rich:tab name="M2MLimits" label="M2M Limits" onlabelclick="doTabChange();">
                    <ui:include src="m2mlimits.xhtml" />
                </rich:tab> 
                <rich:tab name="AccountServices" label="Account Services" onlabelclick="doTabChange();">
                    <ui:include src="accountservices.xhtml" />
                </rich:tab>                 
            </rich:tabPanel>

Any Ideas?

  • 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-31T12:29:56+00:00Added an answer on May 31, 2026 at 12:29 pm

    We eventually moved to Richfaces 4 (4.2) and I am successfully using itemchange and beforeitemchange

    events.

    These events fire twice (haven’t figured that one out yet) so you don’t want anything too intensive in the handler code.

    If beforeitemchange returns false (twice) then the tabpanel will not switch.

    I am using the itemchange event to fire any extra javascript to format data, and place focus on the first input field in the form on that tab.

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

Sidebar

Related Questions

In my ASP.net project I need to validate some basic data types for user
I have a very basic form, with some very basic validations (though I need
I need to do some basic validation on a date, things like validating that
I need some basic CMS functionality with rich text editing. On stack overflow there
I would need some basic vector mathematics constructs in an application. Dot product, cross
I'm in need of some basic TSQL help. Here's my table layout: Orders Table
I need a basic pdf generator that'll let me toss some images and text
I am using the jQuery validation plugin on my form. I set the basic
on my website I have an Enroll page where users submit some basic information,
I need some basic clarification on C++ static linkage. I have a file called

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.