At first I want to say, although RequiredFieldValidator is used in .NET but I use this term for wicket as I want to mean a Label (color: red and text: *) which will be be di
Try:
Set the star
label as hidden on init:
star.setVisible(false);
When the form is submitted, show star
based on input
(and add to AjaxRequestTarget
):
String input = (String) getModelObject(); // From your code
star.setVisible("".equals(input));
target.add(star); // Or is it addComponent()? Can't remember :-S