/** * Adds this FieldsetPanel to the parent panel. * * @param parent * @param label * @param description Description below or beside the label of the field-set. */ public FieldsetPanel(final DivPanel parent, final String labelText, final String description) { this(parent.newChildId(), labelText, description); parent.add(this); }
private GridBuilder addRowPanel(final int level, final DivPanel rowPanel) { validateRowPanelLevel(level); this.rowPanel[level] = rowPanel; lengthCounter[level] = 0; if (level > 0) { gridPanel[level - 1].add(rowPanel); } else { mainContainer.add(rowPanel); } setNullPanel(level + 1, level); return this; }
public CheckBoxButton addCheckBoxButton(final IModel<Boolean> model, final String labelString, final String tooltip) { final CheckBoxButton checkBox = new CheckBoxButton(newChildId(), model, labelString); if (tooltip != null) { checkBox.setTooltip(tooltip); } add(checkBox); return checkBox; }
private <PK extends Serializable, T extends TimeableAttrRow<PK>, U extends EntityWithConfigurableAttr & EntityWithTimeableAttr<PK, T>> void createTimedAttrPanel( final DivPanel divPanel, final U entity, final AbstractEditPage<?, ?, ?> parentPage, final Function<AttrGroup, T> addNewEntryFunction, final AttrGroup group) { switch (group.getType()) { case PERIOD: case INSTANT_OF_TIME: divPanel.add(new TimedAttributePanel<>(divPanel.newChildId(), group, entity, parentPage, addNewEntryFunction)); break; default: log.error("The Type " + group.getType() + " is not supported."); break; } } }
/** * @see org.projectforge.web.wicket.flowlayout.GridBuilderInterface#newFormHeading(java.lang.String) */ public FormHeadingPanel newFormHeading(final String label) { final FormHeadingPanel formHeading = new FormHeadingPanel(getPanel().newChildId(), label); getPanel().add(formHeading); return formHeading; }
public RepeatingView newRepeatingView() { final RepeatingView repeater = new RepeatingView(getPanel().newChildId()); getPanel().add(repeater); return repeater; }
private void addLineBreak() { final TextPanel lineBreak = new TextPanel(addressPanel.newChildId(), "<br/>"); lineBreak.getLabel().setEscapeModelStrings(false); addressPanel.add(lineBreak); }
@Override protected void onOptionsPanelCreate(FieldsetPanel optionsFieldsetPanel, DivPanel optionsCheckBoxesPanel) { final FFPDebtFilter ffpDebtFilter = getSearchFilter(); optionsCheckBoxesPanel.add(createAutoRefreshCheckBoxButton(optionsCheckBoxesPanel.newChildId(), new PropertyModel<Boolean>(ffpDebtFilter, "fromMe"), getString("plugins.ffp.debt.options.fromMe"))); optionsCheckBoxesPanel.add(createAutoRefreshCheckBoxButton(optionsCheckBoxesPanel.newChildId(), new PropertyModel<Boolean>(ffpDebtFilter, "toMe"), getString("plugins.ffp.debt.options.toMe"))); optionsCheckBoxesPanel.add(createAutoRefreshCheckBoxButton(optionsCheckBoxesPanel.newChildId(), new PropertyModel<Boolean>(ffpDebtFilter, "iNeedToApprove"), getString("plugins.ffp.debt.options.iNeedToApprove"))); optionsCheckBoxesPanel.add(createAutoRefreshCheckBoxButton(optionsCheckBoxesPanel.newChildId(), new PropertyModel<Boolean>(ffpDebtFilter, "hideBothApproved"), getString("plugins.ffp.debt.options.hideBothApprove"))); }
public DivPanel addCssClasses(final DivType... cssClasses) { if (cssClasses != null) { for (final DivType cssClass : cssClasses) { if (cssClass != null) { div.add(AttributeModifier.append("class", cssClass.getClassAttrValue())); if (cssClass == DivType.BTN_GROUP) { add(AttributeModifier.append("data-toggle", "buttons")); buttonGroup = true; } } } } return this; }
/** * @see AbstractListForm#onOptionsPanelCreate(FieldsetPanel, DivPanel) */ @Override protected void onOptionsPanelCreate(final FieldsetPanel optionsFieldsetPanel, final DivPanel optionsCheckBoxesPanel) { optionsCheckBoxesPanel.add(createAutoRefreshCheckBoxButton(optionsCheckBoxesPanel.newChildId(), new PropertyModel<Boolean>(getSearchFilter(), "showOnlyActiveEntries"), getString("label.onlyActiveEntries"))); }
@Override protected void onOptionsPanelCreate(FieldsetPanel optionsFieldsetPanel, DivPanel optionsCheckBoxesPanel) { FFPEventFilter filter = getSearchFilter(); optionsCheckBoxesPanel.add(createAutoRefreshCheckBoxButton(optionsCheckBoxesPanel.newChildId(), new PropertyModel<Boolean>(filter, "showOnlyActiveEntries"), getString("plugins.ffp.event.options.showOnlyActiveEntries"))); }
@Override protected void onOptionsPanelCreate(FieldsetPanel optionsFieldsetPanel, DivPanel optionsCheckBoxesPanel) { PluginTemplateFilter filter = getSearchFilter(); optionsCheckBoxesPanel.add(createAutoRefreshCheckBoxButton(optionsCheckBoxesPanel.newChildId(), new PropertyModel<Boolean>(filter, "showOnlyEntriesWithValue"), getString("plugins.plugintemplate.filter.options.showOnlyEntriesWithValue"))); }
/** * @see org.projectforge.web.wicket.AbstractSecuredPage#onInitialize() */ @Override protected void onInitialize() { super.onInitialize(); xyPlotImage = new ImagePanel(gridBuilder.getPanel().newChildId()); gridBuilder.getPanel().add(xyPlotImage); gridBuilder.newGridPanel(); barChartImage = new ImagePanel(gridBuilder.getPanel().newChildId()); gridBuilder.getPanel().add(barChartImage); }
/** * @see org.projectforge.web.wicket.AbstractListForm#onOptionsPanelCreate(org.projectforge.web.wicket.flowlayout.FieldsetPanel, org.projectforge.web.wicket.flowlayout.DivPanel) */ @Override protected void onOptionsPanelCreate(final FieldsetPanel optionsFieldsetPanel, final DivPanel optionsCheckBoxesPanel) { optionsCheckBoxesPanel.add(createAutoRefreshCheckBoxButton(optionsCheckBoxesPanel.newChildId(), new PropertyModel<Boolean>(getSearchFilter(), "groupEntries"), getString("hr.planning.filter.groupEntries"))); optionsCheckBoxesPanel.add(createAutoRefreshCheckBoxButton(optionsCheckBoxesPanel.newChildId(), new PropertyModel<Boolean>(getSearchFilter(), "onlyMyProjects"), getString("hr.planning.filter.onlyMyProjects"))); optionsCheckBoxesPanel.add(createAutoRefreshCheckBoxButton(optionsCheckBoxesPanel.newChildId(), new PropertyModel<Boolean>(getSearchFilter(), "longFormat"), getString("longFormat"))); }
/** * @see org.projectforge.web.wicket.AbstractListForm#onOptionsPanelCreate(org.projectforge.web.wicket.flowlayout.FieldsetPanel, org.projectforge.web.wicket.flowlayout.DivPanel) */ @Override protected void onOptionsPanelCreate(final FieldsetPanel optionsFieldsetPanel, final DivPanel optionsCheckBoxesPanel) { optionsCheckBoxesPanel.add(createAutoRefreshCheckBoxButton(optionsCheckBoxesPanel.newChildId(), new PropertyModel<Boolean>(getSearchFilter(), "showOnlyActiveEntries"), getString("label.onlyActiveEntries"))); }
/** * @see org.projectforge.web.wicket.AbstractListForm#onOptionsPanelCreate(org.projectforge.web.wicket.flowlayout.FieldsetPanel, * org.projectforge.web.wicket.flowlayout.DivPanel) */ @Override protected void onOptionsPanelCreate(final FieldsetPanel optionsFieldsetPanel, final DivPanel optionsCheckBoxesPanel) { optionsCheckBoxesPanel.add(createAutoRefreshCheckBoxButton(optionsCheckBoxesPanel.newChildId(), new PropertyModel<Boolean>(getSearchFilter(), "notOpened"), getString("task.status.notOpened"))); optionsCheckBoxesPanel.add(createAutoRefreshCheckBoxButton(optionsCheckBoxesPanel.newChildId(), new PropertyModel<Boolean>(getSearchFilter(), "opened"), getString("task.status.opened"))); optionsCheckBoxesPanel.add(createAutoRefreshCheckBoxButton(optionsCheckBoxesPanel.newChildId(), new PropertyModel<Boolean>(getSearchFilter(), "closed"), getString("task.status.closed"))); }
public static void createViewOnlyDataTable(GridBuilder gridBuilder, ExtendedBaseDO<Integer> dataObject, List<String> propertiesList, String sortProperty, SortOrder sortOrder, Supplier<List<ExtendedBaseDO<Integer>>> supplier) { DivPanel section = gridBuilder.getPanel(); TablePanel tablePanel = new TablePanel(section.newChildId()); section.add(tablePanel); final DataTable<ExtendedBaseDO<Integer>, String> dataTable = createDataTable( createColumns(propertiesList, dataObject), sortProperty, sortOrder, supplier); tablePanel.add(dataTable); }
public void createDataTable(GridBuilder gridBuilder) { DivPanel section = gridBuilder.getPanel(); this.tablePanel = new TablePanel(section.newChildId()); this.tablePanel.setOutputMarkupId(true); section.add(tablePanel); this.dataTable = createDataTable(createColumns(), "attendee.fullname", SortOrder.ASCENDING, getData()); tablePanel.add(this.dataTable); }
@SuppressWarnings("serial") public DivTextPanel newSecurityAdviceBox(final IModel<String> content) { final DivTextPanel hintBox = new DivTextPanel(getPanel().newChildId(), new Model<String>() { @Override public String getObject() { return "<h4>" + getString("securityAdvice") + "</h4>" + HtmlHelper.escapeHtml(content.getObject(), true); } }); hintBox.getDiv().add(AttributeModifier.append("class", "alert alert-danger")); hintBox.getLabel().setEscapeModelStrings(false); getPanel().add(hintBox); return hintBox; }
@Override public void init() { setTitle(this.headingModel); setShowCancelButton(); setCloseButtonLabel(getString("yes")); final Form<Void> form = new Form<Void>(getFormId()); init(form); gridBuilder.newGridPanel(); final DivPanel panel = gridBuilder.getPanel(); questionPanel = new DivTextPanel(panel.newChildId(), this.questionModel); this.questionComponent = questionPanel.getLabel4Ajax(); panel.add(questionPanel); }