String getMandatoryFlag() {
return question.isMandatory() ? "<font color=red>*</font> " : "";
}
private void initQuestionLabel() {
questionLabel = new ELabel(question.getLabel()); //this uses the text of the label which doesn't include the mandatory flag
questionLabel.setText("<html><body>" + getMandatoryFlag() + question.getLabel().getText() + "</body></html>"); //this uses the mandatory flag
}