Search in sources :

Example 1 with TimeNotation

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);
}
Also used : TimeNotation(org.projectforge.framework.time.TimeNotation) FieldsetPanel(org.projectforge.web.wicket.flowlayout.FieldsetPanel)

Aggregations

TimeNotation (org.projectforge.framework.time.TimeNotation)1 FieldsetPanel (org.projectforge.web.wicket.flowlayout.FieldsetPanel)1