HeaderSpan click event

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:

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.

Hello,

I stumbled upon your thread. I have a similar problem to solve. I want the HeaderSpan to respond when the user clicks the left mouse button.

I thought this will be simple, I just have to implement the ‘HasClickHandler’ but it is turning out to be quite convoluted.

Can you please share your thoughts of how you did it?

Please help. I will my miss my project dead line soon :frowning:

Regards,
-Anuroop.