webtier@glassfish.java.net

Re: [webtier] JSF2 Register a SetPropertyActionListener on Ajax Event?

From: <lincolnbaxter_at_gmail.com>
Date: Mon, 27 Apr 2009 16:54:51 +0000

Yeah, sorry I copied the wrong example... But basically I'd like to know if something like this is possible to use setpropertyactionlistener on a value change event. Ive tried nesting it within the actionlistener tag; that didn't throw an exception, but it didn't do much of anything else either.

Suggestions? Its the outcome/behavior that I'm interested in, not the specific implementation.
 
New snippit...

 <f:ajax execute="assignee"> <ocp:inputOutputSelectOneMenu id="assignee"
 value="#{task.assignee}"
 editable="#{authorizationBean.isMember and task.status ne 'DONE'}"
 autocomplete="off" items="${viewStoryBean.members}">
 <f:valueChangeListener for="value"
 binding="#{taskAssigneeListener}">

 <f:setPropertyActionListener value="#{task}"
 target="#{taskAssigneeListener.currentTask}" />


 </f:valueChangeListener>
 </ocp:inputOutputSelectOneMenu>
 </f:ajax>
 




Sent from my Verizon Wireless BlackBerry

-----Original Message-----
From: Ryan Lubke <Ryan.Lubke_at_Sun.COM>

Date: Mon, 27 Apr 2009 09:10:31
To: <webtier_at_glassfish.dev.java.net>
Subject: Re: [webtier] JSF2 Register a SetPropertyActionListener on Ajax Event?

On 4/25/09 8:20 PM, Lincoln Baxter, III wrote:
> Hi again JSF folks. I'm trying to do the following: ... but I can't
> find an incantation that works.
> I've tried putting <f:setPropertyActionListener> all over the place,
> but the value is never getting set into my target... is this something
> that is supported?
Based on this snippet, I would expect an exception to be thrown.
<f:setPropertyActionListener> should be nested within an ActionSource.
>
> Thanks,
> Lincoln
>
> <f:ajax execute="assignee">
> <f:setPropertyActionListener value="#{task}"
> target="#{taskAssigneeListener.currentTask}" />
> <ocp:inputOutputSelectOneMenu id="assignee"
> value="#{task.assignee}"
> editable="#{authorizationBean.isMember and task.status ne 'DONE'}"
> autocomplete="off" items="${viewStoryBean.members}">
> <f:valueChangeListener for="value"
> binding="#{taskAssigneeListener}">
> </f:valueChangeListener>
> </ocp:inputOutputSelectOneMenu>
> </f:ajax>