Hi Volker,

as I read in Bergsten's JSF book, JSF distinguishes between a table header
facet and column header facets.

- table header facet: rendered as one <th> element (with a colspan attribute
set to the number of children) within a <tr> element
- column header facets: rendered as <th> elements within a separate <tr>
element
-> a <thead> element encloses both header <tr> elements

Looks like the column header facets are what I searched for, and the facet
elements are used as children of the column elements.

But columns are not explicitely used with a panelGrid... and column header
facets are not supported, as you already mentioned:

> >>according to the sun spec this is not possible for h:panelGrid:
>
>>http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/tlddocs/h/panelGrid.h
tml


Is there any way out when programmatically creating the UI? Maybe I can use
a HtmlDataTable, but I don't know if this is possible because I don't have a
simple list of objects to iterate over. I need to add a HtmlOutputText
component in the first column (it's value may be fetched from an object of
the data set) and radiobuttons (with spread layout) in the remaining
columns.


Regards,

Matthias

> -----Ursprüngliche Nachricht-----
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Auftrag
> von Matthias Kahlau
> Gesendet: Freitag, 3. Februar 2006 16:24
> An: MyFaces Discussion
> Betreff: AW: AW: AW: Panel Grid custom component
>
>
> 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/fac
> es/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.

Reply via email to