hi,
i just noticed that a panel that remained untouched for weeks (and
that worked ok) is now failing - sometimes! the panel simply contains
a search form. depending on which checkbox i check, it behaves fine,
or sometimes it doesn't, if i play with the back button it will
eventually work. i'm completely lost with this one. componment
hierarchy changed between rendering and form submission? (i wonder how
could this be done)
note that the panel is rendered in the search page, and re-rendered
with the results (after submission). i am using wicket 1.4-m3
thanks a lot for your help!
francisco
org.apache.wicket.WicketRuntimeException: submitted http post value
[check11] for CheckGroup component [35:recherche:form:niveaux]
contains an illegal relative path element [check11] which does not
point to a Check component. Due to this the CheckGroup component
cannot resolve the selected Check component pointed to by the illegal
value. A possible reason is that componment hierarchy changed between
rendering and form submission.
at
org.apache.wicket.markup.html.form.CheckGroup.convertValue(CheckGroup.java:134)
at
org.apache.wicket.markup.html.form.CheckGroup.convertValue(CheckGroup.java:59)
at
org.apache.wicket.markup.html.form.FormComponent.convertInput(FormComponent.java:1206)
at
org.apache.wicket.markup.html.form.FormComponent.validate(FormComponent.java:1110)
at org.apache.wicket.markup.html.form.Form$20.validate(Form.java:1893)
at
org.apache.wicket.markup.html.form.Form$ValidationVisitor.formComponent(Form.java:167)
at
org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:427)
at
org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:414)
at
org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrder(FormComponent.java:391)
at
org.apache.wicket.markup.html.form.Form.visitFormComponentsPostOrder(Form.java:1082)
at
org.apache.wicket.markup.html.form.Form.validateComponents(Form.java:1884)
at org.apache.wicket.markup.html.form.Form.validate(Form.java:1873)
at org.apache.wicket.markup.html.form.Form.process(Form.java:861)
at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:826)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:182)
at
org.apache.wicket.request.target.component.BookmarkableListenerInterfaceRequestTarget.processEvents(BookmarkableListenerInterfaceRequestTarget.java:162)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91)
at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1169)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1246)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1347)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:497)
the panel:
public RecherchePanel(String id, Recherche dto) {
super(id);
Form<Recherche> form = new Form<Recherche>("form");
form.setModel(new CompoundPropertyModel<Recherche>(dto));
form.add(new DropDownChoice<Integer>("surfaceMin", tranches));
form.add(new DropDownChoice<Integer>("surfaceMax", tranches));
form.add(new EnumCheckGroup<Plan.Niveau>("niveaux",
Plan.Niveau.values()));
form.add(new EnumCheckGroup<Plan.Style>("styles",
Plan.Style.values()));
form.add(new Button("submit") {
@Override
public void onSubmit() {
Recherche dto = (Recherche)
getParent().getDefaultModelObject();
setResponsePage(new CataloguePage(dto));
}
});
add(form);
}
enumcheckgroup:
public class EnumCheckGroup<T extends Enum<T>> extends CheckGroup<T> {
public EnumCheckGroup(String id, T[] values) {
super(id);
ListView<T> listview = new ListView<T>("items",
Arrays.asList(values)) {
protected void populateItem(ListItem<T> item) {
item.add(new Check<T>("check", item.getModel()));
item.add(new Label("label", new
ResourceModel(item.getModelObject().name())));
};
}.setReuseItems(true);
add(listview);
}
}
panel html:
<wicket:panel>
<form wicket:id="form">
<div>
<h4>Surface</h4>
<select wicket:id="surfaceMin" id="surfaceMin"></select>
<label for="surfaceMin">m²</label>
<select wicket:id="surfaceMax" id="surfaceMax"></select>
<label for="surfaceMax">m²</label> <br /><br />
<span wicket:id="niveaux">
<span wicket:id="items">
<input type="checkbox" wicket:id="check" />
<span wicket:id="label"></span><br />
</span>
</span><br />
<span wicket:id="styles">
<span wicket:id="items">
<input type="checkbox" wicket:id="check" />
<span wicket:id="label"></span><br />
</span>
</span><br />
<input wicket:id="submit" type="submit" value="Rechercher"/>
</div>
</form>
</wicket:panel>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]