Hi all, I'm quite new with both SmartGWT and the MVP pattern.
I actually began building my app. with GWT, but then changed to SmartGWT.
Now.
1) with GWT to build a custom widget I had to extend Composite, now with SmartGWT everything is a Canvas ?
2) What about the .draw() method ? when does it have to be called ? what does it do ? (ie. difference between RootPanel.get().add(vLayout); and vLayout.draw(); ?)
let's say I have something like
in the main class:
Now, if based on some event I want to add Bar
to the page.. I would add it with addMember.. and then call the draw() method.. on what ? the main Canvas or the just added Bar ?
Hope you can understand something about this mess of a post.
Thanks,
Stefano
I actually began building my app. with GWT, but then changed to SmartGWT.
Now.
1) with GWT to build a custom widget I had to extend Composite, now with SmartGWT everything is a Canvas ?
2) What about the .draw() method ? when does it have to be called ? what does it do ? (ie. difference between RootPanel.get().add(vLayout); and vLayout.draw(); ?)
let's say I have something like
Code:
public class Foo extends Canvas { Foo() { HLayout foo = new HLayout(); foo.addMember(new Label("test")); } }
Code:
public void onModuleLoad() { HLayout main = new HLayout(); main.setWidth100(); main.setHeight100(); main.addMember(new Foo()); main.draw(); }
Code:
public class Bar extends Canvas { Bar() { HLayout bar = new HLayout(); bar.addMember(new Label("another")); } }
Hope you can understand something about this mess of a post.
Thanks,
Stefano
Comment