You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-user@incubator.apache.org by Daniel Hannum <dh...@quovadx.com> on 2007/01/03 15:25:34 UTC

autoSubmit + immediate + validations

Hi. I'm reposting this from last week because I'm afraid no one saw it
during the vacation week. This is still a very serious issue for me and
I'd welcome any feedback you can provide. I've added references at the
bottom.

 

--

 

I have a form with a required field, and a commandMenuItem that goes to
another page (but has immediate set to true). As expected, I can click
the menu link and go to the other page, and the immediate attribute
bypasses validations.

 

However, if I add that page a control that has autoSubmit="true", even
if the autoSubmit has nothing to do with the required field, now when I
click the menu link, it will still stop me with validation errors. If I
click the menu link again, it will go to the page as expected. I saw
reports on the Oracle forums about ADF issues in this vein [1, 2]. I
don't know if they have been fixed in Trinidad. Seems like this has to
be a bug, though.

 

To recap:

 

1.    Make a page with a required text field, an autoSubmit checkbox,
and an immediate link to another page.

2.    Leave the field blank and click the link. You go to the page fine.
Validations are skipped by immediate="true"

3.    Go back. Still leave the field blank, but this time click the
autoSubmit checkbox. Now click the link. You'll get validation errors
(despite the immediate="true"... bug?)

4.    Once you have the validation errors on screen, ignore them and
click the link a second time. Now you go to the page as expected.

 

Not being an expert in the JSF lifecycle or in the implementation of
autoSubmit, can someone explain what's going on? I feel validations
should always be bypassed with immediate="true", not just when not using
autoSubmit. I love autoSubmit, but this makes for a bad user experience.

 

Thanks

Dan

 

[1]
http://forums.oracle.com/forums/thread.jspa?messageID=1387162&#1387162 

[2] http://www.orablogs.com/fnimphius/archives/001787.html (seems to be
a solution but it involves customizing the ADF lifecycle by extending
Oracle-specific classes. How I would adapt this for the version I'm on,
I don't know)

 


Re: autoSubmit + immediate + validations

Posted by Adam Winer <aw...@gmail.com>.
Daniel,

Hey, I did see it, but I'm currently plowed under at work.
This might be:
 http://issues.apache.org/jira/browse/ADFFACES-24
... which desparately needs some attention.

-- Adam


On 1/3/07, Daniel Hannum <dh...@quovadx.com> wrote:
> Hi. I'm reposting this from last week because I'm afraid no one saw it
> during the vacation week. This is still a very serious issue for me and
> I'd welcome any feedback you can provide. I've added references at the
> bottom.
>
>
>
> --
>
>
>
> I have a form with a required field, and a commandMenuItem that goes to
> another page (but has immediate set to true). As expected, I can click
> the menu link and go to the other page, and the immediate attribute
> bypasses validations.
>
>
>
> However, if I add that page a control that has autoSubmit="true", even
> if the autoSubmit has nothing to do with the required field, now when I
> click the menu link, it will still stop me with validation errors. If I
> click the menu link again, it will go to the page as expected. I saw
> reports on the Oracle forums about ADF issues in this vein [1, 2]. I
> don't know if they have been fixed in Trinidad. Seems like this has to
> be a bug, though.
>
>
>
> To recap:
>
>
>
> 1.    Make a page with a required text field, an autoSubmit checkbox,
> and an immediate link to another page.
>
> 2.    Leave the field blank and click the link. You go to the page fine.
> Validations are skipped by immediate="true"
>
> 3.    Go back. Still leave the field blank, but this time click the
> autoSubmit checkbox. Now click the link. You'll get validation errors
> (despite the immediate="true"... bug?)
>
> 4.    Once you have the validation errors on screen, ignore them and
> click the link a second time. Now you go to the page as expected.
>
>
>
> Not being an expert in the JSF lifecycle or in the implementation of
> autoSubmit, can someone explain what's going on? I feel validations
> should always be bypassed with immediate="true", not just when not using
> autoSubmit. I love autoSubmit, but this makes for a bad user experience.
>
>
>
> Thanks
>
> Dan
>
>
>
> [1]
> http://forums.oracle.com/forums/thread.jspa?messageID=1387162&#1387162
>
> [2] http://www.orablogs.com/fnimphius/archives/001787.html (seems to be
> a solution but it involves customizing the ADF lifecycle by extending
> Oracle-specific classes. How I would adapt this for the version I'm on,
> I don't know)
>
>
>
>
>