You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Steve Horne <st...@gmail.com> on 2008/09/29 17:59:29 UTC

[trinidad] manual dialog return listener problem

I am using Trinidad and Facelets.  I have a commandButton that has an action
binding to a backing bean method that programmatically launches a dialog
(facelet).  Here is my commandButton:

<tr:commandButton text="lookup" action="#{customerLookupSupport.openDialog}"
useWindow="true" partialSubmit="true"
returnListener="#{backer.customerLookupReturnListener}"/>

My dialog has a link binding to a method that calls
RequestContext.returnFromDialog().

Everything works properly- the dialog appears and when the link in the
dialog is clicked, the returnFromDialog method executes and the dialog is
popped-down.  However, the returnListener is never called.  Am I wrong to
expect this to work this way when using programmatic launching/closing of
the dialog?

Thanks in advance for your advice.

-Steve

-- 
"Many men go fishing all of their lives without knowing it is not fish they
are after."

- Henry David Thoreau

Re: [trinidad] manual dialog return listener problem

Posted by Andrew Robinson <an...@gmail.com>.
I haven't had time to have a look and probably won't for at least a
week. Anyone else?

On Thu, Oct 2, 2008 at 1:09 PM, Steve Horne <st...@gmail.com> wrote:
>
> BUMP
>
> Nobody uses dialogs without navigation rules?
>
> On Mon, Sep 29, 2008 at 4:14 PM, Steve Horne <st...@gmail.com> wrote:
>>
>> I have created a JIRA ticket and attached an example WAR file with source:
>>
>> https://issues.apache.org/jira/browse/TRINIDAD-1244
>>
>>
>> On Mon, Sep 29, 2008 at 11:04 AM, Andrew Robinson <an...@gmail.com> wrote:
>>>
>>> The dialog return code is a bit hard to sometimes look through. Do you
>>> have a small test case to add to a JIRA ticket so that we can have a
>>> look (easier to debug the dialog code than try to think about what may
>>> be going wrong)?
>>>
>>> -A
>>>
>>> On Mon, Sep 29, 2008 at 9:59 AM, Steve Horne <st...@gmail.com> wrote:
>>> > I am using Trinidad and Facelets.  I have a commandButton that has an action
>>> > binding to a backing bean method that programmatically launches a dialog
>>> > (facelet).  Here is my commandButton:
>>> >
>>> > <tr:commandButton text="lookup" action="#{customerLookupSupport.openDialog}"
>>> > useWindow="true" partialSubmit="true"
>>> > returnListener="#{backer.customerLookupReturnListener}"/>
>>> >
>>> > My dialog has a link binding to a method that calls
>>> > RequestContext.returnFromDialog().
>>> >
>>> > Everything works properly- the dialog appears and when the link in the
>>> > dialog is clicked, the returnFromDialog method executes and the dialog is
>>> > popped-down.  However, the returnListener is never called.  Am I wrong to
>>> > expect this to work this way when using programmatic launching/closing of
>>> > the dialog?
>>> >
>>> > Thanks in advance for your advice.
>>> >
>>> > -Steve
>>> >
>>> > --
>>> > "Many men go fishing all of their lives without knowing it is not fish they
>>> > are after."
>>> >
>>> > - Henry David Thoreau
>>> >
>>
>>
>>
>> --
>> "Many men go fishing all of their lives without knowing it is not fish they are after."
>>
>> - Henry David Thoreau
>
>
>
> --
> "Many men go fishing all of their lives without knowing it is not fish they are after."
>
> - Henry David Thoreau

Re: [trinidad] manual dialog return listener problem

Posted by Steve Horne <st...@gmail.com>.
You are correct.  After setting up a binding for the commandButton, and then
using that binding in the call to launchDialog(), the returnListener is
called appropriately.


On Fri, Oct 3, 2008 at 5:04 AM, Martin Kočí <Ma...@aura.cz> wrote:

