But I generated the rowOnMouseOver part dynamically, so it would be
the same...

Yes, it should be the same.  But I am using latest version 1.1.1 and still it 
somehow doesn't work.

how do you render the components then?

We have a framework that works without JSP. Every web page is an XML file that describes what components it contains. For a JSF component it simply invokes component's HTML renderer. So I have to create each JSF UI element programmatically.

Maris

But I generated the rowOnMouseOver part dynamically, so it would be
the same... how do you render the components then?

Bruno

2005/11/25, Maris Orbidans <[EMAIL PROTECTED]>:
Hi

Unfortunately we don't use JSP at all.

Maris

I've just tried and it does work for me, using the latest SVN. I've
created a table like yours in a backing bean (the
table2.getAttributes()... is not needed as you can call directly to
the setters (setRowOnMouseOver, setRowOnMouseOut...). I've just bound
the table generated dynamically in the jsp page

<t:datatable binding="#{yourBean.table2}"  ...>
...
</t:dataTable>

and everything has worked. How are you binding the table with the jsp page?

Regards,

Bruno

2005/11/24, Maris Orbidans <[EMAIL PROTECTED]>:


hi

I am using extended myfaces HtmlDataTable component.   I want to add
some javascript to RowOn...   events.
For some reason that doesnt work.  Here is my code


      import org.apache.myfaces.component.html.ext.HtmlDataTable;
      ...
      HtmlDataTable table2 =
(HtmlDataTable)facesContext.getApplication().createComponent(HtmlDataTable.COMPONENT_TYPE);

      table2.setStyleClass("person_table_iframe");
      ...
      table2.setRowOnClick("this.bgColor='#5683B2'");
                // none of those things work
      table2.setRowOnMouseOver("this.bgColor='#5683B2'");
      table2.getAttributes().put("rowOnMouseOver",
"this.bgColor='#5683B2'");

table2.getAttributes().put("rowOnMouseOut","this.bgColor='#5683B2'");


And here is the result:

<table cellpadding="0" cellspacing="0" class="person_table_iframe">
<tbody id="_id0:_id1:tbody_element">
<tr class="odd"><td class="first">date1</td><td class="middle">unit1</td><td 
class="last">prov1</td></tr>
<tr class="even"><td class="first">date2</td><td class="middle">unit2</td><td 
class="last">prov2</td></tr></tbody></table>


Can anybody help me please ?

Maris






Reply via email to