I would do this with JavaScritpt
div class=PlaceHolder
input type=text wicket:id=userName /
/div
with a behaviors attached to to userName that whenever the field has
errors it finds a parent with class PlaceHolder and adds Error
class. And remove it if not. No need for a component for
When/how should I trigger JS to update attribute? I have never used pure JS
in my Wicket applications. I always try to use Wicket components/behaviors.
Also, to avoid problem you mentioned about path to child I can pass it as a
parameter which would be static field for both child component and
There is a renderHead on behavior: you can use it to contribute JavaScript.
Sooner than later, if you want to have complex user interaction at client
side, you will end up using extra JavaScript features. There are many
examples out there of JavaScript integration with Wicket
On Sat, Oct 26,
That's precisely why that method/functionality exists. If you have a
component which is not visible on the first render, how can wicket
replace it on subsequent ajax renders?
When you call setOutputMarkupPlaceholderTag(true), wicket will render a
tag with style=display:none which provides