> Hi, this is not a bug - you have
>
> requestContext.launchDialog(dialog, null, // not launched from any
> component
>
>
> in your source, but ReturnEvent is delivered from a component.
>
> Get CommandButton component (from binding or ActionEvent) and put it as
> third parameter to  launchDialog method.
>
>
> Martin
>
>
> Steve Horne píše v Čt 02. 10. 2008 v 14:09 -0500:
> > BUMP
> >
> > Nobody uses dialogs without navigation rules?
> >
> > On Mon, Sep 29, 2008 at 4:14 PM, Steve Horne <st...@gmail.com>
> > wrote:
> >         I have created a JIRA ticket and attached an example WAR file
> >         with source:
> >
> >         https://issues.apache.org/jira/browse/TRINIDAD-1244
> >
> >
> >
> >
> >         On Mon, Sep 29, 2008 at 11:04 AM, Andrew Robinson
> >         <an...@gmail.com> wrote:
> >                 The dialog return code is a bit hard to sometimes look
> >                 through. Do you
> >                 have a small test case to add to a JIRA ticket so that
> >                 we can have a
> >                 look (easier to debug the dialog code than try to
> >                 think about what may
> >                 be going wrong)?
> >
> >                 -A
> >
> >
> >                 On Mon, Sep 29, 2008 at 9:59 AM, Steve Horne
> >                 <st...@gmail.com> wrote:
> >                 > I am using Trinidad and Facelets.  I have a
> >                 commandButton that has an action
> >                 > binding to a backing bean method that
> >                 programmatically launches a dialog
> >                 > (facelet).  Here is my commandButton:
> >                 >
> >                 > <tr:commandButton text="lookup"
> >                 action="#{customerLookupSupport.openDialog}"
> >                 > useWindow="true" partialSubmit="true"
> >                 >
> >                 returnListener="#{backer.customerLookupReturnListener}"/>
> >                 >
> >                 > My dialog has a link binding to a method that calls
> >                 > RequestContext.returnFromDialog().
> >                 >
> >                 > Everything works properly- the dialog appears and
> >                 when the link in the
> >                 > dialog is clicked, the returnFromDialog method
> >                 executes and the dialog is
> >                 > popped-down.  However, the returnListener is never
> >                 called.  Am I wrong to
> >                 > expect this to work this way when using programmatic
> >                 launching/closing of
> >                 > the dialog?
> >                 >
> >                 > Thanks in advance for your advice.
> >                 >
> >                 > -Steve
> >                 >
> >                 > --
> >                 > "Many men go fishing all of their lives without
> >                 knowing it is not fish they
> >                 > are after."
> >                 >
> >                 > - Henry David Thoreau
> >                 >
> >
> >
> >
> >
> >
> >         --
> >         "Many men go fishing all of their lives without knowing it is
> >         not fish they are after."
> >
> >         - Henry David Thoreau
> >
> >
> >
> >
> > --
> > "Many men go fishing all of their lives without knowing it is not fish
> > they are after."
> >
> > - Henry David Thoreau
> >
>
>


-- 
"Many men go fishing all of their lives without knowing it is not fish they
are after."

- Henry David Thoreau

Re: [trinidad] manual dialog return listener problem

Posted by Martin Kočí <Ma...@aura.cz>.
Hi, this is not a bug - you have 

requestContext.launchDialog(dialog, null, // not launched from any
component


in your source, but ReturnEvent is delivered from a component. 

Get CommandButton component (from binding or ActionEvent) and put it as
third parameter to  launchDialog method.


Martin


Steve Horne píše v Čt 02. 10. 2008 v 14:09 -0500:
> BUMP
> 
> Nobody uses dialogs without navigation rules?
> 
> On Mon, Sep 29, 2008 at 4:14 PM, Steve Horne <st...@gmail.com>
> wrote:
>         I have created a JIRA ticket and attached an example WAR file
>         with source:
>         
>         https://issues.apache.org/jira/browse/TRINIDAD-1244
>         
>         
>         
>         
>         On Mon, Sep 29, 2008 at 11:04 AM, Andrew Robinson
>         <an...@gmail.com> wrote:
>                 The dialog return code is a bit hard to sometimes look
>                 through. Do you
>                 have a small test case to add to a JIRA ticket so that
>                 we can have a
>                 look (easier to debug the dialog code than try to
>                 think about what may
>                 be going wrong)?
>                 
>                 -A
>                 
>                 
>                 On Mon, Sep 29, 2008 at 9:59 AM, Steve Horne
>                 <st...@gmail.com> wrote:
>                 > I am using Trinidad and Facelets.  I have a
>                 commandButton that has an action
>                 > binding to a backing bean method that
>                 programmatically launches a dialog
>                 > (facelet).  Here is my commandButton:
>                 >
>                 > <tr:commandButton text="lookup"
>                 action="#{customerLookupSupport.openDialog}"
>                 > useWindow="true" partialSubmit="true"
>                 >
>                 returnListener="#{backer.customerLookupReturnListener}"/>
>                 >
>                 > My dialog has a link binding to a method that calls
>                 > RequestContext.returnFromDialog().
>                 >
>                 > Everything works properly- the dialog appears and
>                 when the link in the
>                 > dialog is clicked, the returnFromDialog method
>                 executes and the dialog is
>                 > popped-down.  However, the returnListener is never
>                 called.  Am I wrong to
>                 > expect this to work this way when using programmatic
>                 launching/closing of
>                 > the dialog?
>                 >
>                 > Thanks in advance for your advice.
>                 >
>                 > -Steve
>                 >
>                 > --
>                 > "Many men go fishing all of their lives without
>                 knowing it is not fish they
>                 > are after."
>                 >
>                 > - Henry David Thoreau
>                 >
>                 
>         
>         
>         
>         
>         -- 
>         "Many men go fishing all of their lives without knowing it is
>         not fish they are after."
>         
>         - Henry David Thoreau
>         
> 
> 
> 
> -- 
> "Many men go fishing all of their lives without knowing it is not fish
> they are after."
> 
> - Henry David Thoreau
> 


Re: [trinidad] manual dialog return listener problem

Posted by Steve Horne <st...@gmail.com>.
BUMP

Nobody uses dialogs without navigation rules?

On Mon, Sep 29, 2008 at 4:14 PM, Steve Horne <st...@gmail.com> wrote:

> I have created a JIRA ticket and attached an example WAR file with source:
>
> https://issues.apache.org/jira/browse/TRINIDAD-1244
>
>
>
> On Mon, Sep 29, 2008 at 11:04 AM, Andrew Robinson <
> andrew.rw.robinson@gmail.com> wrote:
>
>> The dialog return code is a bit hard to sometimes look through. Do you
>> have a small test case to add to a JIRA ticket so that we can have a
>> look (easier to debug the dialog code than try to think about what may
>> be going wrong)?
>>
>> -A
>>
>> On Mon, Sep 29, 2008 at 9:59 AM, Steve Horne <st...@gmail.com>
>> wrote:
>> > I am using Trinidad and Facelets.  I have a commandButton that has an
>> action
>> > binding to a backing bean method that programmatically launches a dialog
>> > (facelet).  Here is my commandButton:
>> >
>> > <tr:commandButton text="lookup"
>> action="#{customerLookupSupport.openDialog}"
>> > useWindow="true" partialSubmit="true"
>> > returnListener="#{backer.customerLookupReturnListener}"/>
>> >
>> > My dialog has a link binding to a method that calls
>> > RequestContext.returnFromDialog().
>> >
>> > Everything works properly- the dialog appears and when the link in the
>> > dialog is clicked, the returnFromDialog method executes and the dialog
>> is
>> > popped-down.  However, the returnListener is never called.  Am I wrong
>> to
>> > expect this to work this way when using programmatic launching/closing
>> of
>> > the dialog?
>> >
>> > Thanks in advance for your advice.
>> >
>> > -Steve
>> >
>> > --
>> > "Many men go fishing all of their lives without knowing it is not fish
>> they
>> > are after."
>> >
>> > - Henry David Thoreau
>> >
>>
>
>
>
> --
> "Many men go fishing all of their lives without knowing it is not fish they
> are after."
>
> - Henry David Thoreau
>



-- 
"Many men go fishing all of their lives without knowing it is not fish they
are after."

- Henry David Thoreau

Re: [trinidad] manual dialog return listener problem

Posted by Steve Horne <st...@gmail.com>.
I have created a JIRA ticket and attached an example WAR file with source:

https://issues.apache.org/jira/browse/TRINIDAD-1244


On Mon, Sep 29, 2008 at 11:04 AM, Andrew Robinson <
andrew.rw.robinson@gmail.com> wrote:

> The dialog return code is a bit hard to sometimes look through. Do you
> have a small test case to add to a JIRA ticket so that we can have a
> look (easier to debug the dialog code than try to think about what may
> be going wrong)?
>
> -A
>
> On Mon, Sep 29, 2008 at 9:59 AM, Steve Horne <st...@gmail.com> wrote:
> > I am using Trinidad and Facelets.  I have a commandButton that has an
> action
> > binding to a backing bean method that programmatically launches a dialog
> > (facelet).  Here is my commandButton:
> >
> > <tr:commandButton text="lookup"
> action="#{customerLookupSupport.openDialog}"
> > useWindow="true" partialSubmit="true"
> > returnListener="#{backer.customerLookupReturnListener}"/>
> >
> > My dialog has a link binding to a method that calls
> > RequestContext.returnFromDialog().
> >
> > Everything works properly- the dialog appears and when the link in the
> > dialog is clicked, the returnFromDialog method executes and the dialog is
> > popped-down.  However, the returnListener is never called.  Am I wrong to
> > expect this to work this way when using programmatic launching/closing of
> > the dialog?
> >
> > Thanks in advance for your advice.
> >
> > -Steve
> >
> > --
> > "Many men go fishing all of their lives without knowing it is not fish
> they
> > are after."
> >
> > - Henry David Thoreau
> >
>



-- 
"Many men go fishing all of their lives without knowing it is not fish they
are after."

- Henry David Thoreau

Re: [trinidad] manual dialog return listener problem

Posted by Andrew Robinson <an...@gmail.com>.
The dialog return code is a bit hard to sometimes look through. Do you
have a small test case to add to a JIRA ticket so that we can have a
look (easier to debug the dialog code than try to think about what may
be going wrong)?

-A

On Mon, Sep 29, 2008 at 9:59 AM, Steve Horne <st...@gmail.com> wrote:
> I am using Trinidad and Facelets.  I have a commandButton that has an action
> binding to a backing bean method that programmatically launches a dialog
> (facelet).  Here is my commandButton:
>
> <tr:commandButton text="lookup" action="#{customerLookupSupport.openDialog}"
> useWindow="true" partialSubmit="true"
> returnListener="#{backer.customerLookupReturnListener}"/>
>
> My dialog has a link binding to a method that calls
> RequestContext.returnFromDialog().
>
> Everything works properly- the dialog appears and when the link in the
> dialog is clicked, the returnFromDialog method executes and the dialog is
> popped-down.  However, the returnListener is never called.  Am I wrong to
> expect this to work this way when using programmatic launching/closing of
> the dialog?
>
> Thanks in advance for your advice.
>
> -Steve
>
> --
> "Many men go fishing all of their lives without knowing it is not fish they
> are after."
>
> - Henry David Thoreau
>