Package org.jboss.as.console.client.widgets

Examples of org.jboss.as.console.client.widgets.ComboBox$Template


        return result;
    }
   
    @Test
    public void testSimple() {
        Template t = new Template("This is a test @[foo]\n@[bar]");
        Assert.assertEquals("This is a test FOO\nBAR", t.eval(env(
                "foo", "FOO",
                "bar", "BAR")));
    }
View Full Code Here


                "bar", "BAR")));
    }
   
    @Test
    public void testJustPlaceholder() {
        Template t = new Template("@[foo]");
        Assert.assertEquals("FOO", t.eval(env(
                "foo", "FOO")));
    }
View Full Code Here

                "foo", "FOO")));
    }
   
    @Test
    public void testSimpleMissing() {
        Template t = new Template("This is a test @[foo]\n@[bar]");
        try {
            t.eval(env(
                    "foo", "FOO"));
            Assert.fail();
        } catch (RuntimeException e) {
            Assert.assertEquals("No replacement for bar at line 2", e.getMessage());
        }
        t = new Template("This is a test @[foo]\n\r\n@[bar]");
        try {
            t.eval(env(
                    "foo", "FOO"));
            Assert.fail();
        } catch (RuntimeException e) {
            Assert.assertEquals("No replacement for bar at line 3", e.getMessage());
        }
View Full Code Here

        layout.add(new HTML("<h3>Step 2/4: Datasource Class</h3>"));

        if(!isStandalone)
        {
            groupSelection = new ComboBox();
            Set<String> groupNames = new HashSet<String>(wizard.getDrivers().size());
            for(JDBCDriver driver : wizard.getDrivers())
                groupNames.add(driver.getGroup());
            groupSelection.setValues(groupNames);
            groupSelection.setItemSelected(0, true);
View Full Code Here

        layout.add(desc);

        if(!isStandalone)
        {
            groupSelection = new ComboBox();

            Set<String> groupNames = new HashSet<String>(wizard.getDrivers().size());
            for(JDBCDriver driver : wizard.getDrivers())
                groupNames.add(driver.getGroup());
            groupSelection.setValues(groupNames);
View Full Code Here

        panel.setContent(subsysTree);

        VerticalPanel layout = new VerticalPanel();
        layout.setStyleName("fill-layout-width");

        selection = new ComboBox();
        selection.addValueChangeHandler(new ValueChangeHandler<String>() {
            @Override
            public void onValueChange(ValueChangeEvent<String> event) {
                fireProfileSelection(event.getValue());
            }
View Full Code Here

        builder.appendHtmlConstant("<div class='host-selector-header'>Host:</div>");
        builder.appendHtmlConstant("<div id='host-selector-content'/>");
        builder.appendHtmlConstant("</div>");

        panel = new HTMLPanel(builder.toSafeHtml());
        hostSelection = new ComboBox();
        hostSelection.addValueChangeHandler(new ValueChangeHandler<String>() {
            @Override
            public void onValueChange(ValueChangeEvent<String> event) {
                fireHostSelection(event.getValue());
            }
View Full Code Here

        vpanel.add(new ContentGroupLabel("Server Instances"));

        HorizontalPanel tableOptions = new HorizontalPanel();
        tableOptions.getElement().setAttribute("cellpadding", "2px");

        groupFilter = new ComboBox();
        groupFilter.addValueChangeHandler(new ValueChangeHandler<String>() {
            @Override
            public void onValueChange(ValueChangeEvent<String> event) {
                presenter.onFilterByGroup(event.getValue());
            }
View Full Code Here

        socketTable = new SocketTable();

        HorizontalPanel tableOptions = new HorizontalPanel();
        tableOptions.getElement().setAttribute("cellpadding", "2px");

        groupFilter = new ComboBox();
        groupFilter.addValueChangeHandler(new ValueChangeHandler<String>() {
            @Override
            public void onValueChange(ValueChangeEvent<String> event) {
                presenter.onFilterGroup(event.getValue());
            }
View Full Code Here

        // ---

        VerticalPanel outputPanel = new VerticalPanel();

        ComboBox comboBox = new ComboBox();
        comboBox.addValueChangeHandler(new ValueChangeHandler<String>() {
            @Override
            public void onValueChange(ValueChangeEvent<String> event) {
                presenter.setOperation(event.getValue());
            }
        });

        List<String> options = new ArrayList<String>();
        options.add(ModelDescriptionConstants.READ_RESOURCE_OPERATION);
        options.add(ModelDescriptionConstants.READ_RESOURCE_DESCRIPTION_OPERATION);
        options.add(ModelDescriptionConstants.READ_OPERATION_NAMES_OPERATION);
        options.add(ModelDescriptionConstants.READ_RESOURCE_METRICS);
        options.add(ModelDescriptionConstants.READ_CHILDREN_TYPES_OPERATION);
        options.add(ModelDescriptionConstants.READ_CHILDREN_NAMES_OPERATION);

        comboBox.setValues(options);
        comboBox.setItemSelected(0,true);
        outputPanel.add(comboBox.asWidget());

        requestArea = new TextArea();
        requestArea.setCharacterWidth(60);
        requestArea.setVisibleLines(10);
View Full Code Here

TOP

Related Classes of org.jboss.as.console.client.widgets.ComboBox$Template

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.