Re: Ajax hide/show does not work
It works now, thanks! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Ajax-hide-show-does-not-work-tp4650267p4650271.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Ajax hide/show does not work
I do not understand this. I made a panel that must be hidden on click or show up on another Hiding works the first time then never again. SHow never works What do i wrong?? == html head titleWicket Examples - upload/title link rel=stylesheet type=text/css href=style.css/ /head body Test # Show 1 br/ # Show 2 br/ div wicket:id=panel1 style=background-color: green; Kijk eens naar Panel1 /div div wicket:id=panel2 style=background-color: yellow; Je kijkt naar panel2 /div /body /html final WebMarkupContainer panel1 = new WebMarkupContainer(panel1); private boolean toon1; public HidePage(){ add(panel1); panel1.setVisible(false); panel1.setOutputMarkupId(true); add(toon1()); } private AjaxLink toon1() { AjaxLink link1 = new AjaxLink(link1){ private static final long serialVersionUID = 1L; public void onClick(AjaxRequestTarget target) { System.out.println(link 1 +!toon1); panel1.setVisible(true); target.add(panel1); } }; return link1; } private AjaxLink toon2() { AjaxLink link2 = new AjaxLink(link2){ private static final long serialVersionUID = 1L; public void onClick(AjaxRequestTarget target) { System.out.println(link 2 +!toon2); panel1.setVisible(false); target.add(panel1); } }; return link2; } } -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Ajax-hide-show-does-not-work-tp4650267.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Ajax hide/show does not work
Hi, try setOutputMarkupPlaceholderTag instead of setOutputMarkupId. I do not understand this. I made a panel that must be hidden on click or show up on another Hiding works the first time then never again. SHow never works What do i wrong?? == html head titleWicket Examples - upload/title link rel=stylesheet type=text/css href=style.css/ /head body Test # Show 1 br/ # Show 2 br/ div wicket:id=panel1 style=background-color: green; Kijk eens naar Panel1 /div div wicket:id=panel2 style=background-color: yellow; Je kijkt naar panel2 /div /body /html final WebMarkupContainer panel1 = new WebMarkupContainer(panel1); private boolean toon1; public HidePage(){ add(panel1); panel1.setVisible(false); panel1.setOutputMarkupId(true); add(toon1()); } private AjaxLink toon1() { AjaxLink link1 = new AjaxLink(link1){ private static final long serialVersionUID = 1L; public void onClick(AjaxRequestTarget target) { System.out.println(link 1 +!toon1); panel1.setVisible(true); target.add(panel1); } }; return link1; } private AjaxLink toon2() { AjaxLink link2 = new AjaxLink(link2){ private static final long serialVersionUID = 1L; public void onClick(AjaxRequestTarget target) { System.out.println(link 2 +!toon2); panel1.setVisible(false); target.add(panel1); } }; return link2; } } -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Ajax-hide-show-does-not-work-tp4650267.html Sent from the Users forum mailing list archive at Nabble.com. - 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