On 11/21/05, Sean Schofield <[EMAIL PROTECTED]> wrote:
>
> In my Shale dialog I a single required field called foo. There is
> also a command link with an action listner (no action method binding.)
> The command link has the immediate attribute set to true (its only
> purpose is to empty the foo component.
>
> When I click the link the action listener resets the value of the foo
> field using the setValue method of AbstractFacesBean. Everything
> works as expected (no nagging about the foo field being required.) On
> the second click, the page complains that the field is required. For
> some reason JSF is ignoring the immediate property. (This is with
> MyFaces btw, but I assume it is also a problem in the RI.)
>
> Any idea what could be causing this? I was thinking it could be
> related to one of the existing issues regarding command link and
> navigation handler but this is not an action method just a listener.


It would probably help to simplify the scenario in trying to track this
down, by seeing if it happens without dialogs or AbstractFacesBean involved
-- you can emulate what setValue() does by just cut n pasting the logic from
that class. Nothing obvious from your description stands out to explain why
it's failing for you -- except for a couple of possibly related issues:

* When an immediate action (not actionListener) is used, the JSF runtime
calls FacesContext.responseComplete() to bypass validations and
model updates. That doesn't happen with an action listener unless you
do it for yourself.

* Enforcing the "required" validation checks the *submitted* value,
not the *current* value ... you might need to tweak that property instead.

Craig


TIA,
>
> sean
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to