Skip to main content

[webtier] JSF2 Register a SetPropertyActionListener on Ajax Event?

5 replies [Last post]
Anonymous

Hi again JSF folks. I'm trying to do the following: ... but I can't find
an incantation that works.
I've tried putting all over the place, but
the value is never getting set into my target... is this something that
is supported?

Thanks,
Lincoln

[att1.html]

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Lincoln Baxter, III

On Mon, 2009-04-27 at 10:06 -0700, Ryan Lubke wrote:

> Couldn't the same logic be performed within the VCL implementation?

How can you set an object with a ViewChangeListener in this type of
scenario? I have a property, its old value, and its new value, but I
don't have the object itself.

#{task} is a Task class object var from a

>
> > value="#{task.assignee}" editable="#{authorizationBean.isMember and
> task.status ne 'DONE'}" autocomplete="off"
> items="${viewStoryBean.members}">
> > binding="#{taskAssigneeListener}">
> > target="#{taskAssigneeListener.currentTask}" />
>

>

>

[att1.html]

Ryan Lubke

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 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.
should be nested within an ActionSource.
>
> Thanks,
> Lincoln
>
>
> > target="#{taskAssigneeListener.currentTask}" />
> > value="#{task.assignee}"
> editable="#{authorizationBean.isMember and task.status ne 'DONE'}"
> autocomplete="off" items="${viewStoryBean.members}">
> > binding="#{taskAssigneeListener}">
>

>

>

[att1.html]

lincolnbaxter@gmail.com

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...

value="#{task.assignee}"
editable="#{authorizationBean.isMember and task.status ne 'DONE'}"
autocomplete="off" items="${viewStoryBean.members}">
binding="#{taskAssigneeListener}">

target="#{taskAssigneeListener.currentTask}" />



Sent from my Verizon Wireless BlackBerry

-----Original Message-----
From: Ryan Lubke

Date: Mon, 27 Apr 2009 09:10:31
To:
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 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.
should be nested within an ActionSource.
>
> Thanks,
> Lincoln
>
>
> > target="#{taskAssigneeListener.currentTask}" />
> > value="#{task.assignee}"
> editable="#{authorizationBean.isMember and task.status ne 'DONE'}"
> autocomplete="off" items="${viewStoryBean.members}">
> > binding="#{taskAssigneeListener}">
>

>

>

[att1.html]

Ryan Lubke

On 4/27/09 9:54 AM, lincolnbaxter@gmail.com wrote:
> 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.
No, the purpose of setPropertyActionListener is to register an
ActionListener with the parent ActionSource component.
>
> Suggestions? Its the outcome/behavior that I'm interested in, not the
> specific implementation.
Couldn't the same logic be performed within the VCL implementation?
>
> New snippit...
>
> > value="#{task.assignee}"
> editable="#{authorizationBean.isMember and task.status ne 'DONE'}"
> autocomplete="off" items="${viewStoryBean.members}">
> > binding="#{taskAssigneeListener}">
>
> > target="#{taskAssigneeListener.currentTask}" />
>
>
>

>

>

>
>
>
>
> Sent from my Verizon Wireless BlackBerry
>
> ------------------------------------------------------------------------
> *From*: Ryan Lubke
> *Date*: Mon, 27 Apr 2009 09:10:31 -0700
> *To*:
> *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 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.
> should be nested within an ActionSource.
>>
>> Thanks,
>> Lincoln
>>
>>
>> >> target="#{taskAssigneeListener.currentTask}" />
>> >> value="#{task.assignee}"
>> editable="#{authorizationBean.isMember and task.status ne 'DONE'}"
>> autocomplete="off" items="${viewStoryBean.members}">
>> >> binding="#{taskAssigneeListener}">
>>

>>

>>

>

[att1.html]

lincolnbaxter@gmail.com

" Couldn't the same logic be performed within the VCL implementation?"

Setpropertyactionlistener allows you to iterate over a list and set the correct value into a bean when the triggered action occurrs. (the reason iterating over a list is important is because if there were only one item, then I could load the value via another method.) How can I do that with a valueChangeListener? f:param?

Am I missing something basic here? I feel like there should be an easy way to do this, but that I'm not figuring it out.

Thanks,
Lincoln

Sent from my Verizon Wireless BlackBerry

-----Original Message-----
From: Ryan Lubke

Date: Mon, 27 Apr 2009 10:06:57
To:
Subject: Re: [webtier] JSF2 Register a SetPropertyActionListener on Ajax Event?

On 4/27/09 9:54 AM, lincolnbaxter@gmail.com wrote:
> 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.
No, the purpose of setPropertyActionListener is to register an
ActionListener with the parent ActionSource component.
>
> Suggestions? Its the outcome/behavior that I'm interested in, not the
> specific implementation.
Couldn't the same logic be performed within the VCL implementation?
>
> New snippit...
>
> > value="#{task.assignee}"
> editable="#{authorizationBean.isMember and task.status ne 'DONE'}"
> autocomplete="off" items="${viewStoryBean.members}">
> > binding="#{taskAssigneeListener}">
>
> > target="#{taskAssigneeListener.currentTask}" />
>
>
>

>

>

>
>
>
>
> Sent from my Verizon Wireless BlackBerry
>
> ------------------------------------------------------------------------
> *From*: Ryan Lubke
> *Date*: Mon, 27 Apr 2009 09:10:31 -0700
> *To*:
> *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 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.
> should be nested within an ActionSource.
>>
>> Thanks,
>> Lincoln
>>
>>
>> >> target="#{taskAssigneeListener.currentTask}" />
>> >> value="#{task.assignee}"
>> editable="#{authorizationBean.isMember and task.status ne 'DONE'}"
>> autocomplete="off" items="${viewStoryBean.members}">
>> >> binding="#{taskAssigneeListener}">
>>

>>

>>

>

[att1.html]