Hello,

 

my name is Bogdan Mocanu and I am working on a project for which I am using
Apache MyFaces 1.1.4 

and Tomahawk 1.1.5-SNAPSHOT. 

 

I am facing the following problem: the HTML code that Tomahawk generates for
its components contains, 

for some of the tags, CSS classes (which can be specified in the JSP) but
for the subtags of these tags

no CSS class is specified. To be more specific, consider the Calendar
component:

 

This code:

 

<t:inputCalendar 

        monthYearRowClass="yearMonthHeader" 

        weekRowClass="weekHeader"

        currentDayCellClass="currentDayCell" 

        value="#{calendarBean.firstDate}"/>

 

generates the following HTML code:

 

<table>

<tr class="yearMonthHeader">

  <td><a href=...>...</a></td>

  <td><a href=...>...</a></td>

  <td><a href=...>...</a></td>

</tr>

...

 

As you can see, the <tr> tag, which contains the top bar of the calendar
(the row with < February 2007 >)

is decorated with the class="yearMonthHeader", but the child tags have no
class defined. In most cases

this is ok, since the <td> tags will use the class from the parent tag,
namely the class of the <tr> tag.

 

However there is one special case, which unfortunately is reproduced for my
project. On my JSP page I 

have a CSS class which defines a style specific for the <td> element. This
completely brokes my layout

for the components, because now the <td> tags from the example above no
longer use the definition

from the parent <tr>, but use the global definition of the <td>. Since I
cannot remove that CSS definition

(it is needed for some other components on the page) I must somehow restrict
to making Tomahawk

specify CSS class attributes for all the tags it generates.

 

In my opinion this is a bug of Tomahawk, since it should label all the tags
with CSS classes. A simple

solution to this would consist of making all the subtags (like the <td> one)
declare the class of their

parent tag (the <tr> one in our example) if they don't have a special class
specified.

 

Another solution would be to add some new attributes, that will allow the
customization of the tags

that don't have already an attribute for this. Then the user would be able
to specify the class for the row, 

as well as the class for the inner cells. In my opinion this second solution
is better than the first one.

 

The example presented here deals only with the Calendar component, but this
behaviour is general for

all the components of Tomahawk.

 

Thank you for the time you spent reading this mail.

 

Best regards,

Bogdan Mocanu

Reply via email to