Link to home
Start Free TrialLog in
Avatar of Jay Roy
Jay RoyFlag for United States of America

asked on

GWT - newbie

hi guys
I am working on GWT and i have something like

public class QuickSearch extends Canvas
{
private HLayout mainBodyLayout = new HLayout(); //the main layout containing other layouts.

//button layout
private Layout getButtonLayout()
{
//here i want to check IF mainBodyLayout already contains
getButtonLayout() , if it does not contain only then add it like
mainBodyLayout.addMember(getButtonLayout());
Any idea how i can check if getButtonLayout() is already present in mainBodyLayout ?

return VLayout;
}

thanks in advance.
Avatar of mccarl
mccarl
Flag of Australia image

It's not clear what you are asking. You are asking if the main layout contains 'getButtonLayout()' but that is a function not an object!? And if you mean, 'does the main layout contain whatever the returned object from getButtonLayout()' well then you have an infinite recursion problem. How can you know if the main layout contains an object that is returned from a function when you are still INSIDE that function?

I think you need to explain at a higher level what it is you are trying to do!
ASKER CERTIFIED SOLUTION
Avatar of mccarl
mccarl
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jay Roy

ASKER

....can be assigned an I'D.
Yeah, I am looking for that,  any idea how I can do that?
Also getButtonlayout() returns a layout object.