Package org.apache.syncope.console.wicket.markup.html.form

Examples of org.apache.syncope.console.wicket.markup.html.form.AjaxTextFieldPanel


        final Form form = new Form("form");
        form.setOutputMarkupId(true);
        add(form);

        final AjaxTextFieldPanel policyid = new AjaxTextFieldPanel("id", "id",
                new PropertyModel<String>(policyTO, "id"));
        policyid.setEnabled(false);
        policyid.setStyleShet("ui-widget-content ui-corner-all short_fixedsize");
        form.add(policyid);

        final AjaxTextFieldPanel description = new AjaxTextFieldPanel("description", "description",
                new PropertyModel<String>(policyTO, "description"));
        description.addRequiredLabel();
        description.setStyleShet("ui-widget-content ui-corner-all medium_dynamicsize");
        form.add(description);

        final AjaxDropDownChoicePanel<PolicyType> type = new AjaxDropDownChoicePanel<PolicyType>("type", "type",
                new PropertyModel<PolicyType>(policyTO, "type"));
View Full Code Here


            }
        };

        connInstanceTO = getConectorInstanceTO(connectors.getObject(), resourceTO);

        final AjaxTextFieldPanel resourceName = new AjaxTextFieldPanel("name", new ResourceModel("name", "name").
                getObject(), new PropertyModel<String>(resourceTO, "name"));

        resourceName.setEnabled(createFlag);
        resourceName.addRequiredLabel();
        add(resourceName);

        final AjaxCheckBoxPanel forceMandatoryConstraint = new AjaxCheckBoxPanel("forceMandatoryConstraint",
                new ResourceModel("forceMandatoryConstraint", "forceMandatoryConstraint").getObject(),
                new PropertyModel<Boolean>(resourceTO, "forceMandatoryConstraint"));
View Full Code Here

        form.add(executions);

        final Label idLabel = new Label("idLabel", new ResourceModel("id"));
        profile.add(idLabel);

        final AjaxTextFieldPanel id = new AjaxTextFieldPanel("id", getString("id"), new PropertyModel<String>(taskTO,
                "id"));

        id.setEnabled(false);
        profile.add(id);

        final List<IColumn> columns = new ArrayList<IColumn>();
        columns.add(new PropertyColumn(new ResourceModel("id"), "id", "id"));
