You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Alastair Maw (JIRA)" <ji...@apache.org> on 2007/05/24 20:40:16 UTC

[jira] Resolved: (WICKET-576) PopupSettings with no window name set generates invalid xhtml on Link

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

Alastair Maw resolved WICKET-576.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3.0-beta2
         Assignee: Alastair Maw

> PopupSettings with no window name set generates invalid xhtml on Link
> ---------------------------------------------------------------------
>
>                 Key: WICKET-576
>                 URL: https://issues.apache.org/jira/browse/WICKET-576
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta1
>         Environment: Linux Fedora Core 5, Firefox 2.0, Tomcat 5.23
>            Reporter: James Renfro
>         Assigned To: Alastair Maw
>            Priority: Minor
>             Fix For: 1.3.0-beta2
>
>
> I've just switched my code over from 1.2 to 1.3 beta, and I'm running
> into a problem where Wicket seems to be generating invalid xhtml --
> specifically, it produces an href tag with a blank target attribute, as
> here:
> <a href="?wicket:interface=:6:rows:1:launch::ILinkListener:" target wicket:id="launch" onclick="var w = window.open(href, '', 'scrollbars=yes,location=no,menuBar=no,resizable=yes,status=no,toolbar=no'); if( w.blur) w.focus(); return false;">Launch</a>
> Notice right after the href="", there's a naked 'target' attribute. I'm
> guessing this is because the Link popupPageMap.getName () method is
> returning a null. Looks like the code checks to make sure that
> popupPageMap is NOT null, but it doesn't check getName().
> In the Wicket code I can see the following:
> <snip class=" org.apache.wicket.markup.html.link.Link" lines="460:467">
> if (popupSettings != null)
>             {
>                 IPageMap popupPageMap = popupSettings.getPageMap(this);
>                 if (popupPageMap != null)
>                 {
>                     tag.put("target", popupPageMap.getName());
>                 }
>             }
> </snip>
> Here's my code:
> <snip>
>     item.add(new Link("launch") {
>                          public void onClick() {
>                              setResponsePage(new LaunchFrameset());
>                          }
>                      }.setPopupSettings(new
> PopupSettings(PopupSettings.RESIZABLE | PopupSettings.SCROLLBARS)));
> </snip>
> If I add .setWindowName to my new PopupSettings object, everything seems
> to work. But I'm guessing it should work even if I forget to specify a
> window name. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.