I am using SimpleFormComponentLabel for getting a clickable "label for=..." html tag for a input field (checkbox). In the text of the translated component label I want embed two links. How can this be done?
(wicket:message with embedded components is not the solution as it creates no "label for..." to the associated text field...) I need something like this: <input id="id9" type="checkbox" name="acceptCheckbox"> <label for="id9">I am 18 years old and agree with the ${terms} and ${conditions}.</label> I tried: final CheckBox acceptedTerms = new CheckBox("acceptCheckbox", userModel.bind("userAccount.memberships[0].acceptedTerms")); form.add(acceptedTerms); acceptedTerms.setLabel(new ResourceModel("termsAndConditionsCheckLabel")); acceptedTerms.setRequired(true); final SimpleFormComponentLabel termsAndConditionsCheckLabel = new SimpleFormComponentLabel( "termsAndConditionsCheckLabel", acceptedTerms); form.add(termsAndConditionsCheckLabel); final Link terms = new Link("terms", new ResourceModel("terms_of_use")) { private static final long serialVersionUID = 1L; @Override public void onClick() { setResponsePage(TermsOfUsePage.class); } }; termsAndConditionsCheckLabel.add(terms); but did not work (result: I am 18 years old and agree with the ${terms} and conditions.) Messages: <entry key="termsAndConditionsCheckLabel">I am 18 years old and agree with the ${terms} and conditions.</entry> <entry key="terms_of_use">Terms of Use</entry> -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/SimpleFormComponentLabel-with-page-link-in-label-tp4562036p4562036.html Sent from the Users forum mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org