Thank you Tobias,
I followed your advice and it worked, after looking at
https://ci.apache.org/projects/wicket/guide/6.x/guide/componentLifecycle.html
it seems the best way to fix this is e.g.:
@Override
protected void onConfigure() {
if(loginForm.hasError()) {
setVisible(true);
} else {
setVisible(false);
}
}
The lifecycle is a bit off from my wicket 1.3/ 1.4 memories it seems :)
Best,
Korbinian
----- Ursprüngliche Mail -----
> Von: "Tobias Soloschenko" <[email protected]>
> An: [email protected]
> Gesendet: Samstag, 14. Mai 2016 14:07:51
> Betreff: Re: wicket 6.x / FeedbackPanel StackOverflowError
> Hi,
>
> try to set the visibility in onConfigure and store it as field in that local
> anonymous class - (return myVisibilityField;)
>
> kind regards
>
> Tobias
>
>> Am 14.05.2016 um 13:23 schrieb Korbinian Bachl
>> <[email protected]>:
>>
>> Hello,
>>
>> I'm currently migrating a wicket / brix application from wicket 1.4 to wicket
>> 6.23; So far most seems well, but there is a thing I'm really stuck at. My
>> code
>> uses FeedbackPanel regularly like this (on many many pages/ tiles):
>>
>> loginForm.add(new FeedbackPanel("feedBack") {
>> private static final long serialVersionUID =
>> -2594094600209896717L;
>>
>> @Override
>> public boolean isVisible() {
>> return loginForm.hasError();
>> }
>>
>>
>> }.setEscapeModelStrings(false));
>>
>> and this worked fine in wicket 1.4; With wicket 6 now if I access a page
>> containing this I get
>>
>> [2016-05-14T13:14:48.163+0200] [Payara 4.1] [WARNING] []
>> [javax.enterprise.web]
>> [tid: _ThreadID=33 _ThreadName=http-listener-2(1)] [timeMillis:
>> 1463224488163]
>> [levelValue: 900] [[
>> StandardWrapperValve[default]: Servlet.service() for servlet default threw
>> exception
>> java.lang.StackOverflowError
>> at org.apache.wicket.Component.isVisibleInHierarchy(Component.java:2132)
>> at org.apache.wicket.Component.isVisibleInHierarchy(Component.java:2132)
>> at org.apache.wicket.Component.isVisibleInHierarchy(Component.java:2132)
>> at org.apache.wicket.Component.isVisibleInHierarchy(Component.java:2132)
>> at org.apache.wicket.markup.html.form.Form$8.component(Form.java:1161)
>> at org.apache.wicket.markup.html.form.Form$8.component(Form.java:1157)
>> at org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:144)
>> at org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:123)
>> at
>> org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:860)
>> at
>> org.apache.wicket.markup.html.form.Form.anyFormComponentError(Form.java:1156)
>> at org.apache.wicket.markup.html.form.Form.hasError(Form.java:667)
>> at xxx.login.LoginExistingPanel$2.isVisible(LoginExistingPanel.java:92)
>> at org.apache.wicket.Component.determineVisibility(Component.java:4347)
>> at org.apache.wicket.Component.isVisibleInHierarchy(Component.java:2138)
>> at org.apache.wicket.markup.html.form.Form$8.component(Form.java:1161)
>> at org.apache.wicket.markup.html.form.Form$8.component(Form.java:1157)
>> at org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:144)
>> at org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:123)
>> at
>> org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:860)
>> at
>> org.apache.wicket.markup.html.form.Form.anyFormComponentError(Form.java:1156)
>> at org.apache.wicket.markup.html.form.Form.hasError(Form.java:667)
>> at xxxx.LoginExistingPanel$2.isVisible(LoginExistingPanel.java:92)
>> .... repeating the error dozens of times;
>>
>> Did anything change here that makes the good old isVisible() not usable
>> anymore?
>>
>>
>> Best,
>>
>> Korbinian
>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]