/** * @param textField * @return The created InputPanel. * @see InputPanel#InputPanel(String, Component) */ public InputPanel add(final TextField<?> textField) { final InputPanel input = new InputPanel(newChildId(), textField); add(input); return input; }
/** * @param passwordField * @return The created PasswordPanel. * @see PasswordPanel#PasswordPanel(String, Component) */ public PasswordPanel add(final PasswordTextField passwordField) { final PasswordPanel passwordInput = new PasswordPanel(newChildId(), passwordField); add(passwordInput); return passwordInput; }
public <C> Select2MultiChoicePanel<C> add(final Select2MultiChoice<C> select2MultiChoice) { final Select2MultiChoicePanel<C> select2MultiChoicePanel = new Select2MultiChoicePanel<C>(newChildId(), select2MultiChoice); add(select2MultiChoicePanel); return select2MultiChoicePanel; }
/** * @param textArea * @return The created InputPanel. * @see TextAreaPanel#TextAreaPanel(String, Component) */ public TextAreaPanel add(final TextArea<?> textArea, final boolean autogrow) { final TextAreaPanel panel = new TextAreaPanel(newChildId(), textArea, autogrow); add(panel); return panel; }
/** * @param id * @param ajaxEditableLabel * @return The created AjaxEditableLabelPanel. * @see SelectPanel#SelectPanel(String, Select) */ public <C> AjaxEditableLabelPanel<C> add(final AjaxEditableLabel<C> ajaxEditableLabel) { final AjaxEditableLabelPanel<C> ajaxEditableLabelPanel = new AjaxEditableLabelPanel<C>(newChildId(), ajaxEditableLabel); add(ajaxEditableLabelPanel); return ajaxEditableLabelPanel; }
/** * @param id * @param select * @return The created SelectPanel. * @see SelectPanel#SelectPanel(String, Select) */ public <C> SelectPanel<C> add(final Select<C> select) { final SelectPanel<C> selectPanel = new SelectPanel<C>(newChildId(), select); add(selectPanel); return selectPanel; }
/** * @param id * @param label * @param dropDownChoice * @return The created DropDownChoicePanel. * @see DropDownChoicePanel#DropDownChoicePanel(String, String, DropDownChoice, boolean) */ public <C> DropDownChoicePanel<C> add(final DropDownChoice<C> dropDownChoice, final boolean submitOnChange) { final DropDownChoicePanel<C> dropDownChoicePanel = new DropDownChoicePanel<C>(newChildId(), dropDownChoice, submitOnChange); add(dropDownChoicePanel); return dropDownChoicePanel; }
/** * @param id * @param label * @param model * @param values * @param renderer * @param submitOnChange. * @return The created DropDownChoicePanel. * @see DropDownChoicePanel#DropDownChoicePanel(String, String, IModel, List, IChoiceRenderer, boolean)) */ public <C> DropDownChoicePanel<C> addDropDownChoice(final IModel<C> model, final List<? extends C> values, final IChoiceRenderer<C> renderer, final boolean submitOnChange) { final DropDownChoicePanel<C> dropDownChoicePanel = new DropDownChoicePanel<C>(newChildId(), model, values, renderer, submitOnChange); add(dropDownChoicePanel); return dropDownChoicePanel; }
@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; }
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()); } })); }