myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Kienenberger <mkien...@gmail.com>
Subject Re: updateActionListener in JSF 1.2 - exec before outer action possible?
Date Wed, 16 Dec 2009 14:54:04 GMT
Sorry, that last example should have been:

		<h:commandButton action="#{test.doItTest1}" actionListener="#{test.execute}">
		 <t:updateActionListener property="#{test.stringValue}" value="one"/>
		 <t:updateActionListener property="#{test.stringValue}" value="two"/>
		</h:commandButton>

I cut and paste the wrong part of the page code.


On Wed, Dec 16, 2009 at 9:46 AM, Mike Kienenberger <mkienenb@gmail.com> wrote:
> I am using Myfaces Core 1.2.8, Facelets 1.1.14, and Myfaces Tomahawk 1.1.9.
>
> I'm not seeing the problems you are having.  Perhaps it is because of facelets.
>
> I wrote some simple tests, and here's what I got for the most complicated one:
>
>                <h:commandButton action="#{test.doItTest1}" actionListener="#{test.execute}">
>                 <f:setPropertyActionListener target="#{test.stringValue}"
value="one"/>
>                 <f:setPropertyActionListener target="#{test.stringValue}"
value="two"/>
>                </h:commandButton>
>
> TestBean: execute()
> TestBean: setStringValue()=one
> TestBean: setStringValue()=two
> TestBean: doItTest1()
>
> If you have something specific, I'll give that a try, but I started
> with your original examples.
>
>
> I mixed in some t:updateALs, and the only thing that didn't work was
> multiple t:UALs.  Another reason not to use it.
>
>                <h:commandButton action="#{test.doItTest1}">
>                 <f:setPropertyActionListener target="#{test.stringValue}"
value="one"/>
>                 <f:setPropertyActionListener target="#{test.stringValue}"
value="two"/>
>                </h:commandButton>
>
> TestBean: execute()
> TestBean: setStringValue()=one
> TestBean: doItTest1()
>
>
> On Wed, Dec 16, 2009 at 5:51 AM, Michael Heinen
> <michael.heinen@recommind.com> wrote:
>> Hi,
>>
>> What's the recommended migration for tomahawk updateActionListener from JSF 1.1 to
1.2? I did not find any helpful hints so far.
>>
>> In JSF 1.1 the updateActionListener was called before the Action/ActionListener of
the outer command.
>> In JSF 1.2 the order has changed apparently. The component actionListener is invoked
and then nested actionListeners.
>>
>> f:setPropertyActionListener can be used but it is called after the outer command.
>> And the outer command is called twice in my case.
>>
>> Is f:actionListener an alternative for Actions (not ActionListeners)? I didn't get
this working.
>>
>> JSF 1.1:
>> <t:commandButton id="acmd1" actionListener="#{MyController.doIt}"
>>  <t:updateActionListener property="#{MyController.stateId}" value="bean.value"/>
>> </tcommandButton>
>>
>> Flow:
>> MyController.setStateId()
>> MyController.doIt()
>>
>> JSF 1.2
>> <t:commandLink id="acmd1" action="#{MyController.doIt}">
>>  <f:setPropertyActionListener target="#{MyController.stateId}" value="#{bean.value}"/>
>> </t:commandLink>
>>
>> Flow:
>> MyController.doIt()
>> MyController.setStateId()
>> MyController.doIt()
>>
>> How did other people solve this?
>>
>> Michael
>>
>

Mime
View raw message