You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Walter Mourão <wa...@gmail.com> on 2011/05/05 17:18:44 UTC

f:setPropertyActionListener executed after action

Hi folks,
I'm 99% sure the f:setPropertyActionListener is being executed after the
action, in the following code:

        <tr:commandLink
action="#{visualizarRelatorioController.visualizandoRelatorioMudarPagina}"
disabled="#{visualizarRelatorioVisualizandoRelatorioMudarPaginaForm.paginaAtual
le 1}">
            <tr:image source="/images/arrow-previous.gif"
shortDesc="#{messages['pagina.anterior']}" inlineStyle="border-style:none"
/>
            <f:setPropertyActionListener
value="#{visualizarRelatorioVisualizandoRelatorioMudarPaginaForm.paginaAtual
- 1}"
target="#{visualizarRelatorioVisualizandoRelatorioMudarPaginaForm.paginaAtual}"
/>
        </tr:commandLink>


Does it make sense ?

I'm using Myfaces 1.2.9 + Trinidad 1.2.14

Thanks,

Walter Mourão
http://waltermourao.com.br
http://arcadian.com.br
http://oriens.com.br

Re: f:setPropertyActionListener executed after action

Posted by Joachim Schrod <js...@acm.org>.
Luka Surija wrote:

> Action method in commandButton or commandLink is always executed after
> f:setPropertyActionListener, but for ActionListener method behavior is
> different depending on facelets version:
> - 1.1.13 executes f:setPropertyActionListener before ActionListener method,
> - 1.1.14 executes f:setPropertyActionListener after ActionListener method.

Thanks very much for this information. We're going to check if
there are any projects left that still use 1.1.13. ;-)

Best,
	Joachim

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Joachim Schrod				Email: jschrod@acm.org
Roedermark, Germany


Re: f:setPropertyActionListener executed after action

Posted by Luka Surija <lu...@iytim.hr>.
Action method in commandButton or commandLink is always executed after 
f:setPropertyActionListener, but for ActionListener method behavior is 
different depending on facelets version:
- 1.1.13 executes f:setPropertyActionListener before ActionListener method,
- 1.1.14 executes f:setPropertyActionListener after ActionListener method.

My env:
Glassfish 2.1.1.
Trinidad 1.2.14


Luka Surija

+385 1 61 99 140
+385 91 61 99 140
luka@iytim.hr

I.Y. tim d.o.o.
Nova cesta 171a, HR-10000 Zagreb
www.iytim.hr
info@iytim.hr


On 05/14/2011 04:48 PM, Joachim Schrod wrote:
> Could you please elaborate on that?
>
> Which facelets version executes the actionListener after the action?
>
> TIA for an answer,
>
> 	Joachim
>
> Luka Surija wrote:
>> f:setPropertyActionListener is executed before action,
>> but If you are using facelets depending on version
>> it is executed before or after actionListener
>>
>> Luka Surija
>>
>> +385 1 61 99 140
>> +385 91 61 99 140
>> luka@iytim.hr
>>
>> I.Y. tim d.o.o.
>> Nova cesta 171a, HR-10000 Zagreb
>> www.iytim.hr
>> info@iytim.hr
>>
>>
>> On 05/05/2011 05:18 PM, Walter Mourão wrote:
>>> Hi folks,
>>> I'm 99% sure the f:setPropertyActionListener is being executed after the
>>> action, in the following code:
>>>
>>>           <tr:commandLink
>>> action="#{visualizarRelatorioController.visualizandoRelatorioMudarPagina}"
>>>
>>> disabled="#{visualizarRelatorioVisualizandoRelatorioMudarPaginaForm.paginaAtual
>>>
>>> le 1}">
>>>               <tr:image source="/images/arrow-previous.gif"
>>> shortDesc="#{messages['pagina.anterior']}"
>>> inlineStyle="border-style:none"
>>> />
>>>               <f:setPropertyActionListener
>>> value="#{visualizarRelatorioVisualizandoRelatorioMudarPaginaForm.paginaAtual
>>>
>>> - 1}"
>>> target="#{visualizarRelatorioVisualizandoRelatorioMudarPaginaForm.paginaAtual}"
>>>
>>> />
>>>           </tr:commandLink>
>>>
>>>
>>> Does it make sense ?
>>>
>>> I'm using Myfaces 1.2.9 + Trinidad 1.2.14
>>>
>>> Thanks,
>>>
>>> Walter Mourão
>>> http://waltermourao.com.br
>>> http://arcadian.com.br
>>> http://oriens.com.br
>>>
>
>
> 	Joachim
>

Re: f:setPropertyActionListener executed after action

Posted by Walter Mourão <wa...@gmail.com>.
About the original question, it was a bug in my code. No problem with
f:setPropertyActionListener.

Walter Mourão
http://waltermourao.com.br
http://arcadian.com.br
http://oriens.com.br



On Sat, May 14, 2011 at 11:48 AM, Joachim Schrod <js...@acm.org> wrote:

