I'd be happy to not use frames, but I don't have the choice at this
time because the application is already written using frames and time
won't permit a total rewrite---at least that was our thinking when we
decided to leave most of the application as-is. From my experience so
far, I guess we should have just abandoned frames because it's harder
to work with them using Wicket. That's no fault of Wicket---it's
designed for panels and not frames.
-Devin
On 11/1/07, Matej Knopp <[EMAIL PROTECTED]> wrote:
> Why do you use frames anyway? If you want to pass things between
> frames javascript is the only way, but I don't see what's the point of
> using frames when you have framework capable of Ajax partial page
> updates.
>
> -Matej
>
> On 11/1/07, Devin Venable <[EMAIL PROTECTED]> wrote:
> > I posted a question a few days ago on how to best deal with frames, in
> > particular how to pass arguments between a tree view in one frame and
> > a list view in another. I didn't get any takers.
> >
> > I finally determined that there was no good way other than to use
> > plain-old javascript to push values from the tree up to the parent
> > frame, where they are dispersed to the other frames.
> >
> > I wanted to use LinkTree, but really didn't need most of the features
> > other than the look and feel. I just needed to be able to insert an
> > onclick link that would pass a value to my parent frame.
> >
> > After a lot of digging I came up with a solution that worked, but
> > seems verbose for the job I'm attempting. My question for dear reader
> > is this: Can you propose an more concise solution?
> >
> >
> > public class CategoryTree extends LinkTree
> > {
> > @Override
> > protected Component newNodeComponent(String id, IModel model)
> > {
> > return new LinkIconPanel(id, model, CategoryTree.this)
> > {
> > private static final long serialVersionUID = 1L;
> >
> > protected void onNodeLinkClicked(TreeNode node,
> > BaseTree tree,
> > AjaxRequestTarget target)
> > {
> > super.onNodeLinkClicked(node, tree, target);
> > CategoryTree.this.onNodeLinkClicked(node,
> > tree, target);
> > }
> >
> > protected Component newContentComponent(String
> > componentId,
> > BaseTree tree, IModel model)
> > {
> > Label l = new Label(componentId, model)
> > {
> > private static final long serialVersionUID
> > = 1L;
> >
> > @Override
> > protected void onComponentTag(ComponentTag tag)
> > {
> > super.onComponentTag(tag);
> > tag.put("onclick",
> > "parent.notifyViews(this.getAttribute('catalogid'))");
> >
> > }
> > };
> >
> > DefaultMutableTreeNode n =
> > (DefaultMutableTreeNode)model.getObject();
> >
> > if (n.getUserObject() instanceof EcCategoryTreeNode)
> > {
> > EcCategoryTreeNode ec =
> > (EcCategoryTreeNode)n.getUserObject();
> > l.add(new SimpleAttributeModifier("catalogid", "" +
> > ec.getId()));
> > }
> >
> > return l;
> > };
> > };
> > }
> >
> > public CategoryTree(String s, TreeModel tm)
> > {
> > super(s,tm);
> > this.setLinkType(LinkType.REGULAR);
> > }
> >
> > }
> >
> > Devin
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Devin Venable
Senior Programmer Analyst
Vetsource
Work: 503-802-7471
Mobile: 918-946-6806
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]