webtier@glassfish.java.net

Re: [webtier] Re: Passing ajax listener into a component

From: Edward Burns <edward.burns_at_oracle.com>
Date: Sun, 02 May 2010 15:46:17 -0400

On 5/1/10 20:11 , Joel Weight wrote:
> Ok, I'm a n00b. I should have just setup the control that provides the
> action as an action source and let the component client attach their own
> action listener rather than trying to pass the action listener in as an
> attribute of the component.
>
> Joel
>
> On Sat, May 1, 2010 at 5:08 PM, Joel Weight <digitaljoel_at_gmail.com
> <mailto:digitaljoel_at_gmail.com>> wrote:
>
> Thanks for the reply Ed. The code you point to is for actions, not
> actionListener. I agree that there shouldn't be any difference, but
> it seems there is. I'm easily able to successfully specify an
> action as a composite component attribute with a method-signature,
> but with the code in my first post, I wasn't able to do the same for
> an actionListener.

The following attributes are handled for you automatically, you don't
need to declare them:

      * <li>action</li>
      * <li>actionListener</li>
      * <li>validator</li>
      * <li>valueChangeListener</li>

Therefore, you should be able to do the same thing as in my action
example with actionListener, provided you are ok using "actionListener"
as the attribute name.

Ed