Skip to main content

Composite component bean class as attribute

3 replies [Last post]
b_b
Offline
Joined: 2009-05-18
Points: 0

Is it possible to send only bean class to composite component as attribute and set method attributes in composite component? I have found Ed Burns comment on Jim Driscoll blog http://weblogs.java.net/blog/driscoll/archive/2008/12/jsf_20_wiring_u_1..... He claims that this is possible.

EXAMPLE:

The interface declaration would then look like:

I have try it but as attribute value in composite component I get actual class name (like ezcomp.InOutBean@15b1773).

I think it is better to send only backing bean class as attribute to composite component and set method names and field values there.

Thanks in advance.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Jim Driscoll

Have you checked out my followup blog on the same topic? It's here:

http://weblogs.java.net/blog/driscoll/archive/2009/01/jsf_20_a_compon.html

Without trying your example myself, it's hard to say what error you're
getting. Are you referencing the "controller" attribute to get the
class name? Why? You should instead by referencing the
cc.attrs.controller.selected1 attribute, right?

Jim

On 5/20/09 7:48 AM, webtier@javadesktop.org wrote:
> Is it possible to send only bean class to composite component as attribute and set method attributes in composite component? I have found Ed Burns comment on Jim Driscoll blog http://weblogs.java.net/blog/driscoll/archive/2008/12/jsf_20_wiring_u_1..... He claims that this is possible.
>
> EXAMPLE:
>
>
> The interface declaration would then look like:
>
> > displayName="Switchlist Component"
> shortDescription="A basic example of the composite component feature">
>
>
>
>
>
>
>
>
>

>

>
> I have try it but as attribute value in composite component I get actual class name (like ezcomp.InOutBean@15b1773).
>
> I think it is better to send only backing bean class as attribute to composite component and set method names and field values there.
>
> Thanks in advance.
> [Message sent by forum member 'b_b' (b_b)]
>
> http://forums.java.net/jive/thread.jspa?messageID=347007
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: webtier-help@glassfish.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net

b_b
Offline
Joined: 2009-05-18
Points: 0

Yes, you are right.
I have call controller "child" attributes directly:


it should be accessed as:


Thanks for help.

Ed Burns

>>>>> On Fri, 22 May 2009 01:48:07 -0700 (PDT), webtier@javadesktop.org said:

B_B> Yes, you are right.
B_B> I have call controller "child" attributes directly:
B_B>
B_B>
B_B>

Also, in JSF 2.0 final, you'd write cc.attrs instead of
compositeComponent.attrs

--
| ed.burns@sun.com | office: 408 884 9519 OR x31640
| homepage: | http://ridingthecrest.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net