Hi all,
I am new in GWT and I have a problem which I don’t know how to
resolve.
I have 3 classes, A, B and interface C
Method 1:
A:
- b field: B
- create: VerticalPanel
- updateA(Item i): void
In create, I have method:
b.setSelectListener(new C(){
public void onSelect(Item i) {
updateA(i);
}
}
B implements C:
- c field: C
- create(){
item.addClickListner(this);
}
- setC(C c);
C:
- onSelect(Item i);
Method 2:
A
- b field: B(A)
- create:
- updateA(Item i)
B
- a field: A
- create{
- item.addClickListner(new ClickListener(){
public void onClick(){
A.updateA;
}
- });
- }
}
I don’t know what method should be used in my GWT. Method 1, use
interface to raise click event in B, caught that event in A and update
A. Method 2, A is a field of B, just A.update in onClick event. Please
give me an advice
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---