Probably the easiest thing to do is extend WebComponent instead of label. Label is a super simple component really. This
protected void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag) { replaceComponentTagBody(markupStream, openTag, getModelObjectAsString()); } is the only exiting thing it does, so you might as well replace this line to append the * when you need that. Eelco On 11/10/06, Jonathan Sharp <[EMAIL PROTECTED]> wrote: > I have a custom label component that extends label. In the constructor > it takes a form component that I want it to check if isRequired() at > render time and append "*" to the text of the label. What would be the > easiest way to do this? The data for the label could be passed in > through various models, etc. > > Cheers, > -js > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user