Examples of AjaxFormComponentUpdatingBehavior


Examples of org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior

        final AjaxCheckBoxPanel check = new AjaxCheckBoxPanel("check", "check", new Model(checked));

        panel.setEnabled(checked);

        check.getField().add(new AjaxFormComponentUpdatingBehavior("onchange") {

            private static final long serialVersionUID = -1107858522700306810L;

            @Override
            protected void onUpdate(final AjaxRequestTarget target) {
View Full Code Here

Examples of org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior

                "Approval", "list"));

        final DropDownChoice rowsChooser = new DropDownChoice("rowsChooser", new PropertyModel(this,
                "approvalPaginatorRows"), prefMan.getPaginatorChoices());

        rowsChooser.add(new AjaxFormComponentUpdatingBehavior("onchange") {

            private static final long serialVersionUID = -1107858522700306810L;

            @Override
            protected void onUpdate(final AjaxRequestTarget target) {
View Full Code Here

Examples of org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior

                "UserRequest", "list"));

        final DropDownChoice rowsChooser = new DropDownChoice("rowsChooser", new PropertyModel(this,
                "userRequestPaginatorRows"), prefMan.getPaginatorChoices());

        rowsChooser.add(new AjaxFormComponentUpdatingBehavior("onchange") {

            private static final long serialVersionUID = -1107858522700306810L;

            @Override
            protected void onUpdate(final AjaxRequestTarget target) {
View Full Code Here

Examples of org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior

        final AjaxCheckBoxPanel inhPasswordPolicy = new AjaxCheckBoxPanel("inheritPasswordPolicy",
                "inheritPasswordPolicy", new PropertyModel<Boolean>(entityTO, "inheritPasswordPolicy"));

        passwordPolicy.setReadOnly(inhPasswordPolicy.getModelObject());

        inhPasswordPolicy.getField().add(new AjaxFormComponentUpdatingBehavior("onchange") {

            private static final long serialVersionUID = -1107858522700306810L;

            @Override
            protected void onUpdate(final AjaxRequestTarget target) {
                passwordPolicy.setReadOnly(inhPasswordPolicy.getModelObject());
                target.add(passwordPolicy);
            }
        });

        securityContainer.add(inhPasswordPolicy);
        // -------------------------------

        // -------------------------------
        // Account policy specification
        // -------------------------------
        final AjaxDropDownChoicePanel<Long> accountPolicy = new AjaxDropDownChoicePanel<Long>("accountPolicy",
                "accountPolicy", new PropertyModel<Long>(entityTO, "accountPolicy"));

        accountPolicy.setChoiceRenderer(new PolicyRenderer(PolicyType.ACCOUNT));

        accountPolicy.setChoices(new ArrayList<Long>(accountPolicies.getObject().keySet()));

        ((DropDownChoice<?>) accountPolicy.getField()).setNullValid(true);

        securityContainer.add(accountPolicy);

        final AjaxCheckBoxPanel inhAccountPolicy = new AjaxCheckBoxPanel("inheritAccountPolicy",
                "inheritAccountPolicy", new PropertyModel<Boolean>(entityTO, "inheritAccountPolicy"));
        accountPolicy.setReadOnly(inhAccountPolicy.getModelObject());

        inhAccountPolicy.getField().add(new AjaxFormComponentUpdatingBehavior("onchange") {

            private static final long serialVersionUID = -1107858522700306810L;

            @Override
            protected void onUpdate(final AjaxRequestTarget target) {
View Full Code Here

Examples of org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior

        });
        reportletClass.setStyleSheet("long_dynamicsize");
        reportletClass.setChoices(restClient.getReportletConfClasses());
        ((DropDownChoice) reportletClass.getField()).setNullValid(true);
        reportletClass.addRequiredLabel();
        reportletClass.getField().add(new AjaxFormComponentUpdatingBehavior("onchange") {

            private static final long serialVersionUID = 5538299138211283825L;

            @Override
            protected void onUpdate(final AjaxRequestTarget target) {
View Full Code Here

Examples of org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior

        } else {
            item.add(new Label("operationType", searchCondition.getOperationType().toString()));
        }

        final CheckBox notOperator = new CheckBox("notOperator", new PropertyModel(searchCondition, "notOperator"));
        notOperator.add(new AjaxFormComponentUpdatingBehavior("onchange") {

            private static final long serialVersionUID = -1107858522700306810L;

            @Override
            protected void onUpdate(final AjaxRequestTarget target) {
            }
        });
        item.add(notOperator);

        final DropDownChoice<AttributeCond.Type> type = new DropDownChoice<AttributeCond.Type>("type",
                new PropertyModel<AttributeCond.Type>(searchCondition, "type"), attributeTypes);
        type.add(new AjaxFormComponentUpdatingBehavior("onchange") {

            private static final long serialVersionUID = -1107858522700306810L;

            @Override
            protected void onUpdate(final AjaxRequestTarget target) {
            }
        });
        item.add(type);

        final DropDownChoice<String> filterNameChooser = new DropDownChoice<String>("filterName",
                new PropertyModel<String>(searchCondition, "filterName"), (IModel) null);
        filterNameChooser.setOutputMarkupId(true);
        filterNameChooser.setRequired(required);
        filterNameChooser.add(new AjaxFormComponentUpdatingBehavior("onchange") {

            private static final long serialVersionUID = -1107858522700306810L;

            @Override
            protected void onUpdate(final AjaxRequestTarget target) {
            }
        });
        item.add(filterNameChooser);

        final TextField<String> filterValue = new TextField<String>("filterValue", new PropertyModel<String>(
                searchCondition, "filterValue"));
        filterValue.add(new AjaxFormComponentUpdatingBehavior("onchange") {

            private static final long serialVersionUID = -1107858522700306810L;

            @Override
            protected void onUpdate(final AjaxRequestTarget target) {
            }
        });
        item.add(filterValue);

        final DropDownChoice<SearchCondWrapper.FilterType> filterTypeChooser =
                new DropDownChoice<SearchCondWrapper.FilterType>("filterType",
                new PropertyModel<SearchCondWrapper.FilterType>(searchCondition, "filterType"), filterTypes);
        filterTypeChooser.setOutputMarkupId(true);
        filterTypeChooser.add(new AjaxFormComponentUpdatingBehavior("onchange") {

            private static final long serialVersionUID = -1107858522700306810L;

            @Override
            protected void onUpdate(final AjaxRequestTarget target) {
View Full Code Here

Examples of org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior

                        }
                        return text.toString();
                    }
                });

                schemaChoice.add(new AjaxFormComponentUpdatingBehavior("onblur") {

                    private static final long serialVersionUID = -1107858522700306810L;

                    @Override
                    protected void onUpdate(final AjaxRequestTarget target) {

                        attributeTO.setSchema(schemaChoice.getModelObject());

                        VirtualSchemaTO attributeSchema =
                                schemas.getObject().get(attributeTO.getSchema());
                        if (attributeSchema != null) {
                            attributeTO.setReadonly(attributeSchema.isReadonly());
                            panel.setReadOnly(attributeTO.isReadonly());
                        }

                        if (multiPanel != null) {
                            multiPanel.getView().setEnabled(false);
                        }
                    }
                });

                schemaChoice.add(new AjaxFormComponentUpdatingBehavior("onchange") {

                    private static final long serialVersionUID = -1107858522700306810L;

                    @Override
                    protected void onUpdate(final AjaxRequestTarget target) {
View Full Code Here

Examples of org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior

                private static final long serialVersionUID = -3415146226879212841L;

                @Override
                protected Recorder newRecorderComponent() {
                    Recorder recorder = super.newRecorderComponent();
                    recorder.add(new AjaxFormComponentUpdatingBehavior("change") {

                        private static final long serialVersionUID = 5538299138211283825L;

                        @Override
                        protected void onUpdate(final AjaxRequestTarget target) {
View Full Code Here

Examples of org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior

        recipientAttrName.setChoices(getSchemaNames(notificationTO.getRecipientAttrType()));
        recipientAttrName.setRequired(true);
        form.add(recipientAttrName);

        recipientAttrType.getField().add(new AjaxFormComponentUpdatingBehavior(ON_CHANGE) {

            private static final long serialVersionUID = -1107858522700306810L;

            @Override
            protected void onUpdate(final AjaxRequestTarget target) {
                recipientAttrName.setChoices(getSchemaNames(notificationTO.getRecipientAttrType()));
                target.add(recipientAttrName);
            }
        });

        final AjaxPalettePanel events = new AjaxPalettePanel("events", new PropertyModel(notificationTO, "events"),
                new ListModel<String>(restClient.getEvents()));
        form.add(events);

        final WebMarkupContainer recipientsContainer = new WebMarkupContainer("recipientsContainer");
        recipientsContainer.setOutputMarkupId(true);

        form.add(recipientsContainer);

        final AjaxCheckBoxPanel selfAsRecipient = new AjaxCheckBoxPanel("selfAsRecipient",
                getString("selfAsRecipient"), new PropertyModel(notificationTO, "selfAsRecipient"));
        form.add(selfAsRecipient);

        if (createFlag) {
            selfAsRecipient.getField().setDefaultModelObject(Boolean.TRUE);
        }

        final AjaxCheckBoxPanel checkRecipients =
                new AjaxCheckBoxPanel("checkRecipients", "checkRecipients",
                new Model<Boolean>(notificationTO.getRecipients() == null ? false : true));
        recipientsContainer.add(checkRecipients);

        final UserSearchPanel recipients =
                new UserSearchPanel("recipients",
                notificationTO.getRecipients() == null ? null : notificationTO.getRecipients());
        recipientsContainer.add(recipients);
        recipients.setEnabled(checkRecipients.getModelObject());

        selfAsRecipient.getField().add(new AjaxFormComponentUpdatingBehavior(ON_CHANGE) {

            private static final long serialVersionUID = -1107858522700306810L;

            @Override
            protected void onUpdate(final AjaxRequestTarget target) {
                if (!Boolean.valueOf(selfAsRecipient.getField().getValue())) {
                    checkRecipients.getField().setDefaultModelObject(Boolean.TRUE);
                    target.add(checkRecipients);
                    recipients.setEnabled(checkRecipients.getModelObject());
                    target.add(recipients);
                    target.add(recipientsContainer);
                }
            }
        });

        checkRecipients.getField().add(new AjaxFormComponentUpdatingBehavior(ON_CHANGE) {

            private static final long serialVersionUID = -1107858522700306810L;

            @Override
            protected void onUpdate(final AjaxRequestTarget target) {
View Full Code Here

Examples of org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior

            @Override
            protected void populateItem(final ListItem<E> item) {
                final FieldPanel fieldPanel = panelTemplate.clone();

                if (eventTemplate) {
                    fieldPanel.getField().add(new AjaxFormComponentUpdatingBehavior("onchange") {

                        private static final long serialVersionUID = -1107858522700306810L;

                        @Override
                        protected void onUpdate(final AjaxRequestTarget target) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.