Hi, All you have explained should just work. It seems the component is still invisible after setVisible(true). Maybe you override it later ?! As you said in #onConfigure() or #isVisible() returns false ? Please show some code.
On Thu, Mar 28, 2013 at 12:30 PM, Patrick Davids <patrick.dav...@nuboit.de>wrote: > Additional info: > > Its now working partially... > > I removed the onConfigure() of the markup container to determine the > initial visibility of itself depending on the radio default choice. > > So, my question changes to: > Whats the best way todo such an initial visibility without affecting the > ajax visibility changing? > > Patrick > > > Am 28.03.2013 11:18, schrieb Sven Meier: > >> My behavior on the gui is: > >> - the first render process of the page itself shows the container once > >> - on clicking my radiochoice the webmarkupcontainer disappears but is > >> still available, due to outPutMarkUpPlaceHolder true, but the content is > >> completly removed and the visibility of the container is always > >> display:none. > >> > >> Using setVisible or using setVisibilityAllowed does not make any > changes. > > > > So your container disappears but does not show up again after setting it > > visible? > > > > Sven > > > > On 03/28/2013 11:12 AM, Patrick Davids wrote: > >> Hi together, > >> I searched the web for several hours and always get the same results for > >> setting the visibilty for components via ajax, but I cannot get it work. > >> > >> The "should work" solution is: > >> - Creat an extra a WebMarkupContainer in your page > >> - add your subcomponents to this container > >> - setOutPutMarkUpIdPlacerHolderTag(true) for the container > >> - implement ajax anywhere (in my case its an > >> AjaxFormChoiceComponentUpdatingBehavior) > >> - override its onUpdate and setVisibilty of the container true or false > >> depending on something > >> - do target.add( the webmarkupcontainer ) > >> > >> Tada... but nothing happens. > >> > >> My problems are: > >> All solutions I found are about 2-5 years old, so: > >> - the usage of setVisibilty has changed (setVisible vs. > >> setVisibilityAllowed() discussion) > >> - target does not have an addComponent() method anymore (but this is > >> easy, should be add(...)) > >> - perhaps the hole "SetVisibilityViaAjax"-way has changed since newer > >> wicket versions? > >> > >> My behavior on the gui is: > >> - the first render process of the page itself shows the container once > >> - on clicking my radiochoice the webmarkupcontainer disappears but is > >> still available, due to outPutMarkUpPlaceHolder true, but the content is > >> completly removed and the visibility of the container is always > >> display:none. > >> > >> Using setVisible or using setVisibilityAllowed does not make any > changes. > >> > >> Whats wrong?!? :-( > >> > >> (using wicket 6.6) > >> > >> kind regards > >> Patrick > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > >> For additional commands, e-mail: users-h...@wicket.apache.org > >> > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > -- > Mit freundlichen Grüßen, > > Patrick Davids > > NuboIT GmbH & Co. KG > Kieler Str. 103-107 • 25474 Bönningstedt > > Email: patrick.dav...@nuboit.de > > Handelsregister: HRA6819 Pi | Amtsgericht Pinneberg > > Geschäftsführung der Verwaltungsgesellschaft > Daniel Fraga Zander > > HRB10145Pi | Amtsgericht Pinneberg -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com <http://jweekend.com/>