Hi,
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.

Thanks,
James.


-- 
James Renfro
Programmer
IET Mediaworks, UC Davis
[EMAIL PROTECTED]
W: 530-754-5097


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to