use of org.apache.wicket.markup.html.panel.Fragment in project midpoint by Evolveum.
the class PageAbstractFlow method updateCaptcha.
protected void updateCaptcha(AjaxRequestTarget target) {
CaptchaPanel captcha = new CaptchaPanel(ID_CAPTCHA, this);
captcha.setOutputMarkupId(true);
Fragment fragment = (Fragment) get(createComponentPath(ID_MAIN_FORM, ID_CONTENT_AREA));
fragment.addOrReplace(captcha);
target.add(fragment);
}
use of org.apache.wicket.markup.html.panel.Fragment in project midpoint by Evolveum.
the class AbstractPopupTabPanel method onInitialize.
@Override
protected void onInitialize() {
super.onInitialize();
setOutputMarkupId(true);
add(initObjectListPanel());
Fragment parametersPanelFragment = new Fragment(ID_PARAMETERS_PANEL, ID_PARAMETERS_PANEL_FRAGMENT, this);
parametersPanelFragment.setOutputMarkupId(true);
initParametersPanel(parametersPanelFragment);
add(parametersPanelFragment);
}
use of org.apache.wicket.markup.html.panel.Fragment in project midpoint by Evolveum.
the class ExecuteChangeOptionsPanel method createTracingRadioChoicesFragment.
private Fragment createTracingRadioChoicesFragment(String componentId) {
Fragment fragment = new Fragment(componentId, ID_TRACING_CONTAINER, ExecuteChangeOptionsPanel.this);
RadioChoice<TracingProfileType> tracingProfile = new RadioChoice<>(ID_TRACING, PropertyModel.of(ExecuteChangeOptionsPanel.this.getModel(), ExecuteChangeOptionsDto.F_TRACING), PropertyModel.of(ExecuteChangeOptionsPanel.this.getModel(), ExecuteChangeOptionsDto.F_TRACING_CHOICES), createTracinnChoiceRenderer());
fragment.add(tracingProfile);
AjaxLink<Void> resetChoices = new AjaxLink<>(ID_RESET_CHOICES) {
@Override
public void onClick(AjaxRequestTarget target) {
ExecuteChangeOptionsPanel.this.getModelObject().setTracing(null);
target.add(ExecuteChangeOptionsPanel.this);
}
};
fragment.add(resetChoices);
return fragment;
}
use of org.apache.wicket.markup.html.panel.Fragment in project midpoint by Evolveum.
the class ActivitiesStatisticsPanelOld method addActionsExecutedTablePanel.
private void addActionsExecutedTablePanel(String id, String titleId, String modelField) {
ListDataProvider<ObjectActionsExecutedEntryType> dataProvider = new ListDataProvider<>(this, PropertyModel.of(statisticsModel, modelField));
BoxedTablePanel<ObjectActionsExecutedEntryType> actionTable = new BoxedTablePanel<>(id, dataProvider, createActionEntryColumns()) {
@Override
protected boolean hideFooterIfSinglePage() {
return true;
}
@Override
protected WebMarkupContainer createHeader(String headerId) {
return new Fragment(headerId, titleId, ActivitiesStatisticsPanelOld.this);
}
};
actionTable.setOutputMarkupId(true);
actionTable.add(new VisibleBehaviour(() -> !dataProvider.getAvailableData().isEmpty()));
add(actionTable);
}
use of org.apache.wicket.markup.html.panel.Fragment in project hippo by NHS-digital-website.
the class ImageDisplayPlugin method createResourceFragment.
private Fragment createResourceFragment(String id, IModel<Node> model) {
S3NodeMetadata metadata = new S3NodeMetadata(model.getObject());
Fragment fragment = new Fragment(id, "unknown", this);
try {
if (metadata.getSize() < 0) {
return fragment;
}
fragment = new Fragment(id, "embed", this);
fragment.add(new Label("filesize", Model.of(formatter.format(metadata.getSize()))));
fragment.add(new Label("mimetype", Model.of(metadata.getMimeType())));
if (!metadata.getFileName().isEmpty()) {
fragment.add(this.createFileLink(metadata));
}
if (metadata.getMimeType().equals(MIME_TYPE_HIPPO_BLANK)) {
fragment.setVisible(false);
}
} catch (RepositoryException ex) {
log.error("Error while creating embedded resource view", ex);
}
return fragment;
}
Aggregations