Search in sources :

Example 81 with Form

use of org.apache.wicket.markup.html.form.Form in project midpoint by Evolveum.

the class PageProcessInstances method initLayout.

private void initLayout() {
    Form mainForm = new Form(ID_MAIN_FORM);
    add(mainForm);
    ISortableDataProvider<ProcessInstanceDto, String> provider = new ProcessInstanceDtoProvider(PageProcessInstances.this, requestedBy, requestedFor);
    ProcessInstancesPanel panel = new ProcessInstancesPanel(ID_PROCESS_INSTANCES_TABLE, provider, UserProfileStorage.TableId.PAGE_WORKFLOW_REQUESTS, (int) getItemsPerPage(UserProfileStorage.TableId.PAGE_WORKFLOW_REQUESTS), ProcessInstancesPanel.View.FULL_LIST, null);
    panel.setOutputMarkupId(true);
    mainForm.add(panel);
    initItemButtons(mainForm);
}
Also used : Form(org.apache.wicket.markup.html.form.Form) ProcessInstanceDto(com.evolveum.midpoint.web.page.admin.workflow.dto.ProcessInstanceDto) ProcessInstanceDtoProvider(com.evolveum.midpoint.web.page.admin.workflow.dto.ProcessInstanceDtoProvider)

Example 82 with Form

use of org.apache.wicket.markup.html.form.Form in project midpoint by Evolveum.

the class PageWorkItems method initLayout.

private void initLayout() {
    Form mainForm = new Form(ID_MAIN_FORM);
    add(mainForm);
    WorkItemsPanel panel = new WorkItemsPanel(ID_WORK_ITEMS_PANEL, new WorkItemDtoProvider(PageWorkItems.this, claimable, all), UserProfileStorage.TableId.PAGE_WORK_ITEMS, (int) getItemsPerPage(UserProfileStorage.TableId.PAGE_WORK_ITEMS), WorkItemsPanel.View.FULL_LIST);
    panel.setOutputMarkupId(true);
    mainForm.add(panel);
    initItemButtons(mainForm);
}
Also used : WorkItemsPanel(com.evolveum.midpoint.web.component.wf.WorkItemsPanel) Form(org.apache.wicket.markup.html.form.Form) WorkItemDtoProvider(com.evolveum.midpoint.web.page.admin.workflow.dto.WorkItemDtoProvider)

Example 83 with Form

use of org.apache.wicket.markup.html.form.Form in project midpoint by Evolveum.

the class PageUsers method initLayout.

private void initLayout() {
    Form mainForm = new Form(ID_MAIN_FORM);
    add(mainForm);
    initTable(mainForm);
}
Also used : Form(org.apache.wicket.markup.html.form.Form)

Example 84 with Form

use of org.apache.wicket.markup.html.form.Form in project midpoint by Evolveum.

the class ACAttributePanel method initLayout.

protected void initLayout(boolean ignoreMandatoryAttributes) {
    Label attributeLabel = new Label(ID_ATTRIBUTE_LABEL, new PropertyModel(getModel(), ACAttributeDto.F_NAME));
    add(attributeLabel);
    WebMarkupContainer required = new WebMarkupContainer(ID_REQUIRED);
    required.add(new VisibleEnableBehaviour() {

        @Override
        public boolean isVisible() {
            ACAttributeDto dto = getModel().getObject();
            PrismPropertyDefinition def = dto.getDefinition();
            return def.isMandatory();
        }
    });
    add(required);
    WebMarkupContainer hasOutbound = new WebMarkupContainer(ID_HAS_OUTBOUND);
    hasOutbound.add(new VisibleEnableBehaviour() {

        @Override
        public boolean isVisible() {
            return hasOutbound();
        }
    });
    add(hasOutbound);
    ListView<ACValueConstructionDto> values = new ListView<ACValueConstructionDto>(ID_VALUES, new PropertyModel<List<ACValueConstructionDto>>(getModel(), ACAttributeDto.F_VALUES)) {

        @Override
        protected void populateItem(ListItem<ACValueConstructionDto> listItem) {
            Form form = findParent(Form.class);
            listItem.add(new ACAttributeValuePanel(ID_VALUE, listItem.getModel(), ignoreMandatoryAttributes, form));
        }
    };
    add(values);
}
Also used : PrismPropertyDefinition(com.evolveum.midpoint.prism.PrismPropertyDefinition) Form(org.apache.wicket.markup.html.form.Form) Label(org.apache.wicket.markup.html.basic.Label) PropertyModel(org.apache.wicket.model.PropertyModel) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer) ListView(org.apache.wicket.markup.html.list.ListView) List(java.util.List) VisibleEnableBehaviour(com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour) ListItem(org.apache.wicket.markup.html.list.ListItem)

Example 85 with Form

use of org.apache.wicket.markup.html.form.Form in project midpoint by Evolveum.

the class ExpressionVariableEditorDialog method initLayout.

