Hi,
i'm new to GWT
please help me out.
My requirement is

1.) if i clicked on *LOGIN*   Button I have to display two HypeyLinks
on second page.
2.) If i clicked on *Create Company* hyperlink  i have to disply
*company name*  text box on second page  with different frame.

I'm not able to display  *company name*  text box on second page once
i clicked on hyperlink.
And I have mentioned all my java classes.

please help me out with some samples.




1.) EntryUI.java
public class EntryUI implements EntryPoint {

public void onModuleLoad() {
    RootPanel lRootPanel = RootPanel.get();
Button lLoginButton = new Button(" LOGIN ");
lRootPanel.add(lLoginButton, 672, 398);

lLoginButton.addClickListener(new ClickListener() {
                        public void onClick(Widget arg0) {
                                RootPanel.get().clear();
                                
RootPanel.get().add(ComponentUI.getComponents());
                        }
                });
}
}

2.)

ComponentUI.java

public class ComponentUI {

public static Widget getComponents(){

final RootPanel lRootPanel = RootPanel.get();

final Hyperlink lCreateCompany = new Hyperlink("Create
Company","CreateCompany");
final Hyperlink lViewCompanies = new Hyperlink("View
companies","ViewCompanies");
lRootPanel.add(lCreateCompany);
lRootPanel.add(lViewCompanies);

lCreateCompany.addClickListener(new ClickListener() {
                public void onClick(Widget sender) {
                        lRootPanel.get().clear();
                        lRootPanel.add(CreateCompany.getCreateCompany());
                }
              });
return lRootPanel;
}

}

3.)   CreateCompany.java


public class CreateCompany {

        public static Widget getCreateCompany(){
                final RootPanel lCompanyPanel = RootPanel.get();
                final Label lLabel =new Label("company name :");
                final TextBox lComapny = new TextBox();

                lCompanyPanel.add(lLabel);
                lCompanyPanel.add(lComapny);
                return lCompanyPanel;
        }

}
please help me out with some samples.

--

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.


Reply via email to