@SuppressWarnings("serial") public HtmlCommentPanel(final String id, final String comment) { super(id); add(new Label("comment", new Model<String>() { @Override public String getObject() { return "<!-- " + comment + " -->"; } }).setRenderBodyOnly(true).setEscapeModelStrings(false)); } }
add(new HtmlCommentPanel("htmlComment", LambdaModel.of(() -> WicketUtils.getUTCDates(startDateModel.getObject(), endDateModel.getObject())) ));
@SuppressWarnings("serial") public AbstractFieldsetPanel<?> addBirthday() { final FieldProperties<Date> props = getBirthdayProperties(); final AbstractFieldsetPanel<?> fs = gridBuilder.newFieldset(props); fs.add( new DatePanel(fs.newChildId(), props.getModel(), DatePanelSettings.get().withTargetType(java.sql.Date.class))); fs.add(new HtmlCommentPanel(fs.newChildId(), new Model<String>() { @Override public String getObject() { return WicketUtils.getUTCDate("birthday", contact.getBirthday()); } })); return fs; }
@SuppressWarnings("serial") public AbstractFieldsetPanel<?> addBirthday() { final FieldProperties<Date> props = getBirthdayProperties(); final AbstractFieldsetPanel<?> fs = gridBuilder.newFieldset(props); DatePanel components = new DatePanel(fs.newChildId(), props.getModel(), DatePanelSettings.get().withTargetType(java.sql.Date.class)); components.getFormComponent().setMarkupId("birthday").setOutputMarkupId(true); fs.add( components); fs.add(new HtmlCommentPanel(fs.newChildId(), new Model<String>() { @Override public String getObject() { return WicketUtils.getUTCDate("birthday", address.getBirthday()); } })); return fs; }
@SuppressWarnings("serial") public HtmlCommentPanel(final String id, final IModel<String> comment) { super(id); add(new Label("comment", new Model<String>() { @Override public String getObject() { return "<!-- " + comment.getObject() + " -->"; } }).setRenderBodyOnly(true).setEscapeModelStrings(false)); }
public static void createBirthdayPanel(final GridBuilder gridBuilder, EmployeeDO data) { // Birthday final FieldProperties<Date> props = new FieldProperties<>("fibu.employee.birthday", new PropertyModel<>(data, "birthday")); final AbstractFieldsetPanel<?> fs = gridBuilder.newFieldset(props); DatePanel datePanel = new DatePanel( fs.newChildId(), props.getModel(), DatePanelSettings.get().withTargetType(java.sql.Date.class)); datePanel.getDateField().setMarkupId("birthday").setOutputMarkupId(true); fs.add(datePanel); fs.add(new HtmlCommentPanel(fs.newChildId(), new Model<String>() { @Override public String getObject() { return WicketUtils.getUTCDate("birthday", data.getBirthday()); } })); }
optionsFieldsetPanel.add(new HtmlCommentPanel(optionsFieldsetPanel.newChildId(), new Model<String>() { @Override public String getObject()
fs.add(new HtmlCommentPanel(fs.newChildId(), new Model<String>()
DatePanelSettings.get().withSelectPeriodMode(true)); fs.add(modifiedStopDatePanel); fs.add(new HtmlCommentPanel(fs.newChildId(), new Model<String>()
optionsFieldsetPanel.add(quickSelectPanel); quickSelectPanel.init(); optionsFieldsetPanel.add(new HtmlCommentPanel(optionsFieldsetPanel.newChildId(), new Model<String>()
fs.add(new HtmlCommentPanel(fs.newChildId(), new Model<String>() { @Override public String getObject()
stopDateTimePanel.setRequired(false); fieldset.add(stopDateTimePanel); final HtmlCommentPanel comment = new HtmlCommentPanel(fieldset.newChildId(), new DatesAsUTCModel()