public void initLayout(WebMarkupContainer content) {
    Form form = new Form(ID_MAIN_FORM);
    form.setOutputMarkupId(true);
    content.add(form);
    // TODO - shouldn't this be some AutoCompleteField? If yer, where do we
    // get value?
    TextFormGroup name = new TextFormGroup(ID_NAME, new PropertyModel<String>(model, ExpressionVariableDefinitionTypeDto.F_VARIABLE + ".name.localPart"), createStringResource("ExpressionVariableEditor.label.name"), ID_LABEL_SIZE, ID_INPUT_SIZE, false);
    form.add(name);
    TextAreaFormGroup description = new TextAreaFormGroup(ID_DESCRIPTION, new PropertyModel<String>(model, ExpressionVariableDefinitionTypeDto.F_VARIABLE + ".description"), createStringResource("ExpressionVariableEditor.label.description"), ID_LABEL_SIZE, ID_INPUT_SIZE, false);
    form.add(description);
    TextFormGroup path = new TextFormGroup(ID_PATH, new PropertyModel<String>(model, ExpressionVariableDefinitionTypeDto.F_PATH), createStringResource("ExpressionVariableEditor.label.path"), ID_LABEL_SIZE, ID_INPUT_SIZE, false);
    form.add(path);
    DropDownFormGroup objectReference = new DropDownFormGroup<>(ID_OBJECT_REFERENCE, new PropertyModel<ObjectReferenceType>(model, ExpressionVariableDefinitionTypeDto.F_VARIABLE + ".objectRef"), new AbstractReadOnlyModel<List<ObjectReferenceType>>() {

        @Override
        public List<ObjectReferenceType> getObject() {
            return WebModelServiceUtils.createObjectReferenceList(ObjectType.class, getPageBase(), objectMap);
        }
    }, new ObjectReferenceChoiceRenderer(objectMap), createStringResource("ExpressionVariableEditor.label.objectRef"), ID_LABEL_SIZE, ID_INPUT_SIZE, false);
    form.add(objectReference);
    TextAreaFormGroup value = new TextAreaFormGroup(ID_VALUE, new PropertyModel<String>(model, ExpressionVariableDefinitionTypeDto.F_VALUE), createStringResource("ExpressionVariableEditor.label.value"), ID_LABEL_SIZE, ID_INPUT_SIZE, false);
    form.add(value);
    AjaxSubmitButton cancel = new AjaxSubmitButton(ID_BUTTON_CANCEL, createStringResource("ExpressionVariableEditor.button.cancel")) {

        @Override
        protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
            cancelPerformed(target);
        }
    };
    form.add(cancel);
    AjaxSubmitButton save = new AjaxSubmitButton(ID_BUTTON_SAVE, createStringResource("ExpressionVariableEditor.button.apply")) {

        @Override
        protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
            savePerformed(target);
        }
    };
    form.add(save);
}
Also used : ObjectReferenceChoiceRenderer(com.evolveum.midpoint.web.component.input.ObjectReferenceChoiceRenderer) AjaxSubmitButton(com.evolveum.midpoint.web.component.AjaxSubmitButton) TextFormGroup(com.evolveum.midpoint.web.component.form.TextFormGroup) DropDownFormGroup(com.evolveum.midpoint.web.component.form.DropDownFormGroup) Form(org.apache.wicket.markup.html.form.Form) TextAreaFormGroup(com.evolveum.midpoint.web.component.form.TextAreaFormGroup) AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) ObjectType(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType) ObjectReferenceType(com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType) ArrayList(java.util.ArrayList) List(java.util.List)

Aggregations

Form (org.apache.wicket.markup.html.form.Form)109 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)78 AjaxSubmitButton (com.evolveum.midpoint.web.component.AjaxSubmitButton)37 ArrayList (java.util.ArrayList)26 VisibleEnableBehaviour (com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour)25 WebMarkupContainer (org.apache.wicket.markup.html.WebMarkupContainer)21 Label (org.apache.wicket.markup.html.basic.Label)18 List (java.util.List)16 AjaxButton (com.evolveum.midpoint.web.component.AjaxButton)13 AjaxLink (org.apache.wicket.ajax.markup.html.AjaxLink)11 TextField (org.apache.wicket.markup.html.form.TextField)11 DropDownChoice (org.apache.wicket.markup.html.form.DropDownChoice)10 InlineMenuItem (com.evolveum.midpoint.web.component.menu.cog.InlineMenuItem)9 AbstractReadOnlyModel (org.apache.wicket.model.AbstractReadOnlyModel)9 IModel (org.apache.wicket.model.IModel)9 PropertyModel (org.apache.wicket.model.PropertyModel)9 AceEditor (com.evolveum.midpoint.web.component.AceEditor)8 AjaxSubmitLink (org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink)8 ListItem (org.apache.wicket.markup.html.list.ListItem)8 ListView (org.apache.wicket.markup.html.list.ListView)8