Search in sources :

Example 26 with Fragment

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);
}
Also used : CaptchaPanel(com.evolveum.midpoint.gui.api.component.captcha.CaptchaPanel) Fragment(org.apache.wicket.markup.html.panel.Fragment)

Example 27 with 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);
}
Also used : Fragment(org.apache.wicket.markup.html.panel.Fragment)

Example 28 with Fragment

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;
}
Also used : TracingProfileType(com.evolveum.midpoint.xml.ns._public.common.common_3.TracingProfileType) AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) AjaxLink(org.apache.wicket.ajax.markup.html.AjaxLink) Fragment(org.apache.wicket.markup.html.panel.Fragment) RadioChoice(org.apache.wicket.markup.html.form.RadioChoice)

Example 29 with 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);
}
Also used : ListDataProvider(com.evolveum.midpoint.web.component.util.ListDataProvider) VisibleBehaviour(com.evolveum.midpoint.web.component.util.VisibleBehaviour) BoxedTablePanel(com.evolveum.midpoint.web.component.data.BoxedTablePanel) Fragment(org.apache.wicket.markup.html.panel.Fragment)

Example 30 with Fragment

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;
}
Also used : Label(org.apache.wicket.markup.html.basic.Label) RepositoryException(javax.jcr.RepositoryException) Fragment(org.apache.wicket.markup.html.panel.Fragment)

Aggregations

Fragment (org.apache.wicket.markup.html.panel.Fragment)51 Label (org.apache.wicket.markup.html.basic.Label)20 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)12 ArrayList (java.util.ArrayList)9 LinkPanel (com.gitblit.wicket.panels.LinkPanel)6 Component (org.apache.wicket.Component)6 WebMarkupContainer (org.apache.wicket.markup.html.WebMarkupContainer)6 RepositoryModel (com.gitblit.models.RepositoryModel)5 UserModel (com.gitblit.models.UserModel)5 Item (org.apache.wicket.markup.repeater.Item)5 DataView (org.apache.wicket.markup.repeater.data.DataView)5 ListDataProvider (org.apache.wicket.markup.repeater.data.ListDataProvider)5 ResourceModel (org.apache.wicket.model.ResourceModel)4 TicketLabel (com.gitblit.tickets.TicketLabel)3 List (java.util.List)3 ConnInstanceTO (org.apache.syncope.common.lib.to.ConnInstanceTO)3 IndicatingAjaxLink (org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxLink)3 CompoundPropertyModel (org.apache.wicket.model.CompoundPropertyModel)3 BoxedTablePanel (com.evolveum.midpoint.web.component.data.BoxedTablePanel)2 ListDataProvider (com.evolveum.midpoint.web.component.util.ListDataProvider)2