[ 
https://issues.apache.org/jira/browse/WICKET-206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12467631
 ] 

Marc-Andre Houle commented on WICKET-206:
-----------------------------------------

It is a problem for exemple in BookmarkablePageLink.

See code paste bellow : 
        /**
         * @param pageMap
         *            The pagemap for this link's destination
         * @return This
         */
        public final BookmarkablePageLink setPageMap(final IPageMap pageMap)
        {
                if (pageMap != null)
                {
                        this.pageMapName = pageMap.getName();
                        add(new AttributeModifier("target", false, new 
Model(pageMapName)));
                }
                return this;
        }
        /**
         * @return Page map for this link
         */
        public final IPageMap getPageMap()
        {
                if (pageMapName != null)
                {
                        return PageMap.forName(pageMapName);
                }
                else
                {
                        return getPage().getPageMap();
                }
        }

In that, you can see that when PageMap name is null, it does not do what is 
expected.  Presently, it is making me big problem exactly because the pageMap 
name is null and then did not return the correct page map.

> Default page map is null, should be set to something more usable
> ----------------------------------------------------------------
>
>                 Key: WICKET-206
>                 URL: https://issues.apache.org/jira/browse/WICKET-206
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket
>    Affects Versions: 1.2.4
>         Environment: JBoss, windows 2k
>            Reporter: Marc-Andre Houle
>            Priority: Minor
>
> Related to thread : 
> http://www.nabble.com/From-pop-up%2C-page-link-to-change-the-parent-wihtout-changing-the-popup-tf2966574.html
> Problem is to open a pop-up and change page in the calling page.  To do that, 
> we used BookmarkablePageLink.  This one need to set a PageMap and set the 
> attribute target to the page map of the calling page.
> When in the calling page, you can get the pageMap name by doing a : 
> getPage().getPageMap().getName().
> the problem is that the default page map have a name set to null by default.  
> this can be resolved (I Think, but not sure) by changing the DEFAULT_NAME in 
> PageMap to something else than null.  The other possibility is to add a 
> method in webpage called getwindowname() that would return the window name, 
> which is the default name for the default pageMap.

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

Reply via email to