Hi,
I've just come to the same conclusion. And I don't really like the fact
that every component that needs to be rendered in a 'fail-safe' way also
has to override onRender() with an empty implementation. To me this
'fail-safe rendering' looks more like a cross-cutting concern that
wicket-core should provide a hook for (maybe exposed through a new
method in IRequestCycleListener).
Cheers,
Tobias
Hi,
isVisible() is called at many places in Wicket.
It is not easy to try/catch it.
I've updated (locally) the demo app and with 6.x it breaks with:
java.lang.RuntimeException: Problem in #isVisible
at com.mycompany.HomePage$2.isVisible(HomePage.java:35)
at org.apache.wicket.Component.determineVisibility(Component.java:4340)
at org.apache.wicket.Component.isVisibleInHierarchy(Component.java:2131)
at org.apache.wicket.Component.isStateless(Component.java:2048)
at org.apache.wicket.Page$2.component(Page.java:479)
at org.apache.wicket.Page$2.component(Page.java:475)
at org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:144)
at org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:162)
at org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:123)
at org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:860)
at org.apache.wicket.Page.isPageStateless(Page.java:473)
at
org.apache.wicket.core.request.mapper.AbstractBookmarkableMapper.getPageInfo(AbstractBookmarkableMapper.java:465)
at
org.apache.wicket.core.request.mapper.AbstractBookmarkableMapper.mapHandler(AbstractBookmarkableMapper.java:409)
at
org.apache.wicket.core.request.mapper.MountedMapper.mapHandler(MountedMapper.java:395)
at
org.apache.wicket.request.mapper.CompoundRequestMapper.mapHandler(CompoundRequestMapper.java:215)
at
org.apache.wicket.request.cycle.RequestCycle.mapUrlFor(RequestCycle.java:429)
at
org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:281)
This is even before starting rendering the page itself.
Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov
On Tue, Oct 14, 2014 at 2:50 PM, Tobias Gierke <tobias.gie...@voipfuture.com
wrote:
Sorry for the noise, I should've read your e-mail more thorougly :(
"But as you can see the default rendering of a component should be
suppressed (PortletLike#onRender() {}) so it is not enough just to have the
behavior. "
I'll fix my implementation and try again.
Cheers,
Tobias
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
--
Tobias Gierke
Development
VOIPFUTURE GmbH Wendenstraße 4 20097 Hamburg, Germany
Phone +49 40 688 900 164 Fax +49 40 688 900 199
Email tobias.gie...@voipfuture.com Web http://www.voipfuture.com
CEO Jan Bastian
Commercial Court AG Hamburg HRB 109896, VAT ID DE263738086
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org