Like I said, I tried that. The problem with that is that the model values don't get updated and so can't be preserved with the <t:saveState> component.

Sean Schofield wrote:

Use immediate="true" on your command links.

sean

On 8/24/05, Richard Wallace <[EMAIL PROTECTED]> wrote:
Hey everyone,

I've got a form that has a couple of optional command links on it.  They
are basically "quick add" buttons so a user can quickly add things to
drop downs if they aren't there.  When these "quick add" buttons are
clicked the user is sent to an add page, the user enters the new info
and is then redirected back to the original page where the new entry is
selected and all the other data is preserved from before they clicked
the "quick add" button.  The backing beans involved are request scoped
and the values filled in before clicking the "quick add" button are
preserved through the process using the <t:saveState> element.

I'm trying to get the validation correct. I want all the form elements
to be required when the user clicks the submit button, but when they hit
the "quick add" link the validation should be bypassed.   I thought of
doing this with the immediate attribute set to true on the "quick add"
command links but if I do that then any data the user entered on that
page load (contact info type stuff) is lost.  So I kind of need to
bypass the validation but still update the model values if one of the
command links are clicked, but have full validation done when the
command button is pressed.

I was looking at the new OptionalValidation Framework but I'm not sure
exactly how to apply it in this case.  I mean, what I really want is to
have the validation type be none when command links are used and hard
otherwise.

Any ideas?

Thanks,
Rich


Reply via email to