Re: Wicket's error message-> java.lang.IllegalStateException: This container is already dequeing

2019-12-28 Thread LSomefun
I do appreciate you looking at this while on holiday. The 2nd constructor of
PrescientTemplateOriginalPage I have deleted. Truth is it was not needed.
The HTML code of PrescientHome I initially submitted did not include the
HeaderPanel and footerPanel, was because of inheritance from
PrescientTemplateOriginalPage so did not need to include them. 
The HTML Code from PrescientTemplateOriginalPage is below


Template





  
 
   





And the HTML code from PrecientHome is 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



Best way to refresh entire NestedTree

2019-12-28 Thread Chris Colman
I have a UI layout where selection changes in one component need to 
result in a complete repopulation of the nodes in an associated NestedTree.


Obviously I don't want to do a complete page refresh so I was wondering 
what the best way is to do an AJAX refresh of the entire NestedTree 
after I've told it, somehow, that all of its nodes need to be replaced.


Is it as simple as just replacing the ITreeProvider and then adding the 
NestedTree to the AJAX request target or is there something more involved?


Merry Christmas/Holiday everyone,

Regards,

Chris



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Best way to refresh entire NestedTree

2019-12-28 Thread chrisco
I have a UI layout where selection changes in one component need to result in
a complete repopulation of the nodes in an associated NestedTree.

Obviously I don't want to do a complete page refresh so I was wondering what
the best way is to do an AJAX refresh of the entire NestedTree after I've
told it, somehow, that all of its nodes need to be replaced.

Is it as simple as just replacing the ITreeProvider and then adding the
NestedTree to the AJAX request target or is there something more involved?

Merry Christmas/Holiday everyone,

Regards,

Chris

--
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

2019-12-28 Thread francois meillet
There are few problems I can see (from my mobile, being on hollidays )
First you should not pass component to  PrescientTemplateOriginalPage 
constructor's argument.
Second : in the second constructor you do not add the panels to the page
Third : in the html code the header and footer tags are not presents

Francois

