to load another page i m using code like below... RootPanel.get("irisPage").clear(); RootPanel.get("irisPage").add(createUserPageContent.loadPage()); agentListWidget.widgetInterface();
On Nov 27, 12:12 pm, Bhupen <[EMAIL PROTECTED]> wrote: > topLayout.printTop(); > RootPanel.get("Top-Menu").add(topMenu.mainMenu()); > RootPanel.get("irisPage").add(agentListPageContent.loadPage()); > > // top Layout > package com.client; > > import com.google.gwt.user.client.ui.HTML; > import com.google.gwt.user.client.ui.RootPanel; > import com.google.gwt.user.client.ui.ClickListener; > import com.google.gwt.user.client.Window; > import com.google.gwt.user.client.ui.Widget; > import com.google.gwt.user.client.ui.Image; > > public class topLayout > { > > public static void printTop() > { > HTML topContent = new HTML("<table width='1004' border='0' > cellspacing='0' cellpadding='0'>" > + "<tr>" > + "<td>" > + " <table width='1004' border='0' cellspacing='0' > cellpadding='0'>" > + "<tr style='background-image:url(images/headerbg.gif); > height: > 72px;'>" > + "<td width='29' height='72'></td>" > + "<td width='634'><img src='images/logo.gif' width='242' > height='72' /></td>" > + "<td width='336'><img src='images/airtelindia.gif' > width='230' > height='72' /></td>" > + "</tr>" > + "<tr>" > + "<td width='29' height='37' ><img > src='images/menuleftbg.gif' > width='29' height='37' /></td>" > + "<td><div style='width:759px; > background-image:url(images/ > menubg.gif); height:37px;'>" > + "<table width='758' border='0' cellspacing='0' > cellpadding='0' style='font-family:Arial, Helvetica, sans-serif; font- > size:18px; margin-top:8px; color:#FFFFFF;' >" > > + "<tr>" > + "<td width=\"100%\" class='menu-text' > align='center' id='Top- > Menu'> </td>" > + "</tr>" > + "</table>" > > + "</div></td>" > + "<td><img src='images/menurightbg.gif' > width='230' height='37' /></td>" > > + "</tr>" > +"</table>" > +"</td>" > +"</tr>" > +"</table>"); > RootPanel.get("TopContents").add(topContent); > } > > } > > //topMenu > > package com.client; > > import com.google.gwt.user.client.ui.HTML; > import com.google.gwt.user.client.ui.RootPanel; > import com.google.gwt.user.client.ui.ClickListener; > import com.google.gwt.user.client.Window; > import com.google.gwt.user.client.ui.MenuBar; > import com.google.gwt.user.client.ui.MenuItem; > import com.google.gwt.user.client.Command; > import com.google.gwt.user.client.ui.Widget; > import com.google.gwt.user.client.ui.Composite; > import com.google.gwt.user.client.ui.Label; > import com.google.gwt.user.client.ui.TabPanel; > import com.google.gwt.user.client.ui.Panel; > > public class topMenu extends Composite{ > > public static Widget mainMenu() > { > Command menuClick = new Command() > { > public void execute() > { > dashBoardPage.dashBoard(); > } > > }; > > Command menuClick1 = new Command() > { > public void execute() > { > createUserPage.createUser(); > } > > }; > Command menuClick2 = new Command() > { > public void execute() > { > userListPage.createUser(); > } > > }; > Command menuClick3 = new Command() > { > public void execute() > { > > createApplicationPage.createApplication(); > } > > }; > Command menuClick4 = new Command() > { > public void execute() > { > > applicationListPage.applicationList(); > } > > }; > Command menuClick5 = new Command() > { > public void execute() > { > createJobPage.createJob(); > } > > }; > Command menuClick6 = new Command() > { > public void execute() > { > jobListPage.jobList(); > } > > }; > Command menuClick7 = new Command() > { > public void execute() > { > createAgentPage.createAgent(); > } > > }; > Command menuClick8 = new Command() > { > public void execute() > { > agentListPage.agentList(); > } > > }; > Command menuClick9 = new Command() > { > public void execute() > { > blackoutPage.blackOut(); > } > > }; > Command menuClick10 = new Command() > { > public void execute() > { > blackListPage.blackList(); > } > > }; > > // Top-level menu > MenuBar menuDash = new MenuBar(); > //menuDash.addStyleName("demo-MenuItem"); > MenuItem menuDashBoard = new MenuItem("Dash-Board", > menuClick); > > // Item to fire a command > > MenuBar menuUser = new MenuBar(); > //menuUser.addStyleName("demo-MenuItem"); > > // Item to fire a command > MenuItem menuUser1 = new MenuItem("Create User", > menuClick1); > MenuItem menuUser2 = new MenuItem ("List Users", > menuClick2); > > MenuBar menuApplication = new MenuBar(); > //menuApplication.addStyleName("demo-MenuItem"); > > // Item to fire a command > MenuItem menuApplication1= new MenuItem("Create > Application", > menuClick3); > MenuItem menuApplication2= new MenuItem("List > Application", > menuClick4); > > MenuBar menuJob = new MenuBar(); > //menuApplication.addStyleName("demo-MenuItem"); > // Item to fire a command > MenuItem menuJob1= new MenuItem("Create Job", > menuClick5); > MenuItem menuJob2= new MenuItem("List Job", > menuClick6); > > MenuBar menuAgent = new MenuBar(); > //menuApplication.addStyleName("demo-MenuItem"); > // Item to fire a command > MenuItem menuAgent1= new MenuItem("Create Agent", > menuClick7); > MenuItem menuAgent2= new MenuItem("List Agent", > menuClick8); > > MenuBar menuBlackoutwindow = new MenuBar(); > //menuApplication.addStyleName("demo-MenuItem"); > // Item to fire a command > MenuItem menuBlackoutwindow1= new MenuItem("Blackout > window", > menuClick9); > MenuBar menuBlacklist = new MenuBar(); > //menuApplication.addStyleName("demo-MenuItem"); > // Item to fire a command > MenuItem menuBlacklist1= new MenuItem("Black List", > menuClick10); > //MenuItem menuBlacklist2= new MenuItem("List > Blackout window", > menuClick); > > // Level-two menu - vertical=true > > // Assemble the menu system > MenuBar menuMain = new MenuBar(); > menuMain.setAutoOpen(true); > menuMain.setAnimationEnabled(true); > menuMain.addItem (menuDashBoard); > menuMain.addItem ("Users",menuUser); > menuUser.addItem (menuUser1); > menuUser.addItem (menuUser2); > menuMain.addItem ("Application",menuApplication); > menuApplication.addItem (menuApplication1); > menuApplication.addItem (menuApplication2); > menuMain.addItem ("Job",menuJob); > menuJob.addItem (menuJob1); > menuJob.addItem (menuJob2); > menuMain.addItem ("Agent",menuAgent); > menuAgent.addItem (menuAgent1); > menuAgent.addItem (menuAgent2); > menuMain.addItem (menuBlackoutwindow1); > menuMain.addItem (menuBlacklist1); > return menuMain; > > } > > } > > /// agentListPage > > package com.client; > > import com.google.gwt.user.client.ui.HTML; > import com.google.gwt.user.client.ui.RootPanel; > import com.google.gwt.user.client.ui.ClickListener; > import com.google.gwt.user.client.Window; > import com.google.gwt.user.client.ui.MenuBar; > import com.google.gwt.user.client.ui.MenuItem; > import com.google.gwt.user.client.Command; > import com.google.gwt.user.client.ui.Widget; > import com.google.gwt.user.client.ui.Composite; > import com.google.gwt.user.client.ui.Label; > import com.google.gwt.user.client.ui.TabPanel; > import com.google.gwt.user.client.ui.Panel; > > public class topMenu extends Composite{ > > public static Widget mainMenu() > { > Command menuClick = new Command() > { > public void execute() > { > dashBoardPage.dashBoard(); > } > > }; > > Command menuClick1 = new Command() > { > public void execute() > { > createUserPage.createUser(); > } > > }; > Command menuClick2 = new Command() > { > public void execute() > { > userListPage.createUser(); > } > > }; > Command menuClick3 = new Command() > { > public void execute() > { > > createApplicationPage.createApplication(); > } > > }; > Command menuClick4 = new Command() > { > public void execute() > { > > applicationListPage.applicationList(); > } > > }; > Command menuClick5 = new Command() > { > public void execute() > { > createJobPage.createJob(); > } > > }; > Command menuClick6 = new Command() > { > public void execute() > { > jobListPage.jobList(); > } > > }; > Command menuClick7 = new Command() > { > public void execute() > { > createAgentPage.createAgent(); > } > > }; > Command menuClick8 = new Command() > { > public void execute() > { > agentListPage.agentList(); > } > > }; > Command menuClick9 = new Command() > { > public void execute() > { > blackoutPage.blackOut(); > } > > }; > Command menuClick10 = new Command() > { > public void execute() > { > blackListPage.blackList(); > } > > }; > > // Top-level menu > MenuBar menuDash = new MenuBar(); > //menuDash.addStyleName("demo-MenuItem"); > MenuItem menuDashBoard = new MenuItem("Dash-Board", > menuClick); > > // Item to fire a command > > MenuBar menuUser = new MenuBar(); > //menuUser.addStyleName("demo-MenuItem"); > > // Item to fire a command > MenuItem menuUser1 = new MenuItem("Create User", > menuClick1); > MenuItem menuUser2 = new MenuItem ("List Users", > menuClick2); > > MenuBar menuApplication = new MenuBar(); > //menuApplication.addStyleName("demo-MenuItem"); > > // Item to fire a command > MenuItem menuApplication1= new MenuItem("Create > Application", > menuClick3); > MenuItem menuApplication2= new MenuItem("List > Application", > menuClick4); > > MenuBar menuJob = new MenuBar(); > //menuApplication.addStyleName("demo-MenuItem"); > // Item to fire a command > MenuItem menuJob1= new MenuItem("Create Job", > menuClick5); > MenuItem menuJob2= new MenuItem("List Job", > menuClick6); > > MenuBar menuAgent = new MenuBar(); > //menuApplication.addStyleName("demo-MenuItem"); > // Item to fire a command > MenuItem menuAgent1= new MenuItem("Create Agent", > menuClick7); > MenuItem menuAgent2= new MenuItem("List Agent", > menuClick8); > > MenuBar menuBlackoutwindow = new MenuBar(); > ... > > read more » --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---