Hi Ganesh, I believe the problem you're experiencing is due to the fact that you forgot to include a required iframe on your host HTML page. Specifically, the GWT History mechanism uses an <iframe> trick to correctly support history in IE6.
Try adding the following iframe in the body of your host HTML page: <iframe src="javascript:''" id="__gwt_historyFrame" style="position:absolute;width:0;height:0;border:0"></iframe> That should solve the problem without needing to hack the HistoryImplIE6 class. Hope that helps, -Sumit Chandel On Tue, Nov 18, 2008 at 11:13 PM, Ganesh <[EMAIL PROTECTED]> wrote: > > Hello Friends > > Can anyone confirm if I am doing right for managing history or is > there any other alternate for avoiding this patch ? > > Regards > > Ganesh Bansal > > On Nov 18, 9:29 am, Ganesh <[EMAIL PROTECTED]> wrote: > > I am using GWT 1.5 and want to manage history. Whenever I call > > History.newItem(token), Mozilla displays the window title in history > > list But Internet Explorer shows > http://localhost:8888/com.TestEntry/8DF40326B05334ADE3B6DCA8E9DD3DA2 > > in the list i.e. URL of my page instead of showing window title. When > > I drilled, I noticed an issue in HistoryImplIE6's newItemImpl method. > > > > It was written as below: > > protected native void newItemImpl(Element historyFrame, String > > historyToken, boolean forceAdd) /*-{ > > historyToken = historyToken || ""; > > if (forceAdd || ($wnd.__gwt_historyToken != historyToken)) { > > var doc = historyFrame.contentWindow.document; > > doc.open(); > > doc.write('<html><body onload="if(parent.__gwt_onHistoryLoad) > > parent.__gwt_onHistoryLoad(__gwt_historyToken.innerText)"><div > > id="__gwt_historyToken">' + historyToken + '</div></body></html>'); > > doc.close(); > > } > > }-*/; > > > > It adds an IFrame without specifying title tag. If IFrame does not > > have title then it will display the complete URL in history list. For > > a solution, I applied a patch in this class where I took the window > > title and put it into head tag as below: > > protected native void newItemImpl(Element historyFrame, String > > historyToken, boolean forceAdd) /*-{ > > historyToken = historyToken || ""; > > if (forceAdd || ($wnd.__gwt_historyToken != historyToken)) { > > var doc = historyFrame.contentWindow.document; > > doc.open(); > > var windowTitle = $wnd.document.title; > > doc.write('<html><head><title>'+windowTitle+'</title></ > > head><body onload="if(parent.__gwt_onHistoryLoad) > > parent.__gwt_onHistoryLoad(__gwt_historyToken.innerText)"><div > > id="__gwt_historyToken">' + historyToken + '</div></body></html>'); > > doc.close(); > > } > > }-*/; > > and now IE is also showing window title in History list. > > > > Now my question is: is it a bug of GWT ? And is there any other > > alternate for this so that I need not to make a patch in GWT's jar. > > > > Any help or suggestion in this regard will be highly appreciated. > > > > Regards > > > > GaneshBansal > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---