Examples of AjaxFormChoiceComponentUpdatingBehavior


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

            super(id);
            setOutputMarkupId(true);

            final CheckGroup<AuditLoggerName> successGroup = new CheckGroup<AuditLoggerName>("successGroup",
                    new AuditsByCategoryModel(category, Result.success));
            successGroup.add(new AjaxFormChoiceComponentUpdatingBehavior() {

                private static final long serialVersionUID = -151291731388673682L;

                @Override
                protected void onUpdate(final AjaxRequestTarget target) {
                    // Empty method: here only to let Model.setObject() be invoked.
                }
            });
            add(successGroup);
            MetaDataRoleAuthorizationStrategy.authorize(successGroup, RENDER,
                    xmlRolesReader.getAllAllowedRoles("Audit", "enable"));
            MetaDataRoleAuthorizationStrategy.authorize(successGroup, RENDER,
                    xmlRolesReader.getAllAllowedRoles("Audit", "disable"));

            final CheckGroupSelector successSelector = new CheckGroupSelector("successSelector", successGroup);
            add(successSelector);
            MetaDataRoleAuthorizationStrategy.authorize(successSelector, RENDER,
                    xmlRolesReader.getAllAllowedRoles("Audit", "enable"));
            MetaDataRoleAuthorizationStrategy.authorize(successSelector, RENDER,
                    xmlRolesReader.getAllAllowedRoles("Audit", "disable"));

            final CheckGroup<AuditLoggerName> failureGroup = new CheckGroup<AuditLoggerName>("failureGroup",
                    new AuditsByCategoryModel(category, Result.failure));
            failureGroup.add(new AjaxFormChoiceComponentUpdatingBehavior() {

                private static final long serialVersionUID = -151291731388673682L;

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

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

            super(id);
            setOutputMarkupId(true);

            final CheckGroup<AuditLoggerName> successGroup = new CheckGroup<AuditLoggerName>("successGroup",
                    new AuditsByCategoryModel(category, Result.success));
            successGroup.add(new AjaxFormChoiceComponentUpdatingBehavior() {

                private static final long serialVersionUID = -151291731388673682L;

                @Override
                protected void onUpdate(final AjaxRequestTarget target) {
                    // Empty method: here only to let Model.setObject() be invoked.
                }
            });
            add(successGroup);
            MetaDataRoleAuthorizationStrategy.authorize(successGroup, RENDER,
                    xmlRolesReader.getAllAllowedRoles("Audit", "enable"));
            MetaDataRoleAuthorizationStrategy.authorize(successGroup, RENDER,
                    xmlRolesReader.getAllAllowedRoles("Audit", "disable"));

            final CheckGroupSelector successSelector = new CheckGroupSelector("successSelector", successGroup);
            add(successSelector);
            MetaDataRoleAuthorizationStrategy.authorize(successSelector, RENDER,
                    xmlRolesReader.getAllAllowedRoles("Audit", "enable"));
            MetaDataRoleAuthorizationStrategy.authorize(successSelector, RENDER,
                    xmlRolesReader.getAllAllowedRoles("Audit", "disable"));

            final CheckGroup<AuditLoggerName> failureGroup = new CheckGroup<AuditLoggerName>("failureGroup",
                    new AuditsByCategoryModel(category, Result.failure));
            failureGroup.add(new AjaxFormChoiceComponentUpdatingBehavior() {

                private static final long serialVersionUID = -151291731388673682L;

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

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

            super(id);
            setOutputMarkupId(true);

            final CheckGroup<AuditLoggerName> successGroup = new CheckGroup<AuditLoggerName>("successGroup",
                    new AuditsByCategoryModel(category, Result.success));
            successGroup.add(new AjaxFormChoiceComponentUpdatingBehavior() {

                private static final long serialVersionUID = -151291731388673682L;

                @Override
                protected void onUpdate(final AjaxRequestTarget target) {
                    // Empty method: here only to let Model.setObject() be invoked.
                }
            });
            add(successGroup);
            authorizeComponent(successGroup);

            final CheckGroupSelector successSelector = new CheckGroupSelector("successSelector", successGroup);
            add(successSelector);
            authorizeComponent(successSelector);

            final CheckGroup<AuditLoggerName> failureGroup = new CheckGroup<AuditLoggerName>("failureGroup",
                    new AuditsByCategoryModel(category, Result.failure));
            failureGroup.add(new AjaxFormChoiceComponentUpdatingBehavior() {

                private static final long serialVersionUID = -151291731388673682L;

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

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

        final CheckGroup<String> successGroup = new CheckGroup<String>(
                "successGroup",
                selected);

        successGroup.add(new AjaxFormChoiceComponentUpdatingBehavior() {

            private static final long serialVersionUID = -151291731388673682L;

            @Override
            protected void onUpdate(final AjaxRequestTarget target) {

                final Set<String> toBeRemoved = new HashSet<String>();
                final Set<String> toBeAdded = new HashSet<String>();

                for (String event : getEvents(eventCategoryTO)) {
                    final String eventString = LoggerEventUtils.buildEvent(
                            eventCategoryTO.getType(),
                            eventCategoryTO.getCategory(),
                            eventCategoryTO.getSubcategory(),
                            event,
                            AuditElements.Result.SUCCESS);

                    if (successGroup.getModelObject().contains(eventString)) {
                        toBeAdded.add(eventString);
                    } else {
                        toBeRemoved.add(eventString);
                    }
                }

                send(EventSelectionPanel.this.getPage(), Broadcast.BREADTH,
                        new SelectedEventsPanel.EventSelectionChanged(target, toBeAdded, toBeRemoved));
            }
        });

        successGroup.setVisible(!events.isEmpty());
        add(successGroup);

        add(new Label("successLabel", new ResourceModel("Success", "Success"))).setVisible(!events.isEmpty());

        final CheckGroupSelector successSelector = new CheckGroupSelector("successSelector", successGroup);
        successSelector.setVisible(!events.isEmpty());
        add(successSelector);

        final ListView<String> categoryView = new AltListView<String>("categoryView", events) {

            private static final long serialVersionUID = 4949588177564901031L;

            @Override
            protected void populateItem(final ListItem<String> item) {
                final String subcategory = item.getModelObject();

                item.add(new Label("subcategory", new ResourceModel(subcategory, subcategory)));
            }
        };
        add(categoryView);

        final ListView<String> successView = new AltListView<String>("successView", events) {

            private static final long serialVersionUID = 4949588177564901031L;

            @Override
            protected void populateItem(final ListItem<String> item) {
                final String event = item.getModelObject();

                final Check<String> successCheck = new Check<String>("successCheck",
                        new Model<String>(LoggerEventUtils.buildEvent(
                        eventCategoryTO.getType(),
                        eventCategoryTO.getCategory(),
                        eventCategoryTO.getSubcategory(),
                        event,
                        AuditElements.Result.SUCCESS)),
                        successGroup);
                item.add(successCheck);
            }
        };
        successGroup.add(successView);

        final CheckGroup<String> failureGroup = new CheckGroup<String>(
                "failureGroup",
                selected);

        failureGroup.add(new AjaxFormChoiceComponentUpdatingBehavior() {

            private static final long serialVersionUID = -151291731388673682L;

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

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

            super(id);
            setOutputMarkupId(true);

            final CheckGroup<AuditLoggerName> successGroup = new CheckGroup<AuditLoggerName>("successGroup",
                    new AuditsByCategoryModel(category, Result.success));
            successGroup.add(new AjaxFormChoiceComponentUpdatingBehavior() {

                private static final long serialVersionUID = -151291731388673682L;

                @Override
                protected void onUpdate(final AjaxRequestTarget target) {
                    // Empty method: here only to let Model.setObject() be invoked.
                }
            });
            add(successGroup);
            MetaDataRoleAuthorizationStrategy.authorize(successGroup, RENDER,
                    xmlRolesReader.getAllAllowedRoles("Audit", "enable"));
            MetaDataRoleAuthorizationStrategy.authorize(successGroup, RENDER,
                    xmlRolesReader.getAllAllowedRoles("Audit", "disable"));

            final CheckGroupSelector successSelector = new CheckGroupSelector("successSelector", successGroup);
            add(successSelector);
            MetaDataRoleAuthorizationStrategy.authorize(successSelector, RENDER,
                    xmlRolesReader.getAllAllowedRoles("Audit", "enable"));
            MetaDataRoleAuthorizationStrategy.authorize(successSelector, RENDER,
                    xmlRolesReader.getAllAllowedRoles("Audit", "disable"));

            final CheckGroup<AuditLoggerName> failureGroup = new CheckGroup<AuditLoggerName>("failureGroup",
                    new AuditsByCategoryModel(category, Result.failure));
            failureGroup.add(new AjaxFormChoiceComponentUpdatingBehavior() {

                private static final long serialVersionUID = -151291731388673682L;

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

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

        nameField.setLabel(Model.of(WebSession.getString(type == Type.email ? 315 : 316)));
        RadioGroup<Type> rg = new RadioGroup<Type>("type", new PropertyModel<Type>(ForgetPasswordDialog.this, "type"));
        add(rg.add(new Radio<Type>("email", Model.of(Type.email)).setOutputMarkupId(true))
            .add(new Radio<Type>("login", Model.of(Type.login)).setOutputMarkupId(true))
            .setOutputMarkupId(true));
        rg.add(new AjaxFormChoiceComponentUpdatingBehavior() {
          private static final long serialVersionUID = 5814272716387415523L;

          @Override
          protected void onUpdate(AjaxRequestTarget target) {
            lblModel.setObject(WebSession.getString(type == Type.email ? 315 : 316));
View Full Code Here

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

            super(id);
            setOutputMarkupId(true);

            final CheckGroup<AuditLoggerName> successGroup = new CheckGroup<AuditLoggerName>("successGroup",
                    new AuditsByCategoryModel(category, Result.success));
            successGroup.add(new AjaxFormChoiceComponentUpdatingBehavior() {

                private static final long serialVersionUID = -151291731388673682L;

                @Override
                protected void onUpdate(final AjaxRequestTarget target) {
                    // Empty method: here only to let Model.setObject() be invoked.
                }
            });
            add(successGroup);
            MetaDataRoleAuthorizationStrategy.authorize(successGroup, RENDER,
                    xmlRolesReader.getAllAllowedRoles("Audit", "enable"));
            MetaDataRoleAuthorizationStrategy.authorize(successGroup, RENDER,
                    xmlRolesReader.getAllAllowedRoles("Audit", "disable"));

            final CheckGroupSelector successSelector = new CheckGroupSelector("successSelector", successGroup);
            add(successSelector);
            MetaDataRoleAuthorizationStrategy.authorize(successSelector, RENDER,
                    xmlRolesReader.getAllAllowedRoles("Audit", "enable"));
            MetaDataRoleAuthorizationStrategy.authorize(successSelector, RENDER,
                    xmlRolesReader.getAllAllowedRoles("Audit", "disable"));

            final CheckGroup<AuditLoggerName> failureGroup = new CheckGroup<AuditLoggerName>("failureGroup",
                    new AuditsByCategoryModel(category, Result.failure));
            failureGroup.add(new AjaxFormChoiceComponentUpdatingBehavior() {

                private static final long serialVersionUID = -151291731388673682L;

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

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

        nameField.setLabel(Model.of(WebSession.getString(type == Type.email ? 315 : 316)));
        RadioGroup<Type> rg = new RadioGroup<Type>("type", new PropertyModel<Type>(ForgetPasswordDialog.this, "type"));
        add(rg.add(new Radio<Type>("email", Model.of(Type.email)).setOutputMarkupId(true))
            .add(new Radio<Type>("login", Model.of(Type.login)).setOutputMarkupId(true))
            .setOutputMarkupId(true));
        rg.add(new AjaxFormChoiceComponentUpdatingBehavior() {
          private static final long serialVersionUID = 5814272716387415523L;

          @Override
          protected void onUpdate(AjaxRequestTarget target) {
            lblModel.setObject(WebSession.getString(type == Type.email ? 315 : 316));
View Full Code Here

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

        nameField.setLabel(Model.of(WebSession.getString(type == Type.email ? 315 : 316)));
        RadioGroup<Type> rg = new RadioGroup<Type>("type", new PropertyModel<Type>(ForgetPasswordDialog.this, "type"));
        add(rg.add(new Radio<Type>("email", Model.of(Type.email)).setOutputMarkupId(true))
            .add(new Radio<Type>("login", Model.of(Type.login)).setOutputMarkupId(true))
            .setOutputMarkupId(true));
        rg.add(new AjaxFormChoiceComponentUpdatingBehavior() {
          private static final long serialVersionUID = 5814272716387415523L;

          @Override
          protected void onUpdate(AjaxRequestTarget target) {
            lblModel.setObject(WebSession.getString(type == Type.email ? 315 : 316));
View Full Code Here

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

    // Add a radio choice component that uses Input's 'site' property to
    // designate the
    // current selection, and that uses the SITES list for the available
    // options.
    RadioChoice<String> sites = new RadioChoice<>("site", SITES);
    sites.add(new AjaxFormChoiceComponentUpdatingBehavior()
    {
      @Override
      protected void onUpdate(AjaxRequestTarget target)
      {
        info("Selected: " + getComponent().getDefaultModelObjectAsString());
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.