Smart GWT v. 2.5
Chrome 1.5
Hi,
I’m attempting to handle a click event on a header span. So far this has proven to be tricky…
A couple of the approaches I’ve tried:
- pass a click handler as a HeaderSpan attribute
headerSpan.setAttribute("clickHandler", new ClickHandler(){..});
I’m guessing this doesn’t work because there is no “setClickHandler” method on the autochild component. Is there attribute that will accept a click handler?
- create a subclass of com.smartgwt.client.widgets.Label and attempt to have autochild construction instantiate one of these
headerSpan.setAttribute("_constructor", "MyLabel");
This results in an error “Unable to create autoChild ‘headerSpan’ of type ‘MyLabel’ - no such class in runtime.”
Is there a way to expose custom classes in the runtime?
Any help greatly appreciated.