> Le 28 déc. 2019 à 15:19, LSomefun  a écrit :
> 
> Thanks for you reply. Included more codes below.
> 
> Code for PrescientTemplateOriginalPage below
> package org.possible.bug;
> 
> import org.apache.wicket.markup.html.WebPage;
> import org.apache.wicket.markup.html.basic.Label;
> import org.apache.wicket.model.Model;
> 
> /**
> *
> * @author oyeso
> */
> public class PrescientTemplateOriginalPage extends WebPage {
> 
>private final String footerId="footerPanel";
>private final String headerId="headerPanel";
> 
> 
> 
> 
>private FooterPanel footer;
>private HeaderPanel header;
> 
>public PrescientTemplateOriginalPage() {
>   this.header = new HeaderPanel(headerId);
> 
>this.footer = new FooterPanel(footerId);
> 
> add(header);
> add(footer);
>}
> 
> 
> 
> 
> 
>public PrescientTemplateOriginalPage( FooterPanel footer, HeaderPanel
> header) {
> 
>this.footer = footer;
>this.header = header;
> 
>}
> 
> 
> }
> 
> Code for HeaderPanel below
> 
> import org.apache.wicket.Component;
> import org.apache.wicket.MarkupContainer;
> import org.apache.wicket.behavior.Behavior;
> import org.apache.wicket.markup.html.basic.Label;
> import org.apache.wicket.markup.html.image.Image;
> import org.apache.wicket.markup.html.panel.Panel;
> import org.apache.wicket.model.Model;
> 
> public class HeaderPanel extends Panel{
>   private Label header;
>   private Image imgHeader;
>public HeaderPanel(String id) {
>super(id);
>  header=new Label("prescientDoctorsLabel",Model.of("Prescient
> Doctors") );
> 
>add(header);
> 
>}
> 
> 
> 
> 
> 
> 
> }
> 
> Code for FooterPanel Below
> 
> import org.apache.wicket.markup.html.basic.Label;
> import org.apache.wicket.markup.html.panel.Panel;
> import org.apache.wicket.model.Model;
> 
> public class FooterPanel extends Panel{
> 
>public FooterPanel(String id) {
>super(id);
>add(new Label("footerLabel",Model.of("Footer Label Here")));
>}
> 
> }
> 
> Code for PrecientHome below
> 
> package org.possible.bug;
> 
> import java.io.IOException;
> import java.util.List;
> import java.util.logging.Level;
> import java.util.logging.Logger;
> import org.apache.wicket.markup.html.MarkupUtil;
> import org.apache.wicket.markup.html.WebMarkupContainer;
> import org.apache.wicket.markup.html.WebPage;
> import org.apache.wicket.markup.html.basic.Label;
> import org.apache.wicket.markup.html.form.DropDownChoice;
> import org.apache.wicket.markup.html.form.Form;
> import org.apache.wicket.markup.html.form.FormComponentUpdatingBehavior;
> import org.apache.wicket.model.Model;
> import org.apache.wicket.model.PropertyModel;
> 
> /**
> *
> * @author oyeso
> */
> 
> 
> public class PrescientHome  extends PrescientTemplateOriginalPage {
> 
>private Model zipManager;
>private Form occForm;
> 
>private WebMarkupContainer tagFrame;
> 
>private Model occupationListModel;
>private List  occupationList;
>private DropDownChoice occupationChoices;
> 
>public PrescientHome() {
> 
>zipManager=Model.of(new ZipManagedBean());
> 
> 
> 
> occupationListModel= new Model<>();
> occupationList=zipManager.getObject().getOccCode();
> occupationChoices=new
> DropDownChoice<>("occupationModel",occupationListModel, occupationList );
> 
>//queue(occForm);
>occForm=new Form("occupationForm"){
>   @Override
>   protected void onSubmit() {
> 
>   //Do the next thing
>   }
> 
>};
>   occForm.add(occupationChoices);
>   add(occForm);
> 
> 
>}
> 
> 
> New Stack Trace below
> java.lang.IllegalStateException: This container is already dequeing: [Page
> class = org.possible.bug.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)
>at org.apache.wicket.Component.fireInitialize(Component.java:873)
>at
> org.apache.wicket.MarkupContainer.internalInitialize(MarkupContainer.java:1038)
>at org.apache.wicket.Page.isPageStateless(Page.java:461)
>at
> 

Re: Wicket's error message-> java.lang.IllegalStateException: This container is already dequeing

2019-12-28 Thread LSomefun
Thanks for you reply. Included more codes below.

Code for PrescientTemplateOriginalPage below
package org.possible.bug;

import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.model.Model;

/**
 *
 * @author oyeso
 */
public class PrescientTemplateOriginalPage extends WebPage {
  
private final String footerId="footerPanel";
private final String headerId="headerPanel";




private FooterPanel footer;
private HeaderPanel header;

public PrescientTemplateOriginalPage() {
   this.header = new HeaderPanel(headerId);
   
this.footer = new FooterPanel(footerId);
   
 add(header);
 add(footer);
}

 

   

public PrescientTemplateOriginalPage( FooterPanel footer, HeaderPanel
header) {
   
this.footer = footer;
this.header = header;
   
}


}

Code for HeaderPanel below

import org.apache.wicket.Component;
import org.apache.wicket.MarkupContainer;
import org.apache.wicket.behavior.Behavior;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.image.Image;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.Model;

public class HeaderPanel extends Panel{
   private Label header;
   private Image imgHeader;
public HeaderPanel(String id) {
super(id);
  header=new Label("prescientDoctorsLabel",Model.of("Prescient
Doctors") );
  
add(header);

}

   

   


}

Code for FooterPanel Below

import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.Model;

public class FooterPanel extends Panel{

public FooterPanel(String id) {
super(id);
add(new Label("footerLabel",Model.of("Footer Label Here")));
}

}

Code for PrecientHome below

package org.possible.bug;

import java.io.IOException;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.apache.wicket.markup.html.MarkupUtil;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.FormComponentUpdatingBehavior;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.PropertyModel;

/**
 *
 * @author oyeso
 */


public class PrescientHome  extends PrescientTemplateOriginalPage {
 
private Model zipManager;
private Form occForm;

private WebMarkupContainer tagFrame;
   
private Model occupationListModel;
private List  occupationList;
private DropDownChoice occupationChoices;

public PrescientHome() {
  
zipManager=Model.of(new ZipManagedBean());



 occupationListModel= new Model<>();
 occupationList=zipManager.getObject().getOccCode();
 occupationChoices=new
DropDownChoice<>("occupationModel",occupationListModel, occupationList );
   
//queue(occForm);
occForm=new Form("occupationForm"){
   @Override
   protected void onSubmit() {
   
   //Do the next thing
   }

};
   occForm.add(occupationChoices);
   add(occForm);
 
   
}


New Stack Trace below
java.lang.IllegalStateException: This container is already dequeing: [Page
class = org.possible.bug.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)
at org.apache.wicket.Component.fireInitialize(Component.java:873)
at
org.apache.wicket.MarkupContainer.internalInitialize(MarkupContainer.java:1038)
at org.apache.wicket.Page.isPageStateless(Page.java:461)
at
org.apache.wicket.core.request.mapper.AbstractBookmarkableMapper.getPageInfo(AbstractBookmarkableMapper.java:473)
at
org.apache.wicket.core.request.mapper.AbstractBookmarkableMapper.mapHandler(AbstractBookmarkableMapper.java:420)
at
org.apache.wicket.core.request.mapper.MountedMapper.mapHandler(MountedMapper.java:155)
at