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 2006/12/18 20:25:33 UTC

Add messages to the parent with dialog framework

I am using the dialog framework, but for one particular issue, I can't
find a good answer. I have a confirmation box that appears on some
operations, using the dialog framework. So, the calling page spawns the
dialog, and then the dialog has buttons that each call a different
method.

 

uploadCancel will just close the dialog and return.

uploadSubmit will close the dialog and then call a backing bean method
to continue the process.

 

Now, what happens if there is a problem? I had uploadSubmit catch
exceptions and add a FacesMessage to a particular component. It seems as
though my messages aren't appearing, though. I think it's because the
dialog is asynchronous. Does it redisplay the calling page when the
dialog returns? 

 

Another option might be that the message is being added to the dialog
itself, since that's the form that called the method. But I have a
CoreCommandLink component bound to my parent page and I use getClientId
to know where to attach the message, so I'm pretty sure it's bound to
the right page.

 

Even if I'm putting my message in the right place and the page is
rediplaying, it may be the outcome out of uploadSubmit is a redirect,
which will clear the messages. I checked this too, and my transition is
a forward.

 

Is what I'm trying to do supported by the dialog framework?

 

Thanks.


Re: Add messages to the parent with dialog framework

Posted by Adam Winer <aw...@gmail.com>.
Do you have <tr:messages> on the page, or do you only
have messages on the individual component?  There are
PPR problems, I believe, with local per-component messages
not redisplaying.

-- Adam


On 12/18/06, Daniel Hannum <dh...@quovadx.com> wrote:
>
> I am using the dialog framework, but for one particular issue, I can't
> find a good answer. I have a confirmation box that appears on some
> operations, using the dialog framework. So, the calling page spawns the
> dialog, and then the dialog has buttons that each call a different
> method.
>
>
>
> uploadCancel will just close the dialog and return.
>
> uploadSubmit will close the dialog and then call a backing bean method
> to continue the process.
>
>
>
> Now, what happens if there is a problem? I had uploadSubmit catch
> exceptions and add a FacesMessage to a particular component. It seems as
> though my messages aren't appearing, though. I think it's because the
> dialog is asynchronous. Does it redisplay the calling page when the
> dialog returns?
>
>
>
> Another option might be that the message is being added to the dialog
> itself, since that's the form that called the method. But I have a
> CoreCommandLink component bound to my parent page and I use getClientId
> to know where to attach the message, so I'm pretty sure it's bound to
> the right page.
>
>
>
> Even if I'm putting my message in the right place and the page is
> rediplaying, it may be the outcome out of uploadSubmit is a redirect,
> which will clear the messages. I checked this too, and my transition is
> a forward.
>
>
>
> Is what I'm trying to do supported by the dialog framework?
>
>
>
> Thanks.
>
>
>