use of org.projectforge.framework.time.TimeNotation in project projectforge by micromata.
the class UserEditForm method createTimeNotation.
public static void createTimeNotation(final GridBuilder gridBuilder, final PFUserDO user) {
// Time notation
final FieldsetPanel fs = gridBuilder.newFieldset(gridBuilder.getString("timeNotation"));
final LabelValueChoiceRenderer<TimeNotation> timeNotationChoiceRenderer = new LabelValueChoiceRenderer<TimeNotation>();
timeNotationChoiceRenderer.addValue(TimeNotation.H12, gridBuilder.getString("timeNotation.12"));
timeNotationChoiceRenderer.addValue(TimeNotation.H24, gridBuilder.getString("timeNotation.24"));
final DropDownChoice<TimeNotation> timeNotationChoice = new DropDownChoice<TimeNotation>(fs.getDropDownChoiceId(), new PropertyModel<TimeNotation>(user, "timeNotation"), timeNotationChoiceRenderer.getValues(), timeNotationChoiceRenderer);
timeNotationChoice.setNullValid(true);
fs.add(timeNotationChoice);
}
Aggregations