You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Anthony Yulo <An...@headstrong.com> on 2007/06/20 04:55:27 UTC

Dialog Framework and validateModelUpdates Phase

Hi!  I've noticed that when I launch a popup using the ADF Faces Dialog
framework, it seems that the validateModelUpdates phase of the JSF Lifecycle
doesn't get called when it returns to the main page. I am using the ADF BC4J
framework.  When I return from the dialog, I updated my Model data on the
returnListener.  I updated a value on the main page bound to table on the
database.  I got the value from the dialog and it was invalid based on some
business rule.  But when I traced the program, the validator did not get
fired at all.  

 

 

 

Is there anyway to force the ValidateModelUpdates phase to run inside the
returnListener?

 

 

 

Regards,

 

 

Anton

 

 


Re: Dialog Framework and validateModelUpdates Phase

Posted by Simon Lessard <si...@gmail.com>.
By executing it in the returnListener, I meant calling it manually, not
through standard validators.

On 6/21/07, Simon Lessard <si...@gmail.com> wrote:
>
> Hello Anthony,
>
> Comments below
>
> On 6/19/07, Anthony Yulo <An...@headstrong.com> wrote:
> >
> >  Hi!  I've noticed that when I launch a popup using the ADF Faces Dialog
> > framework, it seems that the validateModelUpdates phase of the JSF Lifecycle
> > doesn't get called when it returns to the main page. I am using the ADF BC4J
> > framework.  When I return from the dialog,
> >
> If you got there it mean that all validators in the dialog passed, unless
> your close button is immediate.
>
> I updated my Model data on the returnListener.  I updated a value on the
> > main page bound to table on the database.  I got the value from the dialog
> > and it was invalid based on some business rule.
> >
> So this is a kind of coherence validation based on what was already in the
> model or what is currently in the calling page? If it's the former, then you
> can do your validation inside the returnListener, before pushing the value
> in the model. Otherwise, it's as Adam said, it will be validated on next
> postback.
>
> But when I traced the program, the validator did not get fired at all.
> >
>
> As Adam said, this is the expected behavior.
>
> Is there anyway to force the ValidateModelUpdates phase to run inside the
> > returnListener?
> >
> >
> >
> >
> >
> >
> >
> > Regards,
> >
> >
> >
> >
> >
> > Anton
> >
> >
> >
> >
> >
>
>

Re: Dialog Framework and validateModelUpdates Phase

Posted by Simon Lessard <si...@gmail.com>.
Hello Anthony,

Comments below

On 6/19/07, Anthony Yulo <An...@headstrong.com> wrote:
>
>  Hi!  I've noticed that when I launch a popup using the ADF Faces Dialog
> framework, it seems that the validateModelUpdates phase of the JSF Lifecycle
> doesn't get called when it returns to the main page. I am using the ADF BC4J
> framework.  When I return from the dialog,
>
If you got there it mean that all validators in the dialog passed, unless
your close button is immediate.

I updated my Model data on the returnListener.  I updated a value on the
> main page bound to table on the database.  I got the value from the dialog
> and it was invalid based on some business rule.
>
So this is a kind of coherence validation based on what was already in the
model or what is currently in the calling page? If it's the former, then you
can do your validation inside the returnListener, before pushing the value
in the model. Otherwise, it's as Adam said, it will be validated on next
postback.

But when I traced the program, the validator did not get fired at all.
>

As Adam said, this is the expected behavior.

Is there anyway to force the ValidateModelUpdates phase to run inside the
> returnListener?
>
>
>
>
>
>
>
> Regards,
>
>
>
>
>
> Anton
>
>
>
>
>

Re: Dialog Framework and validateModelUpdates Phase

Posted by Adam Winer <aw...@gmail.com>.
Anton, this is a question about ADF Faces and BC4J, both
of which are Oracle products.  You should bring this
question to OTN or Oracle support.  This mailing list
needs to be limited to questions about Apache MyFaces
projects.

-- Adam


On 6/19/07, Anthony Yulo <An...@headstrong.com> wrote:
>
>
>
>
> Hi!  I've noticed that when I launch a popup using the ADF Faces Dialog
> framework, it seems that the validateModelUpdates phase of the JSF Lifecycle
> doesn't get called when it returns to the main page. I am using the ADF BC4J
> framework.  When I return from the dialog, I updated my Model data on the
> returnListener.  I updated a value on the main page bound to table on the
> database.  I got the value from the dialog and it was invalid based on some
> business rule.  But when I traced the program, the validator did not get
> fired at all.
>
>
>
>
>
>
>
> Is there anyway to force the ValidateModelUpdates phase to run inside the
> returnListener?
>
>
>
>
>
>
>
> Regards,
>
>
>
>
>
> Anton
>
>
>
>