When using PopupSettings to throw up a popup with a PDF (from a link), IE6 is
sporadically throwing a "Permission Denied" error.  I believe this because
of the "w.focus()" firing prior to the PDF/popup being loaded.  

Below is the code used to display a "help" link.  When clicked, it throws up
a popup with a PDF.

Here is my markup:
...
 

  <wicket:message key="menu-help">[help]</wicket:message>


...

Inside my Application extension:
...
getSharedResources().add("help", new
ContextRelativeResource("/pdf/help.pdf"));
...

Inside my panel:
...
final ResourceLink help = new ResourceLink("link-help", new
ResourceReference("help"));
final PopupSettings popUpSettings = new
PopupSettings(PopupSettings.RESIZABLE |
PopupSettings.SCROLLBARS).setHeight(800).setWidth(800);
help.setPopupSettings(popUpSettings);
add(help);
...

The following markup is generated:
...
 
if(w.blur) w.focus(); return false;"  
   href="../resources/org.apache.wicket.Application/help">Help


...

I found that removing "if(w.blur) w.focus();" from the onclick event removes
the sporadic JS error and still gives me the desired effect (meaning after
the PDF is done loading within the popup, the popup is on top and has focus)

I did this with the following:
@Override
public String getPopupJavaScript() {
  return super.getPopupJavaScript().replace("if(w.blur) w.focus();", "");
}


I wasn't able find an open JIRA issue for this.  Has anyone else experienced
this problem?

Also, is this a good example of implementing a ResourceLink?


-- 
View this message in context: 
http://www.nabble.com/PopupSettings-IE6-%22Permission-Denied%22-tp18405095p18405095.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to