On Thursday 08 November 2007 14:13:22 raybristol wrote:
> </table >
>
> then in code behind I use protected void populateItem(Item item) to
> specified each table cell's data, because I can put any String in td tag so
> I can easily put any javascript function call, however, I want to do that
> for each row as well, so the tr tag, such as when use click on a row,
> something happen, but I can't find where I can put this ability from the
> code behind?
You can add javascript file to the page header like this:
add(HeaderContributor.forJavaScript(MyPage.class, "myscript.js"));
And javascript calls like this:
add(new DataView("boxList", dataProvider)){
protected void populateItem(Item item) {
item.add(new SimpleAttributeModifier("onclick","row_clicked()"));
item.add(new Label("boxID").add(new
SimpleAttributeModifier("onclick","boxID_clicked()"));
...
}
});
Dima
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]