Hi Bhupen,

This looks suspiciously like it might be the cause of your exception.

> to load another page i m using code like below...
>
>                 RootPanel.get("irisPage").clear();
>                 
> RootPanel.get("irisPage").add(createUserPageContent.loadPage());
>                 agentListWidget.widgetInterface();
>

Suppose you did it something like this (SimplePanel can only have one
widget):

    SimplePanel pageContainer = new SimplePanel();
    // add whatever the first page widget is to pageContainer
    RootPanel.get("irisPage").add(PageContainer);

Then to swap out:

    Widget currPage = pageContainer.getWidget();
    pageContainer.remove(currWidget);
    pageContainer.add(createUserPageContent.loadPage());

That way you get the framework sort out the housekeeping for attaching
and detaching widgets from the DOM.

regards
gregor





> 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);
>
> >  
>
> ...
>
> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to