Re: How reload necessary Panel inside common layout?
Thank You very much!!! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-reload-necessary-Panel-inside-common-layout-tp4677948p4677977.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: How reload necessary Panel inside common layout?
Thanks for reply I suppose I have to add my component panel to AjaxRequestTarget (target.add(panel) itp..) but my problem is that I do not understand how handle panels (Panel3 / 4) inside Panel2 and redirect (display) to some WebPage (MainPage). When I use simple page it is ok (just I am expanding my parent class add BookmarkablePageLink and in html ) but when I use panels I do not know how to handle it. I'm sorry for English -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-reload-necessary-Panel-inside-common-layout-tp4677948p4677969.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: How reload necessary Panel inside common layout?
Have a look at https://ci.apache.org/projects/wicket/guide/8.x/single.html#_working_with_ajax <https://ci.apache.org/projects/wicket/guide/8.x/single.html#_working_with_ajax> François > Le 30 mai 2017 à 14:32, Sokab <sokab3...@gmail.com> a écrit : > > Hi. I follow this post > ( > https://stackoverflow.com/questions/24061261/loading-wicket-panels-dynamically-in-a-div > <https://stackoverflow.com/questions/24061261/loading-wicket-panels-dynamically-in-a-div> > > ) and try display necessary Panel inside layout but I really can't do it. > > I created a sample project: > > public class WicketApplication extends WebApplication{ >@Override >public Class getHomePage() >{ >return MainPage.class; >} > >@Override >protected void init() { >super.init(); >} > } > > *** > MainPage.html: > > http://wicket.apache.org;> > > >Main Page > > > > > > > > > MainPage.java: > > public class MainPage extends WebPage{ > >@Override >protected void onInitialize() { >super.onInitialize(); > >add(new Panel1("panel1")); >} > } > > *** > Panel1.html: > http://wicket.apache.org;> > > > > > > > > > Panel1.java: > public class Panel1 extends Panel{ > >public Panel1(String id) { >super(id); >} > >@Override >protected void onInitialize() { >super.onInitialize(); > >add(new Panel2("panel2")); >} > } > > *** > Panel2.html: > http://wicket.apache.org;> > > > > Page1 <#> > Page2 <#> > > > > > > > Panel2.java: > public class Panel2 extends Panel{ > >public Panel2(String id) { >super(id); >} > >@Override >protected void onInitialize() { >super.onInitialize(); > > >add(new AjaxLink("page3") { >@Override >public void onClick(AjaxRequestTarget target) { > // ?? >} >}); > > >add(new AjaxLink("page4") { >@Override >public void onClick(AjaxRequestTarget target) { > //?? >} >}); > >} > } > > *** > Panel3.html: > http://wicket.apache.org;> > > > Panel 3 Content > > > > > Panel3.java: > public class Panel3 extends Panel{ >public Panel3(String id) { >super(id); >} > } > > *** > Panel4.html: > http://wicket.apache.org;> > > > Panel 4 Content > > > > > Panel4.java: > public class Panel4 extends Panel{ > public Panel4(String id) { >super(id); >} > } > ** > After clicked on AjaxLink inside Panel2 I need display panel3 or panel4 in > MainPage without reload all page. How can I do this? Can I call > wicket:id="homePanel" from MainPage.html inside Panel2.java and and replace > panel3/panel4 after ajax request? Thank You for any hint. > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/How-reload-necessary-Panel-inside-common-layout-tp4677948.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 >
How reload necessary Panel inside common layout?
Hi. I follow this post ( https://stackoverflow.com/questions/24061261/loading-wicket-panels-dynamically-in-a-div <https://stackoverflow.com/questions/24061261/loading-wicket-panels-dynamically-in-a-div> ) and try display necessary Panel inside layout but I really can't do it. I created a sample project: public class WicketApplication extends WebApplication{ @Override public Class getHomePage() { return MainPage.class; } @Override protected void init() { super.init(); } } *** MainPage.html: http://wicket.apache.org;> Main Page MainPage.java: public class MainPage extends WebPage{ @Override protected void onInitialize() { super.onInitialize(); add(new Panel1("panel1")); } } *** Panel1.html: http://wicket.apache.org;> Panel1.java: public class Panel1 extends Panel{ public Panel1(String id) { super(id); } @Override protected void onInitialize() { super.onInitialize(); add(new Panel2("panel2")); } } *** Panel2.html: http://wicket.apache.org;> Page1 <#> Page2 <#> Panel2.java: public class Panel2 extends Panel{ public Panel2(String id) { super(id); } @Override protected void onInitialize() { super.onInitialize(); add(new AjaxLink("page3") { @Override public void onClick(AjaxRequestTarget target) { // ?? } }); add(new AjaxLink("page4") { @Override public void onClick(AjaxRequestTarget target) { //?? } }); } } *** Panel3.html: http://wicket.apache.org;> Panel 3 Content Panel3.java: public class Panel3 extends Panel{ public Panel3(String id) { super(id); } } *** Panel4.html: http://wicket.apache.org;> Panel 4 Content Panel4.java: public class Panel4 extends Panel{ public Panel4(String id) { super(id); } } ** After clicked on AjaxLink inside Panel2 I need display panel3 or panel4 in MainPage without reload all page. How can I do this? Can I call wicket:id="homePanel" from MainPage.html inside Panel2.java and and replace panel3/panel4 after ajax request? Thank You for any hint. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-reload-necessary-Panel-inside-common-layout-tp4677948.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