You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Kemal Dogan (JIRA)" <ji...@apache.org> on 2013/02/26 19:34:13 UTC

[jira] [Updated] (WICKET-5058) org.apache.wicket.markup.html.link.PopupSettings.java problem (version 6.5.0) target problem

     [ https://issues.apache.org/jira/browse/WICKET-5058?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kemal Dogan updated WICKET-5058:
--------------------------------

    Attachment: TestPopupSettings.tar.gz

quickstart project
main class:
public class HomePage extends WebPage {
	private static final long serialVersionUID = 1L;
	private String URL = "http://www.google.com";
	private final PopupSettings popupSettings;
	public HomePage(final PageParameters parameters) {
		super(parameters);
		popupSettings = new PopupSettings("popuppagemap",
				PopupSettings.RESIZABLE | PopupSettings.SCROLLBARS)
				.setHeight(300)
				.setWidth(500)
				.setTop(10)
				.setLeft(10);
		add(new Label("version", getApplication().getFrameworkSettings().getVersion()));
		add(new AjaxLink("worksID") {
			public void onClick(AjaxRequestTarget ajaxRequestTarget) {
				popupSettings.setTarget("'" + URL + "'");
				ajaxRequestTarget.appendJavaScript(popupSettings.getPopupJavaScript());
			}
		});
		add(new AjaxLink("notWorksID") {
			public void onClick(AjaxRequestTarget ajaxRequestTarget) {
				popupSettings.setTarget(URL);
				ajaxRequestTarget.appendJavaScript(popupSettings.getPopupJavaScript());
			}
		});
    }
}

                
> org.apache.wicket.markup.html.link.PopupSettings.java problem (version 6.5.0)  target problem
> ---------------------------------------------------------------------------------------------
>
>                 Key: WICKET-5058
>                 URL: https://issues.apache.org/jira/browse/WICKET-5058
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.5.0
>            Reporter: Kemal Dogan
>            Priority: Minor
>         Attachments: TestPopupSettings.tar.gz
>
>
> I think the line (row number=158)
>          StringBuilder script = new StringBuilder("var w = window.open(" + target + ", '").append(
>                         windowTitle).append("', '");
> must be like this. (adding ' "single quotation marks"  to target)
>          StringBuilder script = new StringBuilder("var w = window.open('" + target + "', '").append(
>                         windowTitle).append("', '");
> Because,
> when I use like this, it does not work.
> popupSettings.setTarget(myULR);
> target.appendJavaScript(popupSettings.getPopupJavaScript());
> But this worked.
> popupSettings.setTarget("'" + myULR + "'");
> target.appendJavaScript(popupSettings.getPopupJavaScript());
> http://apache-wicket.1842946.n4.nabble.com/org-apache-wicket-markup-html-link-PopupSettings-java-problem-version-6-5-0-td4656735.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira