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 Laurie Harper <la...@holoweb.net> on 2006/08/24 03:45:06 UTC
Closing dialogs
A dialog can be launched purely through navigation configuration, as in
<tr:commandLink action="dialog:blah" useWindow="true" .../>
...
<navigation-rule>
<navigation-case>
<from-outcome>dialog:blah</from-outcome>
<to-view-id>/some/view</to-view-id>
</navigation-case>
</navigation-rule>
A dialog is initiated based on the from-outcome having the
appropriate prefix; no Java code is required. As far as I can tell,
that's not true for terminating a dialog, though; you have to call
RequestContext.returnFromDialog() from somewhere.
Is that correct? Or is there a 'magic' outcome that can be used to do
this implicitly, as in something like
<tr:commandLink action="dialog:CLOSE" .../>
If there isn't, would this be worth adding?
L.
--
Laurie Harper
Open Source advocate, Java geek: http://www.holoweb.net/laurie
Founder, Zotech Software: http://www.zotechsoftware.com/
Re: Closing dialogs
Posted by Matthias Wessendorf <ma...@apache.org>.
I am just uploading the *new* homepage.
that has more infos on lot's of Trinidad stuff
On 8/23/06, Matthias Wessendorf <ma...@apache.org> wrote:
> oh yes,
>
> that is very specific to my use case.
> I create a user during my wizard and return it on the last page.
> that's all (I use the processScope here, not a must)
>
> returnFromDialog() works too.
>
> I think Jonas will port this article to Trinidad ([1]).
>
> [1] http://www.oracle.com/technology/products/jdev/101/howtos/adfdialog/index.html
>
> On 8/23/06, Laurie Harper <la...@holoweb.net> wrote:
> > Hmm, I'm not sure what you mean. Presumably ${processScope.tmpUser}
> > refers to an instance of a return listener that calls returnFromDialog
> > ()? I realized after posting that I could always put the
> > returnFromDialog() call into a method on a managed bean that wasn't
> > tied to a specific view. I guess that reduces the need for a 'magic'
> > outcome for closing dialogs.
> >
> > L.
> >
> > On 23-Aug-06, at 11:48 PM, Matthias Wessendorf wrote:
> >
> > > inside my dialog, i have two pages (use the processScope for
> > > storing stuff)
> > >
> > > that is in my button from the last page
> > >
> > > <tr:commandButton text="Finish">
> > > <tr:returnActionListener value="#{processScope.tmpUser}"/>
> > > </tr:commandButton>
> > >
> > >
> > >
> > > On 8/23/06, Laurie Harper <la...@holoweb.net> wrote:
> > >> A dialog can be launched purely through navigation configuration,
> > >> as in
> > >>
> > >> <tr:commandLink action="dialog:blah" useWindow="true" .../>
> > >> ...
> > >> <navigation-rule>
> > >> <navigation-case>
> > >> <from-outcome>dialog:blah</from-outcome>
> > >> <to-view-id>/some/view</to-view-id>
> > >> </navigation-case>
> > >> </navigation-rule>
> > >>
> > >> A dialog is initiated based on the from-outcome having the
> > >> appropriate prefix; no Java code is required. As far as I can tell,
> > >> that's not true for terminating a dialog, though; you have to call
> > >> RequestContext.returnFromDialog() from somewhere.
> > >>
> > >> Is that correct? Or is there a 'magic' outcome that can be used to do
> > >> this implicitly, as in something like
> > >>
> > >> <tr:commandLink action="dialog:CLOSE" .../>
> > >>
> > >> If there isn't, would this be worth adding?
> > >>
> > >> L.
> > >> --
> > >> Laurie Harper
> > >> Open Source advocate, Java geek: http://www.holoweb.net/laurie
> > >> Founder, Zotech Software: http://www.zotechsoftware.com/
> > >>
> > >>
> > >>
> > >>
> > >
> > >
> > > --
> > > Matthias Wessendorf
> > >
> > > further stuff:
> > > blog: http://jroller.com/page/mwessendorf
> > > mail: mwessendorf-at-gmail-dot-com
> >
> > --
> > Laurie Harper
> > Open Source advocate, Java geek: http://www.holoweb.net/laurie
> > Founder, Zotech Software: http://www.zotechsoftware.com/
> >
> >
> >
> >
>
>
> --
> Matthias Wessendorf
>
> further stuff:
> blog: http://jroller.com/page/mwessendorf
> mail: mwessendorf-at-gmail-dot-com
>
--
Matthias Wessendorf
further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com
Re: Closing dialogs
Posted by Matthias Wessendorf <ma...@apache.org>.
here is what you want, directly from Trinidad ;)
http://incubator.apache.org/adffaces/devguide/dialogs.html
-Matthias
On 8/23/06, Laurie Harper <la...@holoweb.net> wrote:
> On 24-Aug-06, at 1:45 AM, Matthias Wessendorf wrote:
> > oh yes,
> >
> > that is very specific to my use case.
> > I create a user during my wizard and return it on the last page.
> > that's all (I use the processScope here, not a must)
> >
> > returnFromDialog() works too.
>
> I was looking for a way to terminate a dialog via a navigation rule,
> though (or at least without needing to explicitly reference something
> that calls returnFromDialog()).
>
> > I think Jonas will port this article to Trinidad ([1]).
>
> Hmm, that looks like it's a bit more comprehensive than the
> documentation in the devguide that's in Trinidad svn; I'll have to
> give it a mroe careful read tomorrow :-)
>
> L.
>
> >
> > [1] http://www.oracle.com/technology/products/jdev/101/howtos/
> > adfdialog/index.html
> >
> > On 8/23/06, Laurie Harper <la...@holoweb.net> wrote:
> >> Hmm, I'm not sure what you mean. Presumably ${processScope.tmpUser}
> >> refers to an instance of a return listener that calls
> >> returnFromDialog
> >> ()? I realized after posting that I could always put the
> >> returnFromDialog() call into a method on a managed bean that wasn't
> >> tied to a specific view. I guess that reduces the need for a 'magic'
> >> outcome for closing dialogs.
> >>
> >> L.
> >>
> >> On 23-Aug-06, at 11:48 PM, Matthias Wessendorf wrote:
> >>
> >> > inside my dialog, i have two pages (use the processScope for
> >> > storing stuff)
> >> >
> >> > that is in my button from the last page
> >> >
> >> > <tr:commandButton text="Finish">
> >> > <tr:returnActionListener value="#{processScope.tmpUser}"/>
> >> > </tr:commandButton>
> >> >
> >> >
> >> >
> >> > On 8/23/06, Laurie Harper <la...@holoweb.net> wrote:
> >> >> A dialog can be launched purely through navigation configuration,
> >> >> as in
> >> >>
> >> >> <tr:commandLink action="dialog:blah" useWindow="true" .../>
> >> >> ...
> >> >> <navigation-rule>
> >> >> <navigation-case>
> >> >> <from-outcome>dialog:blah</from-outcome>
> >> >> <to-view-id>/some/view</to-view-id>
> >> >> </navigation-case>
> >> >> </navigation-rule>
> >> >>
> >> >> A dialog is initiated based on the from-outcome having the
> >> >> appropriate prefix; no Java code is required. As far as I can
> >> tell,
> >> >> that's not true for terminating a dialog, though; you have to call
> >> >> RequestContext.returnFromDialog() from somewhere.
> >> >>
> >> >> Is that correct? Or is there a 'magic' outcome that can be used
> >> to do
> >> >> this implicitly, as in something like
> >> >>
> >> >> <tr:commandLink action="dialog:CLOSE" .../>
> >> >>
> >> >> If there isn't, would this be worth adding?
> >> >>
> >> >> L.
> >> >> --
> >> >> Laurie Harper
> >> >> Open Source advocate, Java geek: http://www.holoweb.net/laurie
> >> >> Founder, Zotech Software: http://www.zotechsoftware.com/
> >> >>
> >> >>
> >> >>
> >> >>
> >> >
> >> >
> >> > --
> >> > Matthias Wessendorf
> >> >
> >> > further stuff:
> >> > blog: http://jroller.com/page/mwessendorf
> >> > mail: mwessendorf-at-gmail-dot-com
> >>
> >> --
> >> Laurie Harper
> >> Open Source advocate, Java geek: http://www.holoweb.net/laurie
> >> Founder, Zotech Software: http://www.zotechsoftware.com/
> >>
> >>
> >>
> >>
> >
> >
> > --
> > Matthias Wessendorf
> >
> > further stuff:
> > blog: http://jroller.com/page/mwessendorf
> > mail: mwessendorf-at-gmail-dot-com
>
> --
> Laurie Harper
> Open Source advocate, Java geek: http://www.holoweb.net/laurie
> Founder, Zotech Software: http://www.zotechsoftware.com/
>
>
>
>
--
Matthias Wessendorf
further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com
Re: Closing dialogs
Posted by Adam Winer <aw...@gmail.com>.
On 8/23/06, Laurie Harper <la...@holoweb.net> wrote:
>
> On 24-Aug-06, at 1:45 AM, Matthias Wessendorf wrote:
> > oh yes,
> >
> > that is very specific to my use case.
> > I create a user during my wizard and return it on the last page.
> > that's all (I use the processScope here, not a must)
> >
> > returnFromDialog() works too.
>
> I was looking for a way to terminate a dialog via a navigation rule,
> though (or at least without needing to explicitly reference something
> that calls returnFromDialog()).
Nope, this is not currently available. tr:returnActionListener
is what you need.
A navigation rule wouldn't be enough, because it isn't
just returning from the dialog, it's returning with a property.
I guess we could have some sort of EL-navigation hybrid,
like:
<outcome>return:#{foo.bar}<outcome>
-- Adam
> I think Jonas will port this article to Trinidad ([1]).
>
> Hmm, that looks like it's a bit more comprehensive than the
> documentation in the devguide that's in Trinidad svn; I'll have to
> give it a mroe careful read tomorrow :-)
>
> L.
>
> >
> > [1] http://www.oracle.com/technology/products/jdev/101/howtos/
> > adfdialog/index.html
> >
> > On 8/23/06, Laurie Harper < laurie@holoweb.net> wrote:
> >> Hmm, I'm not sure what you mean. Presumably ${processScope.tmpUser}
> >> refers to an instance of a return listener that calls
> >> returnFromDialog
> >> ()? I realized after posting that I could always put the
> >> returnFromDialog() call into a method on a managed bean that wasn't
> >> tied to a specific view. I guess that reduces the need for a 'magic'
> >> outcome for closing dialogs.
> >>
> >> L.
> >>
> >> On 23-Aug-06, at 11:48 PM, Matthias Wessendorf wrote:
> >>
> >> > inside my dialog, i have two pages (use the processScope for
> >> > storing stuff)
> >> >
> >> > that is in my button from the last page
> >> >
> >> > <tr:commandButton text="Finish">
> >> > <tr:returnActionListener value="#{ processScope.tmpUser}"/>
> >> > </tr:commandButton>
> >> >
> >> >
> >> >
> >> > On 8/23/06, Laurie Harper <laurie@holoweb.net > wrote:
> >> >> A dialog can be launched purely through navigation configuration,
> >> >> as in
> >> >>
> >> >> <tr:commandLink action="dialog:blah" useWindow="true" .../>
> >> >> ...
> >> >> <navigation-rule>
> >> >> <navigation-case>
> >> >> <from-outcome>dialog:blah</from-outcome>
> >> >> <to-view-id>/some/view</to-view-id>
> >> >> </navigation-case>
> >> >> </navigation-rule>
> >> >>
> >> >> A dialog is initiated based on the from-outcome having the
> >> >> appropriate prefix; no Java code is required. As far as I can
> >> tell,
> >> >> that's not true for terminating a dialog, though; you have to call
> >> >> RequestContext.returnFromDialog() from somewhere.
> >> >>
> >> >> Is that correct? Or is there a 'magic' outcome that can be used
> >> to do
> >> >> this implicitly, as in something like
> >> >>
> >> >> <tr:commandLink action="dialog:CLOSE" .../>
> >> >>
> >> >> If there isn't, would this be worth adding?
> >> >>
> >> >> L.
> >> >> --
> >> >> Laurie Harper
> >> >> Open Source advocate, Java geek: http://www.holoweb.net/laurie
> >> >> Founder, Zotech Software: http://www.zotechsoftware.com/
> >> >>
> >> >>
> >> >>
> >> >>
> >> >
> >> >
> >> > --
> >> > Matthias Wessendorf
> >> >
> >> > further stuff:
> >> > blog: http://jroller.com/page/mwessendorf
> >> > mail: mwessendorf-at-gmail-dot-com
> >>
> >> --
> >> Laurie Harper
> >> Open Source advocate, Java geek: http://www.holoweb.net/laurie
> >> Founder, Zotech Software: http://www.zotechsoftware.com/
> >>
> >>
> >>
> >>
> >
> >
> > --
> > Matthias Wessendorf
> >
> > further stuff:
> > blog: http://jroller.com/page/mwessendorf
> > mail: mwessendorf-at-gmail-dot-com
>
> --
> Laurie Harper
> Open Source advocate, Java geek: http://www.holoweb.net/laurie
> Founder, Zotech Software: http://www.zotechsoftware.com/
>
>
>
>
Re: Closing dialogs
Posted by Laurie Harper <la...@holoweb.net>.
On 24-Aug-06, at 1:45 AM, Matthias Wessendorf wrote:
> oh yes,
>
> that is very specific to my use case.
> I create a user during my wizard and return it on the last page.
> that's all (I use the processScope here, not a must)
>
> returnFromDialog() works too.
I was looking for a way to terminate a dialog via a navigation rule,
though (or at least without needing to explicitly reference something
that calls returnFromDialog()).
> I think Jonas will port this article to Trinidad ([1]).
Hmm, that looks like it's a bit more comprehensive than the
documentation in the devguide that's in Trinidad svn; I'll have to
give it a mroe careful read tomorrow :-)
L.
>
> [1] http://www.oracle.com/technology/products/jdev/101/howtos/
> adfdialog/index.html
>
> On 8/23/06, Laurie Harper <la...@holoweb.net> wrote:
>> Hmm, I'm not sure what you mean. Presumably ${processScope.tmpUser}
>> refers to an instance of a return listener that calls
>> returnFromDialog
>> ()? I realized after posting that I could always put the
>> returnFromDialog() call into a method on a managed bean that wasn't
>> tied to a specific view. I guess that reduces the need for a 'magic'
>> outcome for closing dialogs.
>>
>> L.
>>
>> On 23-Aug-06, at 11:48 PM, Matthias Wessendorf wrote:
>>
>> > inside my dialog, i have two pages (use the processScope for
>> > storing stuff)
>> >
>> > that is in my button from the last page
>> >
>> > <tr:commandButton text="Finish">
>> > <tr:returnActionListener value="#{processScope.tmpUser}"/>
>> > </tr:commandButton>
>> >
>> >
>> >
>> > On 8/23/06, Laurie Harper <la...@holoweb.net> wrote:
>> >> A dialog can be launched purely through navigation configuration,
>> >> as in
>> >>
>> >> <tr:commandLink action="dialog:blah" useWindow="true" .../>
>> >> ...
>> >> <navigation-rule>
>> >> <navigation-case>
>> >> <from-outcome>dialog:blah</from-outcome>
>> >> <to-view-id>/some/view</to-view-id>
>> >> </navigation-case>
>> >> </navigation-rule>
>> >>
>> >> A dialog is initiated based on the from-outcome having the
>> >> appropriate prefix; no Java code is required. As far as I can
>> tell,
>> >> that's not true for terminating a dialog, though; you have to call
>> >> RequestContext.returnFromDialog() from somewhere.
>> >>
>> >> Is that correct? Or is there a 'magic' outcome that can be used
>> to do
>> >> this implicitly, as in something like
>> >>
>> >> <tr:commandLink action="dialog:CLOSE" .../>
>> >>
>> >> If there isn't, would this be worth adding?
>> >>
>> >> L.
>> >> --
>> >> Laurie Harper
>> >> Open Source advocate, Java geek: http://www.holoweb.net/laurie
>> >> Founder, Zotech Software: http://www.zotechsoftware.com/
>> >>
>> >>
>> >>
>> >>
>> >
>> >
>> > --
>> > Matthias Wessendorf
>> >
>> > further stuff:
>> > blog: http://jroller.com/page/mwessendorf
>> > mail: mwessendorf-at-gmail-dot-com
>>
>> --
>> Laurie Harper
>> Open Source advocate, Java geek: http://www.holoweb.net/laurie
>> Founder, Zotech Software: http://www.zotechsoftware.com/
>>
>>
>>
>>
>
>
> --
> Matthias Wessendorf
>
> further stuff:
> blog: http://jroller.com/page/mwessendorf
> mail: mwessendorf-at-gmail-dot-com
--
Laurie Harper
Open Source advocate, Java geek: http://www.holoweb.net/laurie
Founder, Zotech Software: http://www.zotechsoftware.com/
Re: Closing dialogs
Posted by Matthias Wessendorf <ma...@apache.org>.
oh yes,
that is very specific to my use case.
I create a user during my wizard and return it on the last page.
that's all (I use the processScope here, not a must)
returnFromDialog() works too.
I think Jonas will port this article to Trinidad ([1]).
[1] http://www.oracle.com/technology/products/jdev/101/howtos/adfdialog/index.html
On 8/23/06, Laurie Harper <la...@holoweb.net> wrote:
> Hmm, I'm not sure what you mean. Presumably ${processScope.tmpUser}
> refers to an instance of a return listener that calls returnFromDialog
> ()? I realized after posting that I could always put the
> returnFromDialog() call into a method on a managed bean that wasn't
> tied to a specific view. I guess that reduces the need for a 'magic'
> outcome for closing dialogs.
>
> L.
>
> On 23-Aug-06, at 11:48 PM, Matthias Wessendorf wrote:
>
> > inside my dialog, i have two pages (use the processScope for
> > storing stuff)
> >
> > that is in my button from the last page
> >
> > <tr:commandButton text="Finish">
> > <tr:returnActionListener value="#{processScope.tmpUser}"/>
> > </tr:commandButton>
> >
> >
> >
> > On 8/23/06, Laurie Harper <la...@holoweb.net> wrote:
> >> A dialog can be launched purely through navigation configuration,
> >> as in
> >>
> >> <tr:commandLink action="dialog:blah" useWindow="true" .../>
> >> ...
> >> <navigation-rule>
> >> <navigation-case>
> >> <from-outcome>dialog:blah</from-outcome>
> >> <to-view-id>/some/view</to-view-id>
> >> </navigation-case>
> >> </navigation-rule>
> >>
> >> A dialog is initiated based on the from-outcome having the
> >> appropriate prefix; no Java code is required. As far as I can tell,
> >> that's not true for terminating a dialog, though; you have to call
> >> RequestContext.returnFromDialog() from somewhere.
> >>
> >> Is that correct? Or is there a 'magic' outcome that can be used to do
> >> this implicitly, as in something like
> >>
> >> <tr:commandLink action="dialog:CLOSE" .../>
> >>
> >> If there isn't, would this be worth adding?
> >>
> >> L.
> >> --
> >> Laurie Harper
> >> Open Source advocate, Java geek: http://www.holoweb.net/laurie
> >> Founder, Zotech Software: http://www.zotechsoftware.com/
> >>
> >>
> >>
> >>
> >
> >
> > --
> > Matthias Wessendorf
> >
> > further stuff:
> > blog: http://jroller.com/page/mwessendorf
> > mail: mwessendorf-at-gmail-dot-com
>
> --
> Laurie Harper
> Open Source advocate, Java geek: http://www.holoweb.net/laurie
> Founder, Zotech Software: http://www.zotechsoftware.com/
>
>
>
>
--
Matthias Wessendorf
further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com
Re: Closing dialogs
Posted by Laurie Harper <la...@holoweb.net>.
Hmm, I'm not sure what you mean. Presumably ${processScope.tmpUser}
refers to an instance of a return listener that calls returnFromDialog
()? I realized after posting that I could always put the
returnFromDialog() call into a method on a managed bean that wasn't
tied to a specific view. I guess that reduces the need for a 'magic'
outcome for closing dialogs.
L.
On 23-Aug-06, at 11:48 PM, Matthias Wessendorf wrote:
> inside my dialog, i have two pages (use the processScope for
> storing stuff)
>
> that is in my button from the last page
>
> <tr:commandButton text="Finish">
> <tr:returnActionListener value="#{processScope.tmpUser}"/>
> </tr:commandButton>
>
>
>
> On 8/23/06, Laurie Harper <la...@holoweb.net> wrote:
>> A dialog can be launched purely through navigation configuration,
>> as in
>>
>> <tr:commandLink action="dialog:blah" useWindow="true" .../>
>> ...
>> <navigation-rule>
>> <navigation-case>
>> <from-outcome>dialog:blah</from-outcome>
>> <to-view-id>/some/view</to-view-id>
>> </navigation-case>
>> </navigation-rule>
>>
>> A dialog is initiated based on the from-outcome having the
>> appropriate prefix; no Java code is required. As far as I can tell,
>> that's not true for terminating a dialog, though; you have to call
>> RequestContext.returnFromDialog() from somewhere.
>>
>> Is that correct? Or is there a 'magic' outcome that can be used to do
>> this implicitly, as in something like
>>
>> <tr:commandLink action="dialog:CLOSE" .../>
>>
>> If there isn't, would this be worth adding?
>>
>> L.
>> --
>> Laurie Harper
>> Open Source advocate, Java geek: http://www.holoweb.net/laurie
>> Founder, Zotech Software: http://www.zotechsoftware.com/
>>
>>
>>
>>
>
>
> --
> Matthias Wessendorf
>
> further stuff:
> blog: http://jroller.com/page/mwessendorf
> mail: mwessendorf-at-gmail-dot-com
--
Laurie Harper
Open Source advocate, Java geek: http://www.holoweb.net/laurie
Founder, Zotech Software: http://www.zotechsoftware.com/
Re: Closing dialogs
Posted by Matthias Wessendorf <ma...@apache.org>.
inside my dialog, i have two pages (use the processScope for storing stuff)
that is in my button from the last page
<tr:commandButton text="Finish">
<tr:returnActionListener value="#{processScope.tmpUser}"/>
</tr:commandButton>
On 8/23/06, Laurie Harper <la...@holoweb.net> wrote:
> A dialog can be launched purely through navigation configuration, as in
>
> <tr:commandLink action="dialog:blah" useWindow="true" .../>
> ...
> <navigation-rule>
> <navigation-case>
> <from-outcome>dialog:blah</from-outcome>
> <to-view-id>/some/view</to-view-id>
> </navigation-case>
> </navigation-rule>
>
> A dialog is initiated based on the from-outcome having the
> appropriate prefix; no Java code is required. As far as I can tell,
> that's not true for terminating a dialog, though; you have to call
> RequestContext.returnFromDialog() from somewhere.
>
> Is that correct? Or is there a 'magic' outcome that can be used to do
> this implicitly, as in something like
>
> <tr:commandLink action="dialog:CLOSE" .../>
>
> If there isn't, would this be worth adding?
>
> L.
> --
> Laurie Harper
> Open Source advocate, Java geek: http://www.holoweb.net/laurie
> Founder, Zotech Software: http://www.zotechsoftware.com/
>
>
>
>
--
Matthias Wessendorf
further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com