Thanks.
 
A form for user to input address:
 
Street   ----------
State  ----------  (use selectOneMenu depending on country)
Zip  ----------
Country ----------  (use t:selectOneCountry)
 
Submit button
 
 
When user selects country, the form is submitted. what I need is:
1. skip the validation (e.g, zip may be empty). validation is needed only when clicking submit button.
2. need update model phase. so all data can display back after selecting a country. Country is need to construct  select items for state.
 
Is there any way to skip validation, but keep model update in life cycle?
Immediate = true  will skip both validation and model update.
 
What is the way to change state select items when user select a country? In general, how components interact in a form in JSF?
 
Thanks. Dave


Mike Kienenberger <[EMAIL PROTECTED]> wrote:
For simple situations (like only one occurrance of the above on a
page), you can just set the UICommand and the UIInput components both
to "immediate=true"

Just remember that you're not skipping the validation phase. You're
short-circuiting the lifecycle before validation gets executed, so it
goes "Restore View" -> "Apply Values" -> process immediate values and
actions -> "Render Response"

There's no process-validation, update-model, or invoke-app phases executed.

-Mike


On 10/25/05, Bruno Aranda <[EMAIL PROTECTED]>wrote:
> Dave, take a look at
> http://wiki.apache.org/myfaces/SubmitPageOnValueChange , you can click
> a hidden button with the immediate attribute set to true,
>
> Regards,
>
> Bruno
>
> 2005/10/25, Dave <[EMAIL PROTECTED]>:
> > The form is n ot submitted by clicking a button, but using event "onchange".
> >
> > "Santiago, Ray" <[EMAIL PROTECTED]>wrote:
> >
> >
> >
> > You've answered your own question set the immediate=true property on the
> > submit button.
> >
> > I do this on our signon page where a username/password is mandatory, and yet
> > I need a link
> >
> > to let the user create a signon.
> >
> >
> >
> > ________________________________
> >
> >
> > From: Dave [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, October 25, 2005 3:11 PM
> > To: [email protected]
> > Subject: SelectOneCountry, skip validation?
> >
> >
> >
> >
> > I have a form, let user input address information:
> >
> >
> >
> > > ; >
> > maxLength="25" />
> >
> >
> >
> > Once user selects country, the state selection changes based on the country
> > selected. The form can be incomplete when user selects country, but the
> > validation is in the execution path on the server side when submitting the
> > form by changing the country.
> >
> >
> >
> > How to skip the validation when users select a country? For command link,
> > immediate="true" can be used.
> >
> >
> >
> > Thanks, Dave
> > ________________________________
> >
> >
> > Yahoo! FareChase - Search multiple travel sites in one click. This
> > electronic message transmission contains information from the Company that
> > may be proprietary, confidential and/or privileged.
> > The information is inte nded only for the use of the individual(s) or entity
> > named above. If you are not the intended recipient, be
> > aware that any disclosure, copying or distribution or use of the contents of
> > this information is prohibited. If you have received
> > this electronic transmission in error, please notify the sender immediately
> > by replying to the address listed in the "From:" field.
> >
> >
> >
> > ________________________________
> > Yahoo! FareChase - Search multiple travel sites in one click.
> >
> >
>


Yahoo! FareChase - Search multiple travel sites in one click.

Reply via email to