View Full Code Here

                        required = property.getSchema().isRequired();
                    } else if (Boolean.class.equals(propertySchemaClass) || boolean.class.equals(propertySchemaClass)) {
                        field = new AjaxCheckBoxPanel("panel", label.getDefaultModelObjectAsString(), new Model());
                    } else {
                        field = new AjaxTextFieldPanel("panel", label.getDefaultModelObjectAsString(), new Model());

                        required = property.getSchema().isRequired();
                    }

                    if (String[].class.equals(propertySchemaClass)) {
View Full Code Here

        add(reportletConfWin);

        final Label idLabel = new Label("idLabel", new ResourceModel("id"));
        profile.add(idLabel);

        final AjaxTextFieldPanel id = new AjaxTextFieldPanel("id", getString("id"), new PropertyModel<String>(reportTO,
                "id"));
        id.setEnabled(false);
        profile.add(id);

        final Label nameLabel = new Label("nameLabel", new ResourceModel("name"));
        profile.add(nameLabel);

        final AjaxTextFieldPanel name = new AjaxTextFieldPanel("name", getString("name"), new PropertyModel<String>(
                reportTO, "name"));
        profile.add(name);

        final AjaxTextFieldPanel lastExec = new AjaxTextFieldPanel("lastExec", getString("lastExec"),
                new DateFormatROModel(new PropertyModel<String>(reportTO, "lastExec")));
        lastExec.setEnabled(false);
        profile.add(lastExec);

        final AjaxTextFieldPanel nextExec = new AjaxTextFieldPanel("nextExec", getString("nextExec"),
                new DateFormatROModel(new PropertyModel<String>(reportTO, "nextExec")));
        nextExec.setEnabled(false);
        profile.add(nextExec);

        final SingleColumnPalette<ReportletConf> reportlets = new SingleColumnPalette<ReportletConf>("reportlets",
                new PropertyModel<List<? extends ReportletConf>>(reportTO, "reportletConfs"),
                new IChoiceRenderer<ReportletConf>() {
View Full Code Here

                if (attributeTO.getValues().isEmpty()) {
                    attributeTO.addValue("");
                }

                if (templateMode) {
                    item.add(new AjaxTextFieldPanel("values", "values", new Model()));
                } else {
                    item.add(new MultiValueSelectorPanel("values", new PropertyModel<List<String>>(attributeTO,
                            "values"), new AjaxTextFieldPanel("panel", "values", new Model(null))));
                }
            }
        };

        attributesContainer.add(attributes);
View Full Code Here

        final Form schemaForm = new Form("form");

        schemaForm.setModel(new CompoundPropertyModel(schema));

        final AjaxTextFieldPanel name = new AjaxTextFieldPanel("name", getString("name"), new PropertyModel<String>(
                schema, "name"));
        name.addRequiredLabel();

        final AjaxTextFieldPanel expression = new AjaxTextFieldPanel("expression", getString("expression"),
                new PropertyModel<String>(schema, "expression"));
        expression.addRequiredLabel();

        name.setEnabled(createFlag);

        final AjaxButton submit = new ClearIndicatingAjaxButton("apply", new ResourceModel("submit"), pageRef) {
View Full Code Here

        this.resourceTO = resourceTO;

        initResourceSchemaNames();

        final AjaxTextFieldPanel accountLink = new AjaxTextFieldPanel("accountLink", new ResourceModel("accountLink",
                "accountLink").getObject(), new PropertyModel<String>(resourceTO, "accountLink"));
        add(accountLink);

        mappingContainer = new WebMarkupContainer("mappingContainer");
        mappingContainer.setOutputMarkupId(true);
        add(mappingContainer);

        mappings = new ListView<SchemaMappingTO>("mappings", resourceTO.getMappings()) {

            /**
             * Serial version UID.
             */
            private static final long serialVersionUID = 4949588177564901031L;

            @Override
            protected void populateItem(final ListItem<SchemaMappingTO> item) {

                final SchemaMappingTO mappingTO = item.getModelObject();

                final AttributableType entity;
                if (mappingTO.getIntMappingType() != null) {
                    entity = mappingTO.getIntMappingType().getAttributableType();
                } else {
                    entity = null;
                }

                attrTypes = getAttributeTypes(entity);

                item.add(new AjaxDecoratedCheckbox("toRemove", new Model<Boolean>(Boolean.FALSE)) {

                    private static final long serialVersionUID = 7170946748485726506L;

                    @Override
                    protected void onUpdate(final AjaxRequestTarget target) {
                        int index = -1;
                        for (int i = 0; i < resourceTO.getMappings().size() && index == -1; i++) {
                            if (mappingTO.equals(resourceTO.getMappings().get(i))) {
                                index = i;
                            }
                        }

                        if (index != -1) {
                            resourceTO.getMappings().remove(index);
                            item.getParent().removeAll();
                            target.add(mappingContainer);
                        }
                    }

                    @Override
                    protected IAjaxCallDecorator getAjaxCallDecorator() {
                        return new AjaxPreprocessingCallDecorator(super.getAjaxCallDecorator()) {

                            private static final long serialVersionUID = -7927968187160354605L;

                            @Override
                            public CharSequence preDecorateScript(final CharSequence script) {

                                return "if (confirm('" + getString("confirmDelete") + "'))" + "{" + script + "} "
                                        + "else {this.checked = false;}";
                            }
                        };
                    }
                });

                final AjaxDropDownChoicePanel intAttrNames = new AjaxDropDownChoicePanel<String>("intAttrNames",
                        getString("intAttrNames"), new PropertyModel(mappingTO, "intAttrName"));
                intAttrNames.setChoices(schemaNames);
                intAttrNames.setRequired(true);
                intAttrNames.setStyleShet(fieldStyle);
                item.add(intAttrNames);

                final AjaxDropDownChoicePanel typesPanel = new AjaxDropDownChoicePanel("intMappingTypes",
                        new ResourceModel("intMappingTypes", "intMappingTypes").getObject(),
                        new PropertyModel<IntMappingType>(mappingTO, "intMappingType"));

                // typesPanel onChange behavior provided below ...

                typesPanel.setRequired(true);
                typesPanel.setChoices(attrTypes);
                typesPanel.setStyleShet(fieldStyle);
                item.add(typesPanel);

                final AjaxDropDownChoicePanel mappingTypesPanel = new AjaxDropDownChoicePanel("mappingTypes",
                        new ResourceModel("mappingTypes", "mappingTypes").getObject(), new Model(entity));

                mappingTypesPanel.setChoices(Arrays.asList(AttributableType.values()));
                mappingTypesPanel.setStyleShet(defFieldStyle);

                item.add(mappingTypesPanel);

                mappingTypesPanel.getField().add(new AjaxFormComponentUpdatingBehavior(onchange) {

                    private static final long serialVersionUID = -1107858522700306810L;

                    @Override
                    protected void onUpdate(final AjaxRequestTarget target) {

                        attrTypes = getAttributeTypes((AttributableType) mappingTypesPanel.getModelObject());

                        typesPanel.setChoices(attrTypes);
                        intAttrNames.setChoices(Collections.emptyList());

                        target.add(typesPanel.getField());
                        target.add(intAttrNames.getField());

                    }
                });

                final FieldPanel extAttrName;

                extAttrName = new AjaxTextFieldPanel("extAttrName", new ResourceModel("extAttrNames",
                        "extAttrNames").getObject(), new PropertyModel<String>(mappingTO, "extAttrName"));

                ((AjaxTextFieldPanel) extAttrName).setChoices(schemaNames);

                boolean required = false;
                if (mappingTO != null && !mappingTO.isAccountid() && !mappingTO.isPassword()) {
                    required = true;
                }


                extAttrName.setRequired(required);
                extAttrName.setEnabled(required);

                extAttrName.setStyleShet(fieldStyle);
                item.add(extAttrName);

                final AjaxTextFieldPanel mandatory = new AjaxTextFieldPanel("mandatoryCondition", new ResourceModel(
                        "mandatoryCondition", "mandatoryCondition").getObject(), new PropertyModel(mappingTO,
                        "mandatoryCondition"));

                mandatory.setChoices(Arrays.asList(new String[]{"true", "false"}));

                mandatory.setStyleShet(shortFieldStyle);

                item.add(mandatory);

                final AjaxCheckBoxPanel accountId = new AjaxCheckBoxPanel("accountId", new ResourceModel("accountId",
                        "accountId").getObject(), new PropertyModel(mappingTO, "accountid"));
View Full Code Here

    public ConfigurationModalPage(final PageReference pageRef, final ModalWindow window,
            final ConfigurationTO configurationTO, final boolean createFlag) {

        Form form = new Form("form", new CompoundPropertyModel(configurationTO));

        final AjaxTextFieldPanel key = new AjaxTextFieldPanel("key", "key", new PropertyModel(configurationTO, "key"));
        form.add(key);
        key.setEnabled(createFlag);
        key.addRequiredLabel();

        final AjaxTextFieldPanel value = new AjaxTextFieldPanel("value", "value", new PropertyModel(configurationTO,
                "value"));
        form.add(value);
        value.addRequiredLabel();

        submit = new ClearIndicatingAjaxButton("apply", new Model<String>(getString("submit")), pageRef) {

            private static final long serialVersionUID = -958724007591692537L;
View Full Code Here

        final Form schemaForm = new Form("form");

        schemaForm.setModel(new CompoundPropertyModel(schema));

        final AjaxTextFieldPanel name = new AjaxTextFieldPanel("name", getString("name"), new PropertyModel<String>(
                schema, "name"));
        name.addRequiredLabel();

        name.setEnabled(createFlag);

        final AjaxButton submit = new ClearIndicatingAjaxButton("apply", new ResourceModel("submit"), pageRef) {

            private static final long serialVersionUID = -958724007591692537L;
View Full Code Here

TOP

Related Classes of org.apache.syncope.console.wicket.markup.html.form.AjaxTextFieldPanel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.