Package org.openengsb.ui.admin.connectorEditorPage

Examples of org.openengsb.ui.admin.connectorEditorPage.ConnectorEditorPage$ConnectorServiceEditor


        serviceUtils.getService("(testNew=bar)", 100L);
    }

    @Test
    public void testAddNewPropertyEntry_shouldResetKeyNameTextField() throws Exception {
        tester.startPage(new ConnectorEditorPage("testdomain", "testconnector"));
        FormTester newFormTester = tester.newFormTester("editor:form");
        AjaxButton button = (AjaxButton) tester.getComponentFromLastRenderedPage("editor:form:addProperty");
        newFormTester.setValue("newPropertyKey", "testNew");
        tester.executeAjaxEvent(button, "onclick");
        assertThat(newFormTester.getTextComponentValue("newPropertyKey").isEmpty(), is(true));
View Full Code Here


        assertThat(newFormTester.getTextComponentValue("newPropertyKey").isEmpty(), is(true));
    }

    @Test
    public void testAddPropertyWithoutName_shouldLeaveListUnchanged() throws Exception {
        tester.startPage(new ConnectorEditorPage("testdomain", "testconnector"));
        AjaxButton button = (AjaxButton) tester.getComponentFromLastRenderedPage("editor:form:addProperty");
        AbstractRepeater properties =
            (AbstractRepeater) tester.getComponentFromLastRenderedPage("editor:form:attributesPanel:properties");
        tester.executeAjaxEvent(button, "onclick");
        assertThat(properties.size(), is(0));
View Full Code Here

        assertThat(properties.size(), is(0));
    }

    @Test
    public void testAddPropertyWithSameName_shouldLeaveListUnchanged() throws Exception {
        tester.startPage(new ConnectorEditorPage("testdomain", "testconnector"));
        FormTester formTester = tester.newFormTester("editor:form");
        formTester.setValue("attributesPanel:fields:a:row:field", "someValue");

        AjaxButton newPropertyButton = (AjaxButton) tester.getComponentFromLastRenderedPage("editor:form:addProperty");
View Full Code Here

        return new AjaxButton("editButton", form) {
            @Override
            protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
                LOGGER.info("edit button pressed");
                String serviceId = call.getService().getServiceId();
                setResponsePage(new ConnectorEditorPage(serviceId));
            }

            @Override
            protected void onError(AjaxRequestTarget target, Form<?> form) {
                LOGGER.warn("Submit error during editButton.");
View Full Code Here

                final String domainType = item.getModelObject().getId();
                item.add(new Label("domain.name", new LocalizableStringModel(this, item.getModelObject().getName())));
                item.add(new Link<DomainProvider>("proxy.create.new", item.getModel()) {
                    @Override
                    public void onClick() {
                        setResponsePage(new ConnectorEditorPage(getModelObject().getId(),
                            Constants.EXTERNAL_CONNECTOR_PROXY));
                    }
                });
                item.add(new Label("domain.description", new LocalizableStringModel(this, item.getModelObject()
                    .getDescription())));

                item.add(new Label("domain.class", item.getModelObject().getDomainInterface().getName()));

                IModel<? extends List<? extends ConnectorProvider>> connectorProviderModel =
                    new LoadableDetachableModel<List<? extends ConnectorProvider>>() {
                        @Override
                        protected List<? extends ConnectorProvider> load() {
                            return utilsService.listServices(ConnectorProvider.class,
                                String.format("(%s=%s)", Constants.DOMAIN_KEY, domainType));
                        }
                    };
                item.add(new ListView<ConnectorProvider>("services", connectorProviderModel) {

                    @Override
                    protected void populateItem(ListItem<ConnectorProvider> item) {
                        ServiceDescriptor desc = item.getModelObject().getDescriptor();
                        item.add(new Link<ConnectorProvider>("create.new", item.getModel()) {
                            @Override
                            public void onClick() {
                                setResponsePage(new ConnectorEditorPage(domainType, getModelObject().getId()));
                            }
                        });
                        item.add(new Label("service.name", new LocalizableStringModel(this, desc.getName())));
                        item.add(new Label("service.description", new LocalizableStringModel(this, desc
                            .getDescription())));
View Full Code Here

TOP

Related Classes of org.openengsb.ui.admin.connectorEditorPage.ConnectorEditorPage$ConnectorServiceEditor

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.