Igor Vaynberg wrote:
Well, it's true, but the problem I was heaving wasn't related to coupling between panels or anything, but it was the fact that somehow, though I set the panels to invisible in the submit handler, the page seem to ignore this fact until I reopen it.What do you mean by "reopen" it?
I mean, access the page through the menu link which opens it. In contrast with the page being delivered as a result of the form submission.
The following works for me, it toggles between panels when the button is pressed: public Index(final PageParameters parameters){ add(new TestPanel("a")); add(new TestPanelB("b").setVisible(false));add(new Form("form") {protected void onSubmit() { Component a=getPage().get("a"); a.setVisible(!a.isVisible());Component b=getPage().get("b");b.setVisible(!b.isVisible()); } }); }
Well, the difference here is that the form is actually on one of the panels. What I'm trying to achieve is loose coupling between the panels, I want them to be set visible/invisible based on session stored information (session user is null or not). Thanks anyway, I'll try harder :-)
-Igor
------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information _______________________________________________ Wicket-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-user
