struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig McClanahan" <craig...@apache.org>
Subject Re: [Shale] Component name of f:facet
Date Sun, 09 Apr 2006 00:27:20 GMT
On 4/8/06, Hermod Opstvedt <hermod@opstvedt.com> wrote:
>
> Hi
>
> I am almost done with at list that has a t:dataScroller attached to it
> (ref.
> the datascroller example of the MyFaces simple webapp). There they have :
>         <h:panelGrid columns="1" styleClass="scrollerTable2"
> columnClasses="standardTable_ColumnCentered" >
>             <t:dataScroller id="scroll_1"
>                     for="data"
>                     fastStep="10"
>                     pageCountVar="pageCount"
>                     pageIndexVar="pageIndex"
>                     styleClass="scroller"
>                     paginator="true"
>                     paginatorMaxPages="9"
>                     paginatorTableClass="paginator"
>                     paginatorActiveColumnStyle="font-weight:bold;"
>                     actionListener="#{scrollerList.scrollerAction}"
>                     >
>                 <f:facet name="first" >
>                     <t:graphicImage url="images/arrow-first.gif"
> border="1"
> />
>                 </f:facet>
>
> ....
>
> Since facet is not defined in the shale-clay clay-config.xml file, I added
> a
> definition in mine to just get going:
> <component jsfid="facet" extends="baseHtml"
> componentType="javax.faces.HtmlOutputText">
>   <attributes>
>         <set name="name" bindingType="VB" />
>   </attributes>
> </component>
>
> Abviously it does not render in the same way as f:facet in MyFaces does.
> So
> I tried to track down what componentType this is, but have come up with
> nothing so far.


The <f:facet> tag is not actually a component tag at all ... it's just a way
to attach a facet component to an owning component.  Therefore, facets do
not participate in the tree walk that causes the view to be rendered.
Anything done with a facet is the responsibility of the owning component.

Essentially, <f:facet> is just the equivalent of the following programmatic
actions:

    UIComponent owner = ... // Create the owning component somehow
    UIComponent facet = ... // Create the facet somehow
    owner.getFacets().put("facetName", facet);

Anybody know ?
>
> Hermod


Craig

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message