Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Click event for custom cell renderer (HyperlinkCell) for CellTable isn't firing.

80 views
Skip to first unread message

Ketan Shah

unread,
Dec 28, 2010, 4:50:21 AM12/28/10
to google-we...@googlegroups.com
Greetings, 

I have created a custom hyperlinkcell column renderer for celltable widget. Source can be found here http://pastebin.com/hM7rg4tF

The hyperlink displays alright but the onBrowserEvent isnt being fired at all. I have added super("click") on my constructor too.

On adding @Override annotation to the onBrowserEvent, my eclipse IDE complains and suggests that I remove the annotation. It compiles once I remove it. Why would that be? Screen attached for the same.

Thanks for all your help.

Regards,
-Ketan.
Selection_001.png

Subhrajyoti Moitra

unread,
Dec 28, 2010, 5:02:19 AM12/28/10
to google-we...@googlegroups.com
@Override AFAIK is a jdk 1.6 feature.
Can u see your project Compiler settings in Eclipse. Set it to follow 1.6 conventions.

Your code looks alright to me..

HTH.

Thanks,
Subhro.

On Tue, Dec 28, 2010 at 3:20 PM, Ketan Shah <ketan...@gmail.com> wrote:
Greetings, 

I have created a custom hyperlinkcell column renderer for celltable widget. Source can be found here


The hyperlink displays alright but the onBrowserEvent isnt being fired at all. I have added super("click") on my constructor too.

On adding @Override annotation to the onBrowserEvent, my eclipse IDE complains and suggests that I remove the annotation. It compiles once I remove it. Why would that be? Screen attached for the same.

Thanks for all your help.

Regards,
-Ketan.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Ketan Shah

unread,
Dec 28, 2010, 5:14:29 AM12/28/10
to google-we...@googlegroups.com
Thanks Subhro. The @Override annotation works for render() method in the same class but not for onBrowserEvent. I tried your suggestion too but didnt work (I have openjdk version 1.6.0_20). 

Regards,
-Ketan.
--
"If you don't risk anything in life, you are risking even more"

Nirmal Patel

unread,
Dec 28, 2010, 7:20:04 AM12/28/10
to google-we...@googlegroups.com
Here's how to configure what Subhro suggests...
In Eclipse; goto Project -> Properties -> Java Compiler -> (Check)Enable Project Specific Settings ->  Compiler Compliance Level (select 1.6)
Or if you want to do it at global level: Window -> Preferences -> Java -> Compiler -> Compiler Compliance Level (select 1.6)


Regards,
Nirmal

Thomas Broyer

unread,
Dec 28, 2010, 7:24:15 AM12/28/10
to google-we...@googlegroups.com
The signature of onBrowserEvent has changed between 2.1.0 and 2.1.1, which version are you using?

Ketan Shah

unread,
Dec 28, 2010, 10:43:50 AM12/28/10
to google-we...@googlegroups.com
@Nirmal: I did exactly that.
@Thomas: I am using 2.1.1

The issue was actually the import statement.

I was importing from com.google.gwt.user.client.Element; when I should
have been importing from com.google.gwt.dom.client.Element;

Thank you all for your prompt responses.

Regards,
-Ketan.

On Tue, Dec 28, 2010 at 5:54 PM, Thomas Broyer <t.br...@gmail.com> wrote:
>
> The signature of onBrowserEvent has changed between 2.1.0 and 2.1.1, which version are you using?
>

Reply all
Reply to author
Forward
0 new messages