You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Richard Yee <ri...@gmail.com> on 2008/01/27 03:11:06 UTC
[Trinidad] Page navigation after returning from a Trinidad Dialog
Hi,
I am invoking a Trinidad dialog in a new window from a commandButton.
<tr:commandButton action="dialog:showDetail" text="Next"
useWindow="true"
partialSubmit="true" returnListener="#{myBacking.handleReturn}"
windowWidth="300" windowHeight="200"/>
Is it possible to have the original page navigate to a new page after
returning from the dialog without the user having to click on anything?
Right now, I am calling
RequestContext.getCurrentInstance().returnFromDialog(returnValue, null);
from an action method that is called when the user clicks on a commandButton
in the dialog. This causes
the dialog window to close and control to return back to the original page.
What I would like to have happen is that the original page be replaced with
a page with a new view Id.
Thanks for any help in advance.
-Richard
Re: [Trinidad] Page navigation after returning from a Trinidad Dialog
Posted by Richard Yee <ry...@cruzio.com>.
Gerhard,
Thanks. I'll try it out.
-Richard
Gerhard Petracek wrote:
> hello richard,
>
> add a return listener and within the listener place the following
> source code:
> FacesContext context = FacesContext.getCurrentInstance();
> context.getApplication().getNavigationHandler().handleNavigation(
> context, null, "testOutcome" );
>
> (+ don't forget to introduce an adequate navigation rule/case.)
>
> regards,
> gerhard
>
>
>
> 2008/1/27, Richard Yee <richard.k.yee@gmail.com
> <ma...@gmail.com>>:
>
> Hi,
> I am invoking a Trinidad dialog in a new window from a commandButton.
> <tr:commandButton action="dialog:showDetail" text="Next"
> useWindow="true"
> partialSubmit="true"
> returnListener="#{myBacking.handleReturn}"
> windowWidth="300" windowHeight="200"/>
>
> Is it possible to have the original page navigate to a new page
> after returning from the dialog without the user having to click
> on anything? Right now, I am calling
> RequestContext.getCurrentInstance().returnFromDialog(returnValue,
> null); from an action method that is called when the user clicks
> on a commandButton in the dialog. This causes
> the dialog window to close and control to return back to the
> original page. What I would like to have happen is that the
> original page be replaced with a page with a new view Id.
>
> Thanks for any help in advance.
>
> -Richard
>
>
>
>
> --
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
Re: [Trinidad] Page navigation after returning from a Trinidad Dialog
Posted by Richard Yee <ri...@gmail.com>.
Gerhard,
Your solution worked perfectly!
Thanks,
Richard
On Jan 27, 2008 1:31 AM, Gerhard Petracek <ge...@gmail.com>
wrote:
> hello richard,
>
> add a return listener and within the listener place the following source
> code:
> FacesContext context = FacesContext.getCurrentInstance();
> context.getApplication().getNavigationHandler().handleNavigation(
> context, null, "testOutcome" );
>
> (+ don't forget to introduce an adequate navigation rule/case.)
>
> regards,
> gerhard
>
>
>
> 2008/1/27, Richard Yee <ri...@gmail.com>:
>
> > Hi,
> > I am invoking a Trinidad dialog in a new window from a commandButton.
> > <tr:commandButton action="dialog:showDetail" text="Next"
> > useWindow="true"
> > partialSubmit="true" returnListener="#{
> > myBacking.handleReturn}"
> > windowWidth="300" windowHeight="200"/>
> >
> > Is it possible to have the original page navigate to a new page after
> > returning from the dialog without the user having to click on anything?
> > Right now, I am calling
> > RequestContext.getCurrentInstance().returnFromDialog(returnValue, null);
> > from an action method that is called when the user clicks on a commandButton
> > in the dialog. This causes
> > the dialog window to close and control to return back to the original
> > page. What I would like to have happen is that the original page be replaced
> > with a page with a new view Id.
> >
> > Thanks for any help in advance.
> >
> > -Richard
> >
>
>
>
> --
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
Re: [Trinidad] Page navigation after returning from a Trinidad Dialog
Posted by Gerhard Petracek <ge...@gmail.com>.
hello richard,
add a return listener and within the listener place the following source
code:
FacesContext context = FacesContext.getCurrentInstance();
context.getApplication().getNavigationHandler().handleNavigation(
context, null, "testOutcome" );
(+ don't forget to introduce an adequate navigation rule/case.)
regards,
gerhard
2008/1/27, Richard Yee <ri...@gmail.com>:
>
> Hi,
> I am invoking a Trinidad dialog in a new window from a commandButton.
> <tr:commandButton action="dialog:showDetail" text="Next"
> useWindow="true"
> partialSubmit="true" returnListener="#{myBacking.handleReturn
> }"
> windowWidth="300" windowHeight="200"/>
>
> Is it possible to have the original page navigate to a new page after
> returning from the dialog without the user having to click on anything?
> Right now, I am calling
> RequestContext.getCurrentInstance().returnFromDialog(returnValue, null);
> from an action method that is called when the user clicks on a commandButton
> in the dialog. This causes
> the dialog window to close and control to return back to the original
> page. What I would like to have happen is that the original page be replaced
> with a page with a new view Id.
>
> Thanks for any help in advance.
>
> -Richard
>
--
http://www.irian.at
Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German
Professional Support for Apache MyFaces