Search in sources :

Example 11 with RepeatingView

use of org.apache.wicket.markup.repeater.RepeatingView in project midpoint by Evolveum.

the class PageAssignmentConflicts method initLayout.

private void initLayout() {
    Form mainForm = new Form(ID_MAIN_FORM);
    mainForm.setOutputMarkupId(true);
    add(mainForm);
    RepeatingView conflictsPanel = new RepeatingView(ID_CONFLICTS_PANEL);
    conflictsPanel.setOutputMarkupId(true);
    List<AssignmentConflictDto> conflicts = getSessionStorage().getRoleCatalog().getConflictsList();
    for (AssignmentConflictDto dto : conflicts) {
        AssignmentConflictPanel panel = new AssignmentConflictPanel(conflictsPanel.newChildId(), Model.of(dto));
        conflictsPanel.add(panel);
    }
    mainForm.add(conflictsPanel);
    AjaxSubmitButton back = new AjaxSubmitButton(ID_BACK, createStringResource("PageAssignmentConflicts.back")) {

        @Override
        public void onSubmit(AjaxRequestTarget target, org.apache.wicket.markup.html.form.Form<?> form) {
            redirectBack();
        }
    };
    mainForm.add(back);
    AjaxSubmitButton submit = new AjaxSubmitButton(ID_SUBMIT, createStringResource("PageAssignmentConflicts.submit")) {

        @Override
        public void onSubmit(AjaxRequestTarget target, org.apache.wicket.markup.html.form.Form<?> form) {
            redirectBack();
        }
    };
    mainForm.add(submit);
}
Also used : AssignmentConflictDto(com.evolveum.midpoint.web.page.self.dto.AssignmentConflictDto) AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) AjaxSubmitButton(com.evolveum.midpoint.web.component.AjaxSubmitButton) Form(com.evolveum.midpoint.web.component.form.Form) RepeatingView(org.apache.wicket.markup.repeater.RepeatingView) AssignmentConflictPanel(com.evolveum.midpoint.web.page.self.component.AssignmentConflictPanel)

Example 12 with RepeatingView

use of org.apache.wicket.markup.repeater.RepeatingView in project gitblit by gitblit.

the class BasePage method getBottomScriptContainer.

private RepeatingView getBottomScriptContainer() {
    RepeatingView bottomScriptContainer = (RepeatingView) get("bottomScripts");
    if (bottomScriptContainer == null) {
        bottomScriptContainer = new RepeatingView("bottomScripts");
        bottomScriptContainer.setRenderBodyOnly(true);
        add(bottomScriptContainer);
    }
    return bottomScriptContainer;
}
Also used : RepeatingView(org.apache.wicket.markup.repeater.RepeatingView)

Example 13 with RepeatingView

use of org.apache.wicket.markup.repeater.RepeatingView in project gitblit by gitblit.

the class BasePage method addBottomScript.

/**
	 * Adds a HTML script element loading the javascript designated by the given path.
	 *
	 * @param scriptPath
	 *            page-relative path to the Javascript resource; normally starts with "scripts/"
	 */
protected void addBottomScript(String scriptPath) {
    RepeatingView bottomScripts = getBottomScriptContainer();
    Label script = new Label(bottomScripts.newChildId(), "<script type='text/javascript' src='" + urlFor(new JavascriptResourceReference(this.getClass(), scriptPath)) + "'></script>\n");
    bottomScripts.add(script.setEscapeModelStrings(false).setRenderBodyOnly(true));
}
Also used : RepeatingView(org.apache.wicket.markup.repeater.RepeatingView) Label(org.apache.wicket.markup.html.basic.Label) JavascriptResourceReference(org.apache.wicket.markup.html.resources.JavascriptResourceReference)

Example 14 with RepeatingView

use of org.apache.wicket.markup.repeater.RepeatingView in project wiquery by WiQuery.

the class WiQueryTester method getRepeatingView.

public RepeatingView getRepeatingView(String path) {
    Page renderedPage = getLastRenderedPage();
    assertComponent(path, RepeatingView.class);
    RepeatingView rv = (RepeatingView) renderedPage.get(path);
    return rv;
}
Also used : RepeatingView(org.apache.wicket.markup.repeater.RepeatingView) Page(org.apache.wicket.Page)

Example 15 with RepeatingView

use of org.apache.wicket.markup.repeater.RepeatingView in project midpoint by Evolveum.

the class TestConnectionMessagesPanel method initLayout.

private void initLayout() {
    setOutputMarkupId(true);
    WebMarkupContainer messagesPanel = new WebMarkupContainer(ID_MESSAGES_PANEL);
    messagesPanel.setOutputMarkupId(true);
    add(messagesPanel);
    ListView<ConnectorStruct> connectorView = new ListView<ConnectorStruct>(ID_CONNECTOR_MESSAGES_PANEL, connectorResourceResults) {

        private static final long serialVersionUID = 1L;

        @Override
        protected void populateItem(ListItem<ConnectorStruct> item) {
            Label connectorNameLabel = new Label(ID_CONNECTOR_NAME, item.getModelObject().connectorName);
            item.add(connectorNameLabel);
            RepeatingView connectorResultView = new RepeatingView(ID_CONNECTOR_MESSAGES);
            List<OpResult> resultsDto = item.getModelObject().connectorResultsDto;
            if (resultsDto != null) {
                initResultsPanel(connectorResultView, resultsDto, parentPage);
            }
            item.add(connectorResultView);
        }
    };
    messagesPanel.add(connectorView);
    RepeatingView resultView = new RepeatingView(ID_RESOURCE_MESSAGES);
    if (modelResourceResults.getObject() != null) {
        initResultsPanel(resultView, modelResourceResults.getObject(), parentPage);
    }
    resultView.setOutputMarkupId(true);
    messagesPanel.add(resultView);
}
Also used : ListView(org.apache.wicket.markup.html.list.ListView) OpResult(com.evolveum.midpoint.gui.api.component.result.OpResult) Label(org.apache.wicket.markup.html.basic.Label) RepeatingView(org.apache.wicket.markup.repeater.RepeatingView) ListItem(org.apache.wicket.markup.html.list.ListItem) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer)

Aggregations

RepeatingView (org.apache.wicket.markup.repeater.RepeatingView)19 Label (org.apache.wicket.markup.html.basic.Label)10 WebMarkupContainer (org.apache.wicket.markup.html.WebMarkupContainer)8 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)7 IModel (org.apache.wicket.model.IModel)5 Model (org.apache.wicket.model.Model)5 ArrayList (java.util.ArrayList)4 AjaxSubmitButton (com.evolveum.midpoint.web.component.AjaxSubmitButton)3 AttributeAppender (org.apache.wicket.behavior.AttributeAppender)3 Item (org.apache.wicket.markup.repeater.Item)3 LoadableModel (com.evolveum.midpoint.gui.api.model.LoadableModel)2 PrismObject (com.evolveum.midpoint.prism.PrismObject)2 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)2 Task (com.evolveum.midpoint.task.api.Task)2 AjaxButton (com.evolveum.midpoint.web.component.AjaxButton)2 ColumnTypeDto (com.evolveum.midpoint.web.component.data.column.ColumnTypeDto)2 ObjectWrapper (com.evolveum.midpoint.web.component.prism.ObjectWrapper)2 VisibleEnableBehaviour (com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour)2 List (java.util.List)2 IColumn (org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn)2