[jsr-314-open] <h:dataTable> binding vs. ui:repeat

Lincoln Baxter, III lincolnbaxter at gmail.com
Sat Sep 5 12:03:56 EDT 2009


First, please let me know if there is a better place to ask JSF Dev
related questions.

Question for you all: I could use some help.

I'm testing my listener changes with the new EL2 (and also Seam EL just
in case)-- I wanted to make sure that parameters can be passed through
the EL action MethodExpression.

It seems as though parameters work fine in general, but if the parameter
is cc.attrs.* --- EL resolves the param values to null.

So:
    #{myObject} -- works if in scope, as it should
    #{cc.attrs.myObject} -- null, even though it's passed in from
#{myObject} as an attribute.

UICommand components seem to have no trouble with resolving cc.attrs.*,
though.

Any thoughts? I've attached the modified source files in case anyone
wants to take a look. I'm not sure if this is a larger problem, or if
I've just missed something.

Thanks,
Lincoln




On Fri, 2009-09-04 at 15:56 -0400, Andy Schwartz wrote:

> Ed Burns wrote:
> >>>>>> On Fri, 07 Aug 2009 08:31:51 +0200, Martin Marinschek <mmarinschek at apache.org> said:
> >>>>>>             
> >
> > MM> Hi Lincoln,
> >   
> >>> Unless I'm mistaken, ui:repeat is not a component and therefore cannot
> >>> be bound to a backing bean,
> >>>       
> >
> > MM> I thought it was - and just checked, it derives from UIComponentBase.
> > MM> Does the binding attribute not work for you?
> >
> > Yes, but it's implementation specific and not in the
> > javax.faces.component package.
> >
> >   
> 
> Ah, interesting.  In Trinidad we have a common base class for components 
> that iterate over a collection:
> 
> http://myfaces.apache.org/trinidad/trinidad-api/apidocs/org/apache/myfaces/trinidad/component/UIXCollection.html
> 
> This is used as the base for both UIXIterator (Trinidad equivalent of 
> ui:repeat) and UIXTable (Trinidad equivalent for UIData).  Perhaps for 
> 2.1 we should consider surfacing a similar base class/contract, along 
> with a public UIRepeat component.
> 
> 
> Andy
> 

--
Lincoln Baxter, III
Co-Founder of OcpSoft
Author of PrettyFaces URL Rewriting for JSF


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jsr-314-open-mirror/attachments/20090905/580e6af4/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ActionListenerHandler.java
Type: text/x-java
Size: 9153 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/jsr-314-open-mirror/attachments/20090905/580e6af4/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ValueChangeListenerHandler.java
Type: text/x-java
Size: 9020 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/jsr-314-open-mirror/attachments/20090905/580e6af4/attachment-0001.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ActionListenerTag2.java
Type: text/x-java
Size: 10581 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/jsr-314-open-mirror/attachments/20090905/580e6af4/attachment-0002.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ValueChangeListenerTag.java
Type: text/x-java
Size: 11280 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/jsr-314-open-mirror/attachments/20090905/580e6af4/attachment-0003.bin 


More information about the jsr-314-open-mirror mailing list