I am trying to setup a web page with 2 frames. The first frame has a
list of links. When I click on one of these links, I want to create an
object associated with the link to render the second frame. Right now,
when I click the links, I get "Page Expired" errors when loading the
second frame.
I tried to follow the design from the Wickets example code for frames.
The main difference is that instead of setting a class to load in the
frame, I am creating a new object to load in the frame. The code below
demonstrates what I'm doing.
Any help pointing me in the right direction would be greatly appreciated.
Marty
_Body_
// TOP FRAME SETUP
TopFrame topFrame = new TopFrame (this);
topFrameTarget.setFrameClass (topFrame);
WebComponent topFrameTag = new WebComponent ("topFrame");
topFrameTag.add (new AttributeModifier ("src", new TopFrameModel
()));
add (topFrameTag);
// BOTTOM FRAME SETUP
BottomFrame bottomFrame = new BottomFrame ();
frameTarget.setFrameClass (bottomFrame);
WebComponent bottomFrameTag = new WebComponent ("bottomFrame");
bottomFrameTag.add (new AttributeModifier ("src", new
BottomFrameModel () ));
add (bottomFrameTag);
_Top Frame_
ChangeFramePageLink link = new ChangeFramePageLink ("newLink",
index, obj); //new link to render second frame
public ChangeFramePageLink (String id, Body body, Object obj) {
super (id);
this.body = body;
this.object = obj;
}
public void onClick () {
// change frame class
body.getFrameTarget().setFrameClass (new BottomFrame(object));
setResponsePage (body);
}
}
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user