You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "Miller, John" <jm...@litle.com> on 2005/12/06 20:21:57 UTC

Error adding dataScroller before my UIData

I need to add a dataScroller to both the top and bottom of my dataTable.
However I get an exception when putting it before the dataTable is
defined (i.e. in the header) saying it cant find the UIData element.
Does anyone know the solution for this (other than adding it after the
datatable and using stylesheet positioning.... I really am not
interested in that solution) 
 
 
 
NOTICE:  This message, including all attachments transmitted with it, is for the use of the addressee only. It may contain proprietary, confidential and/or legally privileged information belonging to Litle & Co. No confidentiality or privilege is waived or lost by any mistransmission. If you are not the intended recipient, you must not, directly or indirectly, use, disclose, distribute, print or copy any part of this message.  If you believe you have received this message in error, please delete it and all copies of it from your system and notify the sender immediately by reply e-mail.  Thank you. 

Re: Error adding dataScroller before my UIData

Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi!
>
> I need to add a dataScroller to both the top and bottom of my 
> dataTable. However I get an exception when putting it before the 
> dataTable is defined (i.e. in the header) saying it cant find the 
> UIData element. Does anyone know the solution for this (other than 
> adding it after the datatable and using stylesheet positioning…. I 
> really am not interested in that solution)
>
I am not sure if this is the same problem, but try putting these three 
components into an panelGrid, looks like this has something to do with 
how jsp processes tags and this might be a workaround for it (see WARN 
[HtmlLabelRenderer] thread)

---
Mario


Re: Error adding dataScroller before my UIData

Posted by Simon Kitching <sk...@obsidium.com>.
Simon Kitching wrote:
> Miller, John wrote:
>> I need to add a dataScroller to both the top and bottom of my 
>> dataTable. However I get an exception when putting it before the 
>> dataTable is defined (i.e. in the header) saying it cant find the 
>> UIData element. Does anyone know the solution for this (other than 
>> adding it after the datatable and using stylesheet positioning…. I 
>> really am not interested in that solution)
> 
> This is a fundamental issue with JSP/JSF: that components are both 
> created and rendered in a single pass through a JSP page.
> 
> You could try enclosing the table & scroller components in some parent 
> component which "renders its children", eg an h:panelGroup. This should 
> cause the child components to all be created first before any rendering 
> (which does the id lookup) occurs. If this works, please reply to the 
> list to let us know.

Just for future searchers of this list, John Miller has reported (in 
another thread) that wrapping the 2 dataScrollers + 1 dataTable within 
"another JSF component" has resolved the issue with having "forward 
references" from the dataScroller component to the dataTable component. 
Presumably that "other component" is a panelGroup or similar component 
that renders its children.

Cheers,

Simon

Re: Error adding dataScroller before my UIData

Posted by Simon Kitching <sk...@obsidium.com>.
Miller, John wrote:
> I need to add a dataScroller to both the top and bottom of my dataTable. 
> However I get an exception when putting it before the dataTable is 
> defined (i.e. in the header) saying it cant find the UIData element. 
> Does anyone know the solution for this (other than adding it after the 
> datatable and using stylesheet positioning…. I really am not interested 
> in that solution)

This is a fundamental issue with JSP/JSF: that components are both 
created and rendered in a single pass through a JSP page.

You could try enclosing the table & scroller components in some parent 
component which "renders its children", eg an h:panelGroup. This should 
cause the child components to all be created first before any rendering 
(which does the id lookup) occurs. If this works, please reply to the 
list to let us know.

Note that components which render their children cannot have "template 
text" (raw text or JSP tags) in them; any plain text must be wrapped in 
f:verbatim or similar.

Or you could avoid using JSP. Alternatives include Facelets and Clay.

Regards,

Simon