Hi,
the header facet of a UIData renders a common header over all columns,
To render a header for each column you must set a header facet on the
column component.
See:
http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/tlddocs/h/dataTable.html
So you are right, in this point UIData and panelGrid are similar, but i
think this are not the headers you want.
Regards,
Volker
Matthias Kahlau wrote:
> Ok,
>
> but with a dataTable, there's a similar problem. Both HtmlDataTable and
> HtmlPanelGrid are subclasses of UIComponentBase, and facet related methods
> are defined in this superclass (e. g. getFacets()).
>
> UIData does additionally provide convenience methods for setting the header
> and the footer, as you can read in the API doc of UIData:
>
> public void setHeader(javax.faces.component.UIComponent header) Set the
> header facet of this component. A convenience method for
> getFacets().put("header", header).
>
> http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/api/javax/faces/compone
> nt/UIData.html#setHeader(javax.faces.component.UIComponent)
>
>
> That looks to me like the facet thing of HtmlPanelGrid and HtmlDataTable is
> the same...
>
>
>
> Regards,
>
> Matthias
>
>
>
>>-----Ursprüngliche Nachricht-----
>>Von: [EMAIL PROTECTED]
>>[mailto:[EMAIL PROTECTED] Auftrag
>>von Volker Weber
>>Gesendet: Freitag, 3. Februar 2006 16:04
>>An: MyFaces Discussion
>>Betreff: Re: AW: AW: Panel Grid custom component
>>
>>
>>Hi,
>>
>>the masterDetail example uses dataTable not panelGrid.
>>
>>
>>Matthias Kahlau wrote:
>>
>>>Thanks Volker,
>>>
>>>you can take a look at the following example:
>>>
>>>http://www.irian.at/myfaces/masterDetail.jsf
>>>
>>>
>>>When you look at the source code, you can see that the <f:facet
>>>name="header"> ... </f:facet> element is used in more than one column.
>>>
>>>
>>>
>>>Regards,
>>>
>>>Matthias
>>>
>>>
>>>
>>>
>>>
>>>>-----Ursprüngliche Nachricht-----
>>>>Von: [EMAIL PROTECTED]
>>>>[mailto:[EMAIL PROTECTED] Auftrag
>>>>von Volker Weber
>>>>Gesendet: Freitag, 3. Februar 2006 13:03
>>>>An: MyFaces Discussion
>>>>Betreff: Re: AW: Panel Grid custom component
>>>>
>>>>
>>>>Hi Matthias,
>>>>
>>>>no i don't know.
>>>>
>>>>according to the sun spec this is not possible for h:panelGrid:
>>>>http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/tlddocs/h/pan
>>>>elGrid.html
>>>>
>>>>and i don't find any hint to such an addition in the tomahawk
>>
>>version at:
>>
>>>>http://myfaces.apache.org/tlddoc/tomahawk/t/panelGrid.html
>>>>
>>>>But if you point me to a working example, and i can take a look at the
>>>>jsp sources i can figure out how to build it programatically.
>>>>
>>>>Regards
>>>> Volker
>>>>
>>>>Matthias Kahlau wrote:
>>>>
>>>>
>>>>>Hi Volker,
>>>>>
>>>>>
>>>>>do you know how to programmatically add a table header to the
>>>>
>>>>HtmlPanelGrid
>>>>
>>>>
>>>>>for each column?
>>>>>
>>>>>
>>>>>Regards,
>>>>>
>>>>>Matthias
>>>>>
>>>>>
>>>>
>>>>--
>>>>Don't answer to From: address!
>>>>Mail to this account are droped if not recieved via mailinglist.
>>>>To contact me direct create the mail address by
>>>>concatenating my forename to my senders domain.
>>>
>>>
>>--
>>Don't answer to From: address!
>>Mail to this account are droped if not recieved via mailinglist.
>>To contact me direct create the mail address by
>>concatenating my forename to my senders domain.
>
>
--
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by
concatenating my forename to my senders domain.