I did some digging, and this is about as far as I got for now:

When determining how to render the link for each node in the tree,
eventually WebRequestCodingStrategy.encode(RequestCycle, IRequestTarget)
is called.

Tracing a little further the following call is made:

  WebRequestCodingStrategy.pathForTarget(IRequestTarget);

Here, if the encoder (IRequestTargetUrlCodingStrategy) returns null,
then the default encoding is used. Since the page is mounted, this
should not be returning null.


There culprit is here, in class
BookmarkablePageRequestTargetUrlCodingStrategy. The "matches" method
looks like this:

  public boolean matches(IRequestTarget requestTarget)
  {
      if (requestTarget instanceof IBookmarkablePageRequestTarget)
      {
          IBookmarkablePageRequestTarget target =
(IBookmarkablePageRequestTarget)requestTarget;
          if (bookmarkablePageClass.equals(target.getPageClass()))
          {
              if (this.pageMapName == null)
              {
                  return true;
              }
              else
              {
                  return
this.pageMapName.equals(target.getPageMapName());
              }
          }
      }
      return false;
  }


In the case of my tree, requestTarget is of type
wicket.request.target.resource.SharedResourceRequestTarget. This causes
the method to return null and, consequently, for mounting of the page to
abort.



Why is this and what should I do?


Thank you!
Dave





On Thu, 2006-07-13 at 16:45 +0900, David Leangen wrote:
> How would I go about getting the Tree component to "listen" to my mount
> point? I mounted the page and would like to do away with the use of
> sessions, but when I click on a node, I "lose" the mount point on the
> page.
> 
> This is how the link is created:
> 
>   protected Link createNodeLink(final DefaultMutableTreeNode node)
>   {
>       final Link nodeLink = new Link("nodeLink")
>       {
>           private static final long serialVersionUID = 1L;
> 
>           public void onClick()
>           {
>               nodeLinkClicked(node);
>           }
>       };
>       nodeLink.add(getNodeImage(node));
>       nodeLink.add(new Label("label", getNodeLabel(node)));
>       return nodeLink;
>   }
> 
> 
> Any simple pointers, before I begin to spend too much time on this?
> 
> 
> Thanks!
> Dave
> 
> 
> 
> 
> 
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to