Re: Best way to hide a component

2010-07-25 Thread mgoodson
I've done what you all recommended and the code is way tidier now! Thanks everyone! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Best-way-to-hide-a-component-tp2299412p2301736.html Sent from the Wicket - User mailing list archive at Nabble.com. ---

Re: Best way to hide a component

2010-07-23 Thread Ian Marshall
My HTML code did not come out correctly. I wanted it displayed as: One | Two -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Best-way-to-hide-a-compone

Re: Best way to hide a component

2010-07-23 Thread Ian Marshall
Don't forget using the "wicket:enclosure" tag. For example: # One | # Two Link lnk1 = new Link("lnk1") { private static final long serialVersionUID = 1L; @Override public void onClick() { // // ... // } }; lnk1.setVisible(...)

Re: Best way to hide a component

2010-07-23 Thread Mark Doyle
Yeah, I do something similar. You can override the isVisible method in your components, possibly adding some logic that ties the visibility to a variable. You only have to manage the one variable then and all the components will know when to display or not. On Fri, Jul 23, 2010 at 9:02 AM, Nived

Re: Best way to hide a component

2010-07-23 Thread Nivedan Nadaraj
I have done the setVisible too for hiding components. Sometimes if there were a group of them, placing them in a container(WebMarkupContainer) and setting the visibility to t/f on the container works too. Cheers Niv On Fri, Jul 23, 2010 at 2:36 PM, Andrea Selva wrote: > Hi, > Instead of switch

Re: Best way to hide a component

2010-07-22 Thread Andrea Selva
Hi, Instead of switching between components, i think that using the setVisible method of component class could be a better solution. This is the principle i read in the in Wicket in Action book when the want to hide a container of other thing. I hope this could help you Andrea On Thu, Jul 22, 201