/** * @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; }
@Override public void populateItem(Item<ICellPopulator<FFPAccountingDO>> item, String componentId, IModel<FFPAccountingDO> rowModel) { MinMaxNumberField<BigDecimal> field = new MinMaxNumberField<BigDecimal>(InputPanel.WICKET_ID, new PropertyModel<>(rowModel.getObject(), "value"), new BigDecimal(0), new BigDecimal(Integer.MAX_VALUE)); field.setRequired(true); InputPanel input = new InputPanel(componentId, field); input.setEnabled(rowModel.getObject().getEvent().getFinished() == false); item.add(input); }
@Override public void populateItem(Item<ICellPopulator<FFPAccountingDO>> item, String componentId, IModel<FFPAccountingDO> rowModel) { MinMaxNumberField field = new MinMaxNumberField<BigDecimal>(InputPanel.WICKET_ID, new PropertyModel<>(rowModel.getObject(), "weighting"), new BigDecimal(0), new BigDecimal(Integer.MAX_VALUE)); field.setRequired(true); InputPanel input = new InputPanel(componentId, field); input.setEnabled(rowModel.getObject().getEvent().getFinished() == false); item.add(input); }
/** * @see org.projectforge.web.common.timeattr.AttrWicketComponentFactory#createComponents(org.projectforge.web.wicket.flowlayout.AbstractFieldsetPanel, * org.projectforge.framework.persistence.attr.api.AttrDescription, * org.projectforge.framework.persistence.attr.api.EntityWithAttributes) */ @Override public ComponentWrapperPanel createComponents(final String id, final AttrGroup group, final AttrDescription desc, final EntityWithAttributes entity) { final MinMaxNumberField<BigDecimal> textField = new MinMaxNumberField<>( InputPanel.WICKET_ID, new AttrModel<>(entity, desc.getPropertyName(), BigDecimal.class), new BigDecimal(desc.getMinIntValue()), new BigDecimal(desc.getMaxIntValue()) ); setAndOutputMarkupId(textField, group, desc); textField.setRequired(desc.isRequired()); return new InputPanel(id, textField); }
@Override public void populateItem(Item<ICellPopulator<FFPAccountingDO>> item, String componentId, IModel<FFPAccountingDO> rowModel) { InputPanel input = new InputPanel(componentId, new MaxLengthTextField(InputPanel.WICKET_ID, new PropertyModel<>(rowModel.getObject(), "comment"))); input.setEnabled(rowModel.getObject().getEvent().getFinished() == false); item.add(input); }
/** * @see org.projectforge.web.common.timeattr.AttrWicketComponentFactory#createComponents(org.projectforge.web.wicket.flowlayout.AbstractFieldsetPanel, * org.projectforge.framework.persistence.attr.api.AttrDescription, * org.projectforge.framework.persistence.attr.api.EntityWithAttributes) */ @Override public ComponentWrapperPanel createComponents(final String id, final AttrGroup group, final AttrDescription desc, final EntityWithAttributes entity) { final MaxLengthTextField textField = new MaxLengthTextField( InputPanel.WICKET_ID, new AttrModel<>(entity, desc.getPropertyName(), String.class), desc.getMaxLength() ); setAndOutputMarkupId(textField, group, desc); textField.setRequired(desc.isRequired()); return new InputPanel(id, textField); }
/** * @see org.projectforge.web.common.timeattr.AttrWicketComponentFactory#createComponents(org.projectforge.web.wicket.flowlayout.AbstractFieldsetPanel, * org.projectforge.framework.persistence.attr.api.AttrDescription, * org.projectforge.framework.persistence.attr.api.EntityWithAttributes) */ @Override public ComponentWrapperPanel createComponents(final String id, final AttrGroup group, final AttrDescription desc, final EntityWithAttributes entity) { final MinMaxNumberField<Integer> textField = new MinMaxNumberField<>( InputPanel.WICKET_ID, new AttrModel<>(entity, desc.getPropertyName(), Integer.class), desc.getMinIntValue(), desc.getMaxIntValue() ); setAndOutputMarkupId(textField, group, desc); textField.setRequired(desc.isRequired()); return new InputPanel(id, textField); }
"searchString")); searchField.add(WicketUtils.setFocus()); fs.add(new InputPanel(fs.newChildId(), searchField));
maxLength); textField.setRequired(param.isRequired()); fs.add(new InputPanel(fs.newChildId(), textField));
"searchString")); searchField.add(WicketUtils.setFocus()); fs.add(new InputPanel(fs.newChildId(), searchField)); fs.add(new IconPanel(fs.newIconChildId(), IconType.HELP, getString("tooltip.lucene.link")).setOnClickLocation( getRequestCycle(),
fieldset.add(new InputPanel(fieldset.newChildId(), new AuftragsPositionFormComponent(InputPanel.WICKET_ID, new PropertyModel<AuftragsPositionDO>(position, "auftragsPosition"), false))); fieldset.add(new IconPanel(fieldset.newIconChildId(), IconType.GOTO, getString("show"))
fs.add(new InputPanel(fs.newChildId(), name));