Hi,
Same problem for me with myfaces-1.1.3 and tomahawk-1.1.3
A workaround is to use BOTH rowStyleClass and rowStyle attributes with
the same values.
Regards,
Richard Capraro
2006/7/26, "R. Müller" <[EMAIL PROTECTED]>:
hi,
i got the same trouble, but without facelets!
i think its not related to facelets.
the behavior is much the same as described by Jason.
here are the facts :
-static values ends up in no attribute to <tr>
rowStyleClass="row0" --> <tr>
-dynamic values with EL-expression ends up in an empty attribute to <tr>
rowStyleClass="#{(index%2==0)?'row0':'row1'" --> <tr style="">
-multiple values (seperated by comma) behave like static (nothing)
rowStyleClass="row0, row1" --> <tr>
this happens with myfaces-1.1.3 and tomahawk-1.1.3 (of course).
my server is tomcat 5.0.27 and my vm is blackdown-java 1.4.2 for amd64.
on a gentoo-box.
all the other attributes are working well.
if i downgrade to myfaces-1.1.1 the following construction works well :
rowStyleClass="#{(index%2==0)?'row0':'row1'"
regards
ronald
Jason Long wrote:
> Is this a facelets bug, a problem with my setup, or a tomahawk bug?
>
>
>
> Any assistance will be greatly appreciated. I am migrating some
> functionality from Struts/Tiles to JSF/Facelets and cannot seem to get
> this piece functioning properly.
>
>
>
> *I am trying to apply style to rows in a tomahawk dataTable, but I
> cannot get it to work.*
>
>
>
> My dataTable is defined as follows:
>
>
>
> <t:dataTable id="data"
>
> var="offerPriceItem"
>
> value="#{offerPriceList}"
>
> rendered="true"
>
> styleClass="f_table"
>
> rowStyleClass="#{listOfferPrice.rowColor}"
>
> rowIndexVar="rowIndex"
>
> headerClass="f_title0">
>
>
>
> *I am using a taghandler from
> http://wiki.apache.org/myfaces/Use_Facelets_with_Tomahawk*
>
>
>
> package net.sf.jsfcomp.facelets.taghandlers.tomahawk;
>
>
>
> import org.apache.myfaces.shared_impl.renderkit.JSFAttr;
>
>
>
> import com.sun.facelets.tag.MetaRuleset;
>
> import com.sun.facelets.tag.jsf.ComponentConfig;
>
> import com.sun.facelets.tag.jsf.ComponentHandler;
>
>
>
> public class DataTableExTagHandler extends ComponentHandler
>
> {
>
> public DataTableExTagHandler(ComponentConfig cfg)
>
> {
>
> super(cfg);
>
> }
>
>
>
> @Override
>
> protected MetaRuleset createMetaRuleset(Class type)
>
> {
>
> System.out.println(type);
>
> return super.createMetaRuleset(type)
>
> .alias("rowId", JSFAttr.ROW_ID)
>
> .alias("rowStyleClass", JSFAttr.ROW_STYLECLASS_ATTR)
>
> .alias("rowStyle", JSFAttr.ROW_STYLE_ATTR);
>
> }
>
> }
>
>
>
> I declare it in my tag file as follows:
>
>
>
> <tag>
>
> <tag-name>dataTable</tag-name>
>
> <component>
>
>
> <component-type>org.apache.myfaces.HtmlDataTable</component-type>
>
> <renderer-type>org.apache.myfaces.Table</renderer-type>
>
>
>
<handler-class>net.sf.jsfcomp.facelets.taghandlers.tomahawk.DataTableExTagHandler</handler-class>
>
>
> </component>
>
> </tag>
>
>
>
> *If I comment out the handler-class from the tag file then the class is
> not rendered at all on the tr.*
>
> *If I include the handler-class I always get <tr class=""> no matter
> what I do.*
>
> * *
>
> *Does anyone have any example or advice on getting this working?*
>
--
*********************************************************
*M-Unicomp GmbH
*
*Dipl.-Ing. Ronald Müller
*Softwareentwicklung
*
*Plauener Straße 163-165, Haus 11
*13053 Berlin
*
*fon : +49 ( 0 ) 30 / 98 69 61 54
*mobil : +49 ( 0 ) 172 / 93 95 00 4
*fax : +49 ( 0 ) 30 / 98 69 61 55
*email : [EMAIL PROTECTED]
*web : www.unicomp-berlin.de
********************************************************