Re: No JSNI method generated

2009-04-16 Thread dayre
I got it now ! While i see the benefits of using GWT (Eclipse integration, App engine benefits, my backend app is Java, component model etc.) it is quite a paradigm shift to get my brain to think in Javascript terms while writing the client side Java code... + being somewhat spoiled (or ruined p

Re: No JSNI method generated

2009-04-16 Thread Vitali Lovich
Write - good point regarding wrap. It's actually a restriction that's always been in effect, they just put in an assertion recently, from my understanding. On Thu, Apr 16, 2009 at 6:59 AM, Thomas Broyer wrote: > > > > On 16 avr, 11:53, Vitali Lovich wrote: > > Is there a particular reason you

Re: No JSNI method generated

2009-04-16 Thread Thomas Broyer
On 16 avr, 11:53, Vitali Lovich wrote: > Is there a particular reason you recommend this approach as opposed to using > the HTML widget?  For something as simple as this, it seems like overkill to > build-up a whole widget wrapping this when it doesn't seem to offer anything > over using HTML.

Re: No JSNI method generated

2009-04-16 Thread Vitali Lovich
Is there a particular reason you recommend this approach as opposed to using the HTML widget? For something as simple as this, it seems like overkill to build-up a whole widget wrapping this when it doesn't seem to offer anything over using HTML. On Thu, Apr 16, 2009 at 5:07 AM, Thomas Broyer wr

Re: No JSNI method generated

2009-04-16 Thread Thomas Broyer
On 16 avr, 07:01, dayre wrote: > Vitali, this looks fairly straight forward... but now i'm having > trouble wrapping this with a Composite so i can create my "clickable > list" wiget.    The issue is the HTML.wrap() which gives me an > exception due to the element not being attached to the DOM

Re: No JSNI method generated

2009-04-15 Thread Vitali Lovich
No, I'm not going to write your code for you. You need to first attach the elements to the actual DOM first just like the exception says. Any number of ways to do that: UListElement ul = (UListElement) DOM.getElementById("towrap") or UListElement ul = Document.get().createULElement(); Docume

Re: No JSNI method generated

2009-04-15 Thread dayre
Vitali, this looks fairly straight forward... but now i'm having trouble wrapping this with a Composite so i can create my "clickable list" wiget.The issue is the HTML.wrap() which gives me an exception due to the element not being attached to the DOM ?... i'm missing something, but it's not a

Re: No JSNI method generated

2009-04-15 Thread Vitali Lovich
public LIElement appendLI(UListElement ul, String text) { LIElement li = Document.get().createLIElement(); li.setText(text); ul.appendChild(li); return li; } final UListElement ul = Document.get().createULElement(); final LIElement li1 = appendLI(ul, "my text 1"); final LIElement l

Re: No JSNI method generated

2009-04-15 Thread Thomas Broyer
On 15 avr, 15:25, dayre wrote: > HI Vitali, > > Thank you for taking the time to respond.  I very much appreciate it. > > The reason i'm not using existing GWT widgets, which my example > doesn't show, is because i'm trying to attach an onclick() event to > ordered list items (text).   There do

Re: No JSNI method generated

2009-04-15 Thread dayre
HI Vitali, Thank you for taking the time to respond. I very much appreciate it. The reason i'm not using existing GWT widgets, which my example doesn't show, is because i'm trying to attach an onclick() event to ordered list items (text). There doesn't seem to be a widget which easily allows

Re: No JSNI method generated

2009-04-14 Thread Vitali Lovich
No, that's wrong since the GWT compiler won't actually define clickTest but obfuscate it to save on bandwidth. You cannot do it that way. What you could do, if you were dead set on adding the HTML that way (if you're going to do it that way, why not just put it into the original HTML page?), you