Skip to main content

[webtier] Re: f:actionListener for composite bug?

6 replies [Last post]
Anonymous

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Anonymous
Ed Burns

>>>>> On Sun, 22 Feb 2009 18:07:37 -0800, Ed Burns said:

>>>>> On Wed, 11 Feb 2009 09:05:44 -0800, Ed Burns said:
>>>>> On Tue, 10 Feb 2009 17:43:03 -0700, David Geary said:
DG> Hi Ed,
DG> I'm having the same problem as these guys:
DG> . I have an
DG> f:actionListener on a composite component, and the listener is never
DG> called. I tried both the binding and type attributes, but neither
DG> works.

Actually, Ryan suggested a more appropriate fix, which I've documented
in the tlddocs for composite:interface:

Naming containers within composite components

Composite components are themselves naming containers so that any
possible id conflicts between inner components and components in the
using page are avoided. However, special care must be taken when using
naming containers in the section. In such
cases the ?targets? attribute must be used with a clientId relative to
the top level component to expose any attached object targets to the
using page. For example:

Using page




loginButton.xhtml






Because the button on line 8 resides within a form, it must be referred
to using the "targets" attribute on line 2. Simply using the "name"
attribute is not sufficient because "name" is always interprented as a
simple component id, whereas the elements of the "targets" attribute are
interpreted as client ids, relative to the top level component.

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

Anonymous
Ed Burns

>>>>> On Tue, 24 Feb 2009 09:13:20 -0700, David Geary said:

>>
>>  

DG> This needs a type or binding attribute, correct?

Ahh, thanks. I have fixed the docs.

>>
>> loginButton.xhtml
>>
>>
>>  
>>

>>
>>
>>
>>  
>>    
>>  

>>

DG> Where is loginAction in the defining page? If this is from the
DG> tlddocs, as you indicate above, I think it's confusing.

Thanks, should be "button". I've fixed it.

>> Because the button on line 8 resides within a form, it must be referred
>> to using the "targets" attribute on line 2. Simply using the "name"
>> attribute is not sufficient because "name" is always interprented as a
>> simple component id, whereas the elements of the "targets" attribute are
>> interpreted as client ids, relative to the top level component.

DG> But with the build that I'm using (the one you sent me, Ryan), this works:

DG> Defining page:

DG>
DG>
DG>

DG> Using page:

DG> DG> type="com.corejsf.LoginActionListener" />

DG> Here, the name is not just a simple component id.

Sure, it works with "name" but you wouldn't want to publish
"form:loginAction" as an attached object target? I mean, you could, but
it would be not as nice as publishing something cleaner as "name" and
using "targets" to specifically point to the inner component.

Ed

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

Lincoln Baxter, III

Hi All,

I've got a bean that is building a list of components, and I want to add
them to the display tree using a , but I'm having some
trouble. I can't get them to render.

  • The components are simple HtmlOutputText components built dynamically in
    Java. What is the best way to get these to be included as part of the
    View?

    Thanks,
    Lincoln
    [att1.html]

    Ryan Lubke

    On 2/24/09 8:41 PM, Lincoln Baxter, III wrote:
    > Hi All,
    >
    > I've got a bean that is building a list of components, and I want to
    > add them to the display tree using a , but I'm having some
    > trouble. I can't get them to render.
    >
    >
    >

  • >
    >
    > The components are simple HtmlOutputText components built dynamically
    > in Java. What is the best way to get these to be included as part of
    > the View?
    >
    I would recommend using c:forEach.
    > Thanks,
    > Lincoln

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