Wicket's error message-> java.lang.IllegalStateException: This container is already dequeing
I am trying out the Wicket framework using version 8. I have been battling this strange error without success. I am using Payara application server on Windows 10 The required info is below, any tips or help in finding out where the problem is would be appreciated. I looked into stackoverflow, pretty much any help sites for similar questions but did not find any. It seems deque preamble is being called erroneously by wicket. Java Source below public class PrescientHome extends PrescientTemplateOriginalPage { private Model zipManager; private Form occForm; private WebMarkupContainer tagFrame; private Login login; private Model occupationListModel; private List occupationList; private DropDownChoice occupationChoices; public PrescientHome() { super(); } @Override protected void onInitialize() { super.onInitialize(); zipManager=Model.of(new ZipManagedBean()); login=new Login(); login.setResponsePage(Login.class); occupationListModel= new Model<>(); occupationList=zipManager.getObject().getOccCode(); occupationChoices=new DropDownChoice<>("occupationModel",occupationListModel, occupationList ); occForm=new Form("occupationForm"){ @Override protected void onSubmit() { super.onSubmit(); } }; occForm.add(occupationChoices); add(occForm); tagFrame=new WebMarkupContainer("TagFrame"); tagFrame.add(login); add(tagFrame); } } HTML Source below TODO supply a title Doctors : Choose one Physician Dentist Optometrist . The error displayed below. java.lang.IllegalStateException: This container is already dequeing: [Page class = org.prescients.prescientdocwicket.PrescientHome, id = 0, render count = 0] at org.apache.wicket.MarkupContainer.dequeuePreamble(MarkupContainer.java:1918) at org.apache.wicket.MarkupContainer.dequeue(MarkupContainer.java:1856) at org.apache.wicket.MarkupContainer.dequeueChild(MarkupContainer.java:2018) at org.apache.wicket.MarkupContainer.dequeue(MarkupContainer.java:1983) at org.apache.wicket.MarkupContainer.dequeuePreamble(MarkupContainer.java:1931) at org.apache.wicket.MarkupContainer.dequeue(MarkupContainer.java:1856) at org.apache.wicket.MarkupContainer.onInitialize(MarkupContainer.java:1887) at org.apache.wicket.Page.onInitialize(Page.java:298) atorg.prescients.prescientdocwicket.PrescientTemplateOriginalPage.onInitialize(PrescientTemplateOrigi nalPage.java:36) at org.prescients.prescientdocwicket.PrescientHome.onInitialize(PrescientHome.java:48) -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket's error message-> java.lang.IllegalStateException: This container is already dequeing
If what you want is redirecting the user to the Login page after the form submit, you need to remove all references to the Login class in the PrescientHome class, then in the form # onSubmit you can use the code setResponsePage(Login.class). Have a look at wicket links and wicket forms https://ci.apache.org/projects/wicket/guide/8.x/single.html#_wicket_links https://ci.apache.org/projects/wicket/guide/8.x/single.html#_wicket_forms By the way you should give a try to Wicket 9 ! Hope this help François > Le 27 déc. 2019 à 16:05, LSomefun a écrit : > > I am trying out the Wicket framework using version 8. I have been battling > this strange error without success. I am using Payara application server on > Windows 10 The required info is below, any tips or help in finding out where > the problem is would be appreciated. I looked into stackoverflow, pretty > much any help sites for similar questions but did not find any. > It seems deque preamble is being called erroneously by wicket. > > Java Source below > > > > public class PrescientHome extends PrescientTemplateOriginalPage { > > private Model zipManager; > private Form occForm; > > private WebMarkupContainer tagFrame; > private Login login; > private Model occupationListModel; > private List occupationList; > private DropDownChoice occupationChoices; > public PrescientHome() > > { super(); } > @Override > protected void onInitialize() { > super.onInitialize(); > zipManager=Model.of(new ZipManagedBean()); > > login=new Login(); > login.setResponsePage(Login.class); > occupationListModel= new Model<>(); > occupationList=zipManager.getObject().getOccCode(); > occupationChoices=new > DropDownChoice<>("occupationModel",occupationListModel, occupationList ); > > occForm=new Form("occupationForm"){ > @Override > protected void onSubmit() > > { super.onSubmit(); } > }; > occForm.add(occupationChoices); > add(occForm); > tagFrame=new WebMarkupContainer("TagFrame"); > tagFrame.add(login); > add(tagFrame); > > } > > > > > > > > } > > > HTML Source below > > > > > > TODO supply a title > > > > > > > > > > > > Doctors : > > Choose one > Physician > Dentist > Optometrist > > . > > > > > > > > The error displayed below. > java.lang.IllegalStateException: This container is already dequeing: [Page > class = > org.prescients.prescientdocwicket.PrescientHome, id = 0, render count = 0] > at > org.apache.wicket.MarkupContainer.dequeuePreamble(MarkupContainer.java:1918) > at org.apache.wicket.MarkupContainer.dequeue(MarkupContainer.java:1856) > at org.apache.wicket.MarkupContainer.dequeueChild(MarkupContainer.java:2018) > at org.apache.wicket.MarkupContainer.dequeue(MarkupContainer.java:1983) > at > org.apache.wicket.MarkupContainer.dequeuePreamble(MarkupContainer.java:1931) > at org.apache.wicket.MarkupContainer.dequeue(MarkupContainer.java:1856) > at org.apache.wicket.MarkupContainer.onInitialize(MarkupContainer.java:1887) > at org.apache.wicket.Page.onInitialize(Page.java:298) > atorg.prescients.prescientdocwicket.PrescientTemplateOriginalPage.onInitialize(PrescientTemplateOrigi > > nalPage.java:36) > at > org.prescients.prescientdocwicket.PrescientHome.onInitialize(PrescientHome.java:48) > > -- > Sent from: > http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html > > - > 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
Re: Wicket's error message-> java.lang.IllegalStateException: This container is already dequeing
Thanks for your reply Francois, much appreciated. Even when I adjust my code and remove the login object from the source code and from the html tag like the code below I still get the same error I was encountering. I definitely will try version 9 in the near future as soon as I can solve the current problem the framework is showing. Java Source below > > > > public class PrescientHome extends PrescientTemplateOriginalPage { > > private Model zipManager; > private Form occForm; > > private WebMarkupContainer tagFrame; > private Login login; > private Model occupationListModel; > private List occupationList; > private DropDownChoice occupationChoices; > public PrescientHome() > > { super(); } > @Override > protected void onInitialize() { > super.onInitialize(); > zipManager=Model.of(new ZipManagedBean()); > > > occupationListModel= new Model<>(); > occupationList=zipManager.getObject().getOccCode(); > occupationChoices=new > DropDownChoice<>("occupationModel",occupationListModel, occupationList ); > > occForm=new Form("occupationForm"){ > @Override > protected void onSubmit() > > { super.onSubmit(); } > }; > occForm.add(occupationChoices); > add(occForm); > > } > > > > > > > > } > > > HTML Source below > > > > > > TODO supply a title > > > > > > > > > > Doctors : > > Choose one > Physician > Dentist > Optometrist > > . > > > > > -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket's error message-> java.lang.IllegalStateException: This container is already dequeing
Could you show us the new stacktrace and the PrescientTemplateOriginalPage code ? François > Le 27 déc. 2019 à 22:51, LSomefun a écrit : > > Thanks for your reply Francois, much appreciated. Even when I adjust my code > and remove the login object from the source code and from the html tag like > the code below I still get the same error I was encountering. I definitely > will try version 9 in the near future as soon as I can solve the current > problem the framework is showing. > > Java Source below >> >> >> >> public class PrescientHome extends PrescientTemplateOriginalPage { >> >> private Model zipManager; >> private Form occForm; >> >> private WebMarkupContainer tagFrame; >> private Login login; >> private Model occupationListModel; >> private List occupationList; >> private DropDownChoice occupationChoices; >> public PrescientHome() >> >> { super(); } >> @Override >> protected void onInitialize() { >> super.onInitialize(); >> zipManager=Model.of(new ZipManagedBean()); >> >> >> occupationListModel= new Model<>(); >> occupationList=zipManager.getObject().getOccCode(); >> occupationChoices=new >> DropDownChoice<>("occupationModel",occupationListModel, occupationList ); >> >> occForm=new Form("occupationForm"){ >> @Override >> protected void onSubmit() >> >> { super.onSubmit(); } >> }; >> occForm.add(occupationChoices); >> add(occForm); > >> >> } >> >> >> >> >> >> >> >> } >> >> >> HTML Source below >> >> >> >> >> >> TODO supply a title >> >> >> >> >> >> >> >> >> >> Doctors : >> >> Choose one >> Physician >> Dentist >> Optometrist >> >> . >> >> >> >> >> > > -- > Sent from: > http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html > > - > 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