>
> Could you please elaborate on that?
>
> Which facelets version executes the actionListener after the action?
>
> TIA for an answer,
>
>        Joachim
>
> Luka Surija wrote:
> > f:setPropertyActionListener is executed before action,
> > but If you are using facelets depending on version
> > it is executed before or after actionListener
> >
> > Luka Surija
> >
> > +385 1 61 99 140
> > +385 91 61 99 140
> > luka@iytim.hr
> >
> > I.Y. tim d.o.o.
> > Nova cesta 171a, HR-10000 Zagreb
> > www.iytim.hr
> > info@iytim.hr
> >
> >
> > On 05/05/2011 05:18 PM, Walter Mourão wrote:
> >> Hi folks,
> >> I'm 99% sure the f:setPropertyActionListener is being executed after the
> >> action, in the following code:
> >>
> >>          <tr:commandLink
> >>
> action="#{visualizarRelatorioController.visualizandoRelatorioMudarPagina}"
> >>
> >>
> disabled="#{visualizarRelatorioVisualizandoRelatorioMudarPaginaForm.paginaAtual
> >>
> >> le 1}">
> >>              <tr:image source="/images/arrow-previous.gif"
> >> shortDesc="#{messages['pagina.anterior']}"
> >> inlineStyle="border-style:none"
> >> />
> >>              <f:setPropertyActionListener
> >>
> value="#{visualizarRelatorioVisualizandoRelatorioMudarPaginaForm.paginaAtual
> >>
> >> - 1}"
> >>
> target="#{visualizarRelatorioVisualizandoRelatorioMudarPaginaForm.paginaAtual}"
> >>
> >> />
> >>          </tr:commandLink>
> >>
> >>
> >> Does it make sense ?
> >>
> >> I'm using Myfaces 1.2.9 + Trinidad 1.2.14
> >>
> >> Thanks,
> >>
> >> Walter Mourão
> >> http://waltermourao.com.br
> >> http://arcadian.com.br
> >> http://oriens.com.br
> >>
> >
>
>
>
>         Joachim
>
> --
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> Joachim Schrod                          Email: jschrod@acm.org
> Roedermark, Germany
>
>

Re: f:setPropertyActionListener executed after action

Posted by Joachim Schrod <js...@acm.org>.
Could you please elaborate on that?

Which facelets version executes the actionListener after the action?

TIA for an answer,

	Joachim

Luka Surija wrote:
> f:setPropertyActionListener is executed before action,
> but If you are using facelets depending on version
> it is executed before or after actionListener
> 
> Luka Surija
> 
> +385 1 61 99 140
> +385 91 61 99 140
> luka@iytim.hr
> 
> I.Y. tim d.o.o.
> Nova cesta 171a, HR-10000 Zagreb
> www.iytim.hr
> info@iytim.hr
> 
> 
> On 05/05/2011 05:18 PM, Walter Mourão wrote:
>> Hi folks,
>> I'm 99% sure the f:setPropertyActionListener is being executed after the
>> action, in the following code:
>>
>>          <tr:commandLink
>> action="#{visualizarRelatorioController.visualizandoRelatorioMudarPagina}"
>>
>> disabled="#{visualizarRelatorioVisualizandoRelatorioMudarPaginaForm.paginaAtual
>>
>> le 1}">
>>              <tr:image source="/images/arrow-previous.gif"
>> shortDesc="#{messages['pagina.anterior']}"
>> inlineStyle="border-style:none"
>> />
>>              <f:setPropertyActionListener
>> value="#{visualizarRelatorioVisualizandoRelatorioMudarPaginaForm.paginaAtual
>>
>> - 1}"
>> target="#{visualizarRelatorioVisualizandoRelatorioMudarPaginaForm.paginaAtual}"
>>
>> />
>>          </tr:commandLink>
>>
>>
>> Does it make sense ?
>>
>> I'm using Myfaces 1.2.9 + Trinidad 1.2.14
>>
>> Thanks,
>>
>> Walter Mourão
>> http://waltermourao.com.br
>> http://arcadian.com.br
>> http://oriens.com.br
>>
> 



	Joachim

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Joachim Schrod				Email: jschrod@acm.org
Roedermark, Germany


Re: f:setPropertyActionListener executed after action

Posted by Luka Surija <lu...@iytim.hr>.
f:setPropertyActionListener is executed before action,
but If you are using facelets depending on version
it is executed before or after actionListener

Luka Surija

+385 1 61 99 140
+385 91 61 99 140
luka@iytim.hr

I.Y. tim d.o.o.
Nova cesta 171a, HR-10000 Zagreb
www.iytim.hr
info@iytim.hr


On 05/05/2011 05:18 PM, Walter Mourão wrote:
> Hi folks,
> I'm 99% sure the f:setPropertyActionListener is being executed after the
> action, in the following code:
>
>          <tr:commandLink
> action="#{visualizarRelatorioController.visualizandoRelatorioMudarPagina}"
> disabled="#{visualizarRelatorioVisualizandoRelatorioMudarPaginaForm.paginaAtual
> le 1}">
>              <tr:image source="/images/arrow-previous.gif"
> shortDesc="#{messages['pagina.anterior']}" inlineStyle="border-style:none"
> />
>              <f:setPropertyActionListener
> value="#{visualizarRelatorioVisualizandoRelatorioMudarPaginaForm.paginaAtual
> - 1}"
> target="#{visualizarRelatorioVisualizandoRelatorioMudarPaginaForm.paginaAtual}"
> />
>          </tr:commandLink>
>
>
> Does it make sense ?
>
> I'm using Myfaces 1.2.9 + Trinidad 1.2.14
>
> Thanks,
>
> Walter Mourão
> http://waltermourao.com.br
> http://arcadian.com.br
> http://oriens.com.br
>