-
15 Jan 2013 6:41 AM #11
Well is probably some miss config to the jar dependencies,
but if its working then its not important.
Cheers,
Baze
-
15 Jan 2013 3:58 PM #12
The warning shown looks like it is coming from the GWT class NamedFrame, which you may be using somewhere in your application. In GWT 2.5.0 it seems to have been changed to use a SafeHtmlTemplates instance to draw the iframe more easily, and apparently the template isn't completely safe according to the built-in rules. That said, since the argument to be passed into that template is always the string "javascript:''", there is no way that this particular issue can be made unsafe.
This is never created directly from within GWT or GXT, so I suspect you'll find it created somewhere in your codebase. It is likely that you can use another GWT class, Frame instead, which should not emit this warning, but I can't be certain about this without seeing your code. It may be that this NamedFrame is being created within a UiBinder xml file, so you'll need to check them as well.
It appears thought it should be safe to ignore this warning, but you might find it easier to just change out that instance for a different frame.
-
29 Jan 2013 7:48 AM #13
Hi Colin,
thanks for your detailed explanation,
I scanned my projects from beginning to end, at last I found the cause of this warning.
I used NamedFrame when I download a file, with hidden iframe.
Now I replaced my code like following:Code:public static void downloadFile( String url) { boolean frameExists = ( RootPanel.get( "downloadiframe" ) != null ); if ( frameExists ) { Widget widgetFrame = (Widget) RootPanel.get( "downloadiframe" ); widgetFrame.removeFromParent(); } NamedFrame frame = new NamedFrame( "downloadiframe" ); frame.setUrl( url ); frame.setVisible( false ); RootPanel.get().add( frame ); }
And I got rid of this compiler warning.Code:public static void downloadFile( String url) { if ( downloadFrame != null ) downloadFrame.removeFromParent(); downloadFrame = new Frame( url ); downloadFrame.setVisible( false ); RootPanel.get().add( downloadFrame ); }
Thanks a lot for this hint!
-
29 Jan 2013 8:58 AM #14
This patch to GWT will prevent that compiler warning from happening in future versions of GWT: https://gwt-review.googlesource.com/#/c/1800/
Not my doing, I just happened to see it in my inbox this morning along with your post.
-
30 Jan 2013 12:21 AM #15
Colin, they're too late aren't they?
so unlucky to me, I have already solved it...
Forget whatever...


Reply With Quote