Re: [Wicket-user] Changing visibility via ajax

2006-07-21 Thread Paolo Di Tommaso
You are right, but the problem is the panel that is not really a panel as I say but a container .. so I cannot switch with an empty panel. Anyway I don't think is a bad idea to have a display attribute for Component, for now I've solved using the following class. public class HideableContainer ext

Re: [Wicket-user] Changing visibility via ajax

2006-07-20 Thread Igor Vaynberg
i dont think what you are thinking about is a very clean solution.if you want to avoid an extra container do this:instead of initially adding the component and setting visible to false add an EmptyPanel, then instead of making your component visible create an instance and replace the panel with it.

Re: [Wicket-user] Changing visibility via ajax

2006-07-20 Thread Paolo Di Tommaso
I was supposing that but I would like to have a simpler structure avoiding to add unuseful container. My idea is to hide the component using a simple css class or style display: none.I think it should possible using an AttributeModifier but I don't know how to override the default visibility mechan

Re: [Wicket-user] Changing visibility via ajax

2006-07-20 Thread Igor Vaynberg
the problem is that if the panel is hidden initially it doesnt have its div/span tag with an id attribute in the markup, so the ajax request cannot find the tag to redraw.in situations like this you have to wrap the panel in a webmarkupcontainer, call setoutputmarkupid(true) on it, and target that

[Wicket-user] Changing visibility via ajax

2006-07-20 Thread Paolo Di Tommaso
I want to change visibility attribute of a panel (containing other components) using Ajax. The panel initially is hidden  panel.setVisible( false ).When user change selection in a radio group the panel should become visible. I've tried to do something like that :radio.add( new AjaxFormComponentUpd