You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by schneidc <si...@gmx.de> on 2010/05/03 09:59:42 UTC
[Trinidad] ReturnListener of dialog isn't (always) called
Hi,
I'm facing the strange problem that the call of a ReturnListener attached to
a dialog depends on the method calls executed when the OK-Button of the
dialog is pressed.
Basically there are two possible outcomes when this OK-Button is pressed.
Either the action returns immediately adding a FacesMessage or a lot of
changes in the beans occur, but nevertheless I don't see how these changes
might affect the framework in a way that the returnListener doesn't get
called.
So before debugging through the Trinidad code myself I wanted to ask whether
anybody could think of a situation where this issue might occur.
Cheers
Simon
--
View this message in context: http://old.nabble.com/-Trinidad--ReturnListener-of-dialog-isn%27t-%28always%29-called-tp28432490p28432490.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: [Trinidad] ReturnListener of dialog isn't (always) called
Posted by schneidc <si...@gmx.de>.
@all
I took some time to debug through the myfaces/trinidad code but I found the
reason why the return method wasn't called. The method bound to the ok
button in the dialog deleted the entries of a selectOneChoice on the
"parent" page and therefore the index of the selected menu item was missing
the according actual SelectItem. Due to my custom error message handling I
never got to see the exception in the first place.
--
View this message in context: http://old.nabble.com/-Trinidad--ReturnListener-of-dialog-isn%27t-%28always%29-called-tp28432490p28512284.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: [Trinidad] ReturnListener of dialog isn't (always) called
Posted by schneidc <si...@gmx.de>.
@all
I took some time to debug through the myfaces/trinidad code but I found the
reason why the return method wasn't called. The method bound to the ok
button in the dialog deleted the entries of a selectOneChoice on the
"parent" page and therefore the index of the selected menu item was missing
the according actual SelectItem. Due to my custom error message handling I
never got to see the exception in the first place.
--
View this message in context: http://old.nabble.com/-Trinidad--ReturnListener-of-dialog-isn%27t-%28always%29-called-tp28432490p28512283.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: [Trinidad] ReturnListener of dialog isn't (always) called
Posted by schneidc <si...@gmx.de>.
Ok, no I understand what you mean. Only in my case the "rendered" property is
always true, I don't touch it. One thing that happens is that the button
gets disabled, when the action is executed but I'd be surprised if that is
the reason for the behaviour... or could it??
--
View this message in context: http://old.nabble.com/-Trinidad--ReturnListener-of-dialog-isn%27t-%28always%29-called-tp28432490p28444277.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: [Trinidad] ReturnListener of dialog isn't (always) called
Posted by Rafa Pérez <ra...@gmail.com>.
Sorry if I didn't explain. I mean that you must have your buttons rendered
after the dialog is closed. This means that the rendered property is true or
the ValueExpression evaluates to true.
On Mon, May 3, 2010 at 2:51 PM, schneidc <si...@gmx.de> wrote:
>
> Well, but my buttons is rendered as I have to click it to call the dialog
> ;-)
> --
> View this message in context:
> http://old.nabble.com/-Trinidad--ReturnListener-of-dialog-isn%27t-%28always%29-called-tp28432490p28434822.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>
Re: [Trinidad] ReturnListener of dialog isn't (always) called
Posted by schneidc <si...@gmx.de>.
Well, but my buttons is rendered as I have to click it to call the dialog ;-)
--
View this message in context: http://old.nabble.com/-Trinidad--ReturnListener-of-dialog-isn%27t-%28always%29-called-tp28432490p28434822.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: [Trinidad] ReturnListener of dialog isn't (always) called
Posted by Rafa Pérez <ra...@gmail.com>.
Hi,
I had some problems like this time ago. If the button is not rendered, the
returnListener is not called because the source of the event it is not
present yet.
HTH,
-- Rafa
On Mon, May 3, 2010 at 9:59 AM, schneidc <si...@gmx.de> wrote:
>
> Hi,
>
> I'm facing the strange problem that the call of a ReturnListener attached
> to
> a dialog depends on the method calls executed when the OK-Button of the
> dialog is pressed.
>
> Basically there are two possible outcomes when this OK-Button is pressed.
> Either the action returns immediately adding a FacesMessage or a lot of
> changes in the beans occur, but nevertheless I don't see how these changes
> might affect the framework in a way that the returnListener doesn't get
> called.
>
> So before debugging through the Trinidad code myself I wanted to ask
> whether
> anybody could think of a situation where this issue might occur.
>
>
> Cheers
> Simon
> --
> View this message in context:
> http://old.nabble.com/-Trinidad--ReturnListener-of-dialog-isn%27t-%28always%29-called-tp28432490p28432490.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>