Package org.jboss.as.console.client.administration.role.form

Examples of org.jboss.as.console.client.administration.role.form.StandardRoleFormItem


    }

    @Override
    public Widget asWidget() {
        nameItem = new TextItem("name", Console.CONSTANTS.common_label_name());
        baseRoleItem = new StandardRoleFormItem("baseRole", "Base Role");
        typeItem = new TextItem("name", Console.CONSTANTS.common_label_type());
        scopeItem = new MultiselectListBoxItem("scope", "Scope", 3);
        includeAllItem = new CheckBoxItem("includeAll", "Include All");
        form.setFields(nameItem, baseRoleItem, typeItem, scopeItem, includeAllItem);
        form.setEnabled(false);
View Full Code Here


    }

    @Override
    public Widget asWidget() {
        nameItem = new TextItem("name", Console.CONSTANTS.common_label_name());
        baseRoleItem = new StandardRoleFormItem("baseRole", "Base Role");
        typeItem = new EnumFormItem<Role.Type>("type", Console.CONSTANTS.common_label_type());
        typeItem.setDefaultToFirst(true);
        typeItem.setValues(UIHelper.enumFormItemsForScopedRoleTyp());
        typeItem.addChangeHandler(new ChangeHandler() {
            @Override
View Full Code Here

        VerticalPanel layout = new VerticalPanel();
        layout.setStyleName("window-content");

        final PojoForm<Role> form = new PojoForm<Role>();
        final TextBoxItem nameItem = new TextBoxItem("name", "Name");
        final StandardRoleFormItem baseRoleItem = new StandardRoleFormItem("baseRole", "Base Role");
        baseRoleItem.setValues();
        final EnumFormItem<Role.Type> typeItem = new EnumFormItem<Role.Type>("type", "Type");
        typeItem.setDefaultToFirst(true);
        typeItem.setValues(UIHelper.enumFormItemsForScopedRoleTyp());
        final MultiselectListBoxItem scopeItem = new MultiselectListBoxItem("scope", "Scope", 3);
        final CheckBoxItem includeAllItem = new CheckBoxItem("includeAll", "Include All");
        form.setFields(nameItem, baseRoleItem, typeItem, scopeItem, includeAllItem);
        layout.add(new ScopedRoleHelpPanel().asWidget());
        layout.add(form.asWidget());

        typeItem.addChangeHandler(new ChangeHandler() {
            @Override
            public void onChange(final ChangeEvent event) {
                Role.Type type = typeItem.getValue();
                updateScope(type, scopeItem, form);
            }
        });
        updateScope(typeItem.getValue(), scopeItem, form);

        DialogueOptions options = new DialogueOptions(
                new ClickHandler() {
                    @Override
                    public void onClick(ClickEvent event) {
                        FormValidation validation = form.validate();
                        if (!validation.hasErrors()) {
                            Role scopedRole = new Role(nameItem.getValue(), nameItem.getValue(),
                                    baseRoleItem.getValue(), typeItem.getValue(), scopeItem.getValue());
                            scopedRole.setIncludeAll(includeAllItem.getValue());
                            presenter.addScopedRole(scopedRole);
                        }
                    }
                },
View Full Code Here

    }

    @Override
    public Widget asWidget() {
        nameItem = new TextItem("name", Console.CONSTANTS.common_label_name());
        baseRoleItem = new StandardRoleFormItem("baseRole", "Base Role");
        typeItem = new TextItem("type", Console.CONSTANTS.common_label_type());
        scopeItem = new MultiselectListBoxItem("scope", "Scope", 3);
        includeAllItem = new CheckBoxItem("includeAll", "Include All");
        form.setFields(nameItem, baseRoleItem, typeItem, scopeItem, includeAllItem);
        form.setEnabled(false);
View Full Code Here

    }

    @Override
    public Widget asWidget() {
        nameItem = new TextItem("name", Console.CONSTANTS.common_label_name());
        baseRoleItem = new StandardRoleFormItem("baseRole", "Base Role");
        typeItem = new TextItem("type", Console.CONSTANTS.common_label_type());
        scopeItem = new MultiselectListBoxItem("scope", "Scope", 3);
        includeAllItem = new CheckBoxItem("includeAll", "Include All");
        form.setFields(nameItem, baseRoleItem, typeItem, scopeItem, includeAllItem);
        form.setEnabled(false);
View Full Code Here

        VerticalPanel layout = new VerticalPanel();
        layout.setStyleName("window-content");

        final PojoForm<Role> form = new PojoForm<Role>();
        final TextBoxItem nameItem = new TextBoxItem("name", "Name");
        final StandardRoleFormItem baseRoleItem = new StandardRoleFormItem("baseRole", "Base Role");
        baseRoleItem.setValues();
        final EnumFormItem<Role.Type> typeItem = new EnumFormItem<Role.Type>("type", "Type");
        typeItem.setDefaultToFirst(true);
        typeItem.setValues(UIHelper.enumFormItemsForScopedRoleTyp());
        final MultiselectListBoxItem scopeItem = new MultiselectListBoxItem("scope", "Scope", 3);
        final CheckBoxItem includeAllItem = new CheckBoxItem("includeAll", "Include All");
        form.setFields(nameItem, baseRoleItem, typeItem, scopeItem, includeAllItem);
        layout.add(new ScopedRoleHelpPanel().asWidget());
        layout.add(form.asWidget());

        typeItem.addChangeHandler(new ChangeHandler() {
            @Override
            public void onChange(final ChangeEvent event) {
                Role.Type type = typeItem.getValue();
                updateScope(type, scopeItem, form);
            }
        });
        updateScope(typeItem.getValue(), scopeItem, form);

        DialogueOptions options = new DialogueOptions(
                new ClickHandler() {
                    @Override
                    public void onClick(ClickEvent event) {
                        FormValidation validation = form.validate();
                        if (!validation.hasErrors()) {
                            Role scopedRole = new Role(nameItem.getValue(), nameItem.getValue(),
                                    baseRoleItem.getValue(), typeItem.getValue(), scopeItem.getValue());
                            scopedRole.setIncludeAll(includeAllItem.getValue());
                            presenter.addScopedRole(scopedRole);
                        }
                    }
                },
View Full Code Here

TOP

Related Classes of org.jboss.as.console.client.administration.role.form.StandardRoleFormItem

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.