On 3/20/07, Michel Wichers <[EMAIL PROTECTED]> wrote:
> Hi guys,
>
> I'm currently developing a page with two frames. The left frame
> "SelectionFrame" contains an extensions Tree and the right frame "Main"
> contains any Contents.
>
> What i now want to do is to respond to the Contents Frame by clicking on
> some special tree nodes.
>
> e.g.:
> ...
>             @Override
>             protected void onNodeLinkClicked(AjaxRequestTarget target,
> TreeNode node)
>             {
>                 IConfigurationPage userObj = (IConfigurationPage)
> ((DefaultMutableTreeNode) node).getUserObject();
>                 setResponsePage(new ConfigMainPage(userObj));
>             }
> ...
>
> If you know any easy solution it would be great to share that with me.
> Any help would be appreciated.
>
>
> cheers!
>
> Michel


If you are doing this with ajax, you probably don't want to call
setResponsePage. You should wrap your target frame with a
WebMarkupContainer or Panel and add that to the AjaxRequestTarget.
Excuse the formatting please:

  @Override
             protected void onNodeLinkClicked(AjaxRequestTarget target,
TreeNode node)             {
//                IConfigurationPage userObj = (IConfigurationPage)
// ((DefaultMutableTreeNode) node).getUserObject();
//                 setResponsePage(new ConfigMainPage(userObj));
   WebMarkupContainer frame = new WebMarkupContainer("frameId");
    frame.add(new AttributeModifier("src",
urlFor(PageMap.forName("FramePageMap), ConfigMainPage.class, /*
PageParameters if you have them */ null));
     target.addComponent(frame);
     }
...

Then just make sure one of your frames has wicket:id="frameId".

Let me know if you need more help.

best,
jim

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to