plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/wizards/DBPoolWizard.java [571:642]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void createControl(Composite parent) {
        Composite composite = new Composite(parent, SWT.NULL);
        GridLayout layout = new GridLayout();
        layout.numColumns = 2;
        composite.setLayout(layout);
        GridData data = new GridData();
        data.verticalAlignment = GridData.FILL;
        data.horizontalAlignment = GridData.FILL;
        data.widthHint = 300;
        composite.setLayoutData(data);

        Group advancedGroup = createGroup(composite,
            CommonMessages.advancedGroup, 2);
        createDatabase = new Button(advancedGroup, SWT.CHECK);
        createDatabase.setText(CommonMessages.createDatabase);
        createDatabase.setLayoutData(new GridData(GridData.FILL,
            GridData.FILL, true, false, 4, 1));
        createDatabase.setSelection(true);
        createLabel(advancedGroup, CommonMessages.loginTimeout, 2);
        text[0] = createText(advancedGroup, 2);

        Group userGroup = createGroup(composite, CommonMessages.loginGroup,
            2);
        createLabel(userGroup, CommonMessages.username, 2);
        text[1] = createText(userGroup, 2);
        text[1].setText("system");
        createLabel(userGroup, CommonMessages.password, 2);
        text[2] = createText(userGroup, 2);
        text[2].setEchoChar('*');
        text[2].setText("manager");
        createLabel(userGroup, CommonMessages.confirmPassword, 2);
        text[3] = createText(userGroup, 2);
        text[3].setEchoChar('*');
        text[3].setText("manager");

        // if edit a pool,the info must be filled into wizard
        if (eObject != null && ExtModule.class.isInstance(eObject)) {
        ExtModule extModule = (ExtModule) eObject;
        try {
            ConnectiondefinitionInstance conndefInstance = ((JAXBElement<Connector>) extModule
                .getAny()).getValue().getResourceadapter().get(0)
                .getOutboundResourceadapter()
                .getConnectionDefinition().get(0)
                .getConnectiondefinitionInstance().get(0);
            java.util.List<ConfigPropertySetting> configPropertySettingList = conndefInstance
                .getConfigPropertySetting();
            for (ConfigPropertySetting cps : configPropertySettingList) {
            if (cps.getName().equals(Messages.dbWizardCreateDb)) {
                if (cps.getValue().equals("true"))
                createDatabase.setSelection(true);
                else
                createDatabase.setSelection(false);
            } else if (cps.getName().equals(Messages.dbWizardLoginTimeout)) {
                text[0].setText(cps.getValue());
            } else if (cps.getName().equals(Messages.dbWizardUserName)) {
                text[1].setText(cps.getValue());
            } else if (cps.getName().equals(Messages.dbWizardPwd)) {
                text[2].setEchoChar('*');
                text[2].setText(cps.getValue());
                text[3].setEchoChar('*');
                text[3].setText(cps.getValue());
            }
            }

        } catch (Exception e) {
            e.printStackTrace();
        }
        }

        setControl(composite);

    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/DBPoolWizard.java [573:644]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void createControl(Composite parent) {
        Composite composite = new Composite(parent, SWT.NULL);
        GridLayout layout = new GridLayout();
        layout.numColumns = 2;
        composite.setLayout(layout);
        GridData data = new GridData();
        data.verticalAlignment = GridData.FILL;
        data.horizontalAlignment = GridData.FILL;
        data.widthHint = 300;
        composite.setLayoutData(data);

        Group advancedGroup = createGroup(composite,
            CommonMessages.advancedGroup, 2);
        createDatabase = new Button(advancedGroup, SWT.CHECK);
        createDatabase.setText(CommonMessages.createDatabase);
        createDatabase.setLayoutData(new GridData(GridData.FILL,
            GridData.FILL, true, false, 4, 1));
        createDatabase.setSelection(true);
        createLabel(advancedGroup, CommonMessages.loginTimeout, 2);
        text[0] = createText(advancedGroup, 2);

        Group userGroup = createGroup(composite, CommonMessages.loginGroup,
            2);
        createLabel(userGroup, CommonMessages.username, 2);
        text[1] = createText(userGroup, 2);
        text[1].setText("system");
        createLabel(userGroup, CommonMessages.password, 2);
        text[2] = createText(userGroup, 2);
        text[2].setEchoChar('*');
        text[2].setText("manager");
        createLabel(userGroup, CommonMessages.confirmPassword, 2);
        text[3] = createText(userGroup, 2);
        text[3].setEchoChar('*');
        text[3].setText("manager");

        // if edit a pool,the info must be filled into wizard
        if (eObject != null && ExtModule.class.isInstance(eObject)) {
        ExtModule extModule = (ExtModule) eObject;
        try {
            ConnectiondefinitionInstance conndefInstance = ((JAXBElement<Connector>) extModule
                .getAny()).getValue().getResourceadapter().get(0)
                .getOutboundResourceadapter()
                .getConnectionDefinition().get(0)
                .getConnectiondefinitionInstance().get(0);
            java.util.List<ConfigPropertySetting> configPropertySettingList = conndefInstance
                .getConfigPropertySetting();
            for (ConfigPropertySetting cps : configPropertySettingList) {
            if (cps.getName().equals(Messages.dbWizardCreateDb)) {
                if (cps.getValue().equals("true"))
                createDatabase.setSelection(true);
                else
                createDatabase.setSelection(false);
            } else if (cps.getName().equals(Messages.dbWizardLoginTimeout)) {
                text[0].setText(cps.getValue());
            } else if (cps.getName().equals(Messages.dbWizardUserName)) {
                text[1].setText(cps.getValue());
            } else if (cps.getName().equals(Messages.dbWizardPwd)) {
                text[2].setEchoChar('*');
                text[2].setText(cps.getValue());
                text[3].setEchoChar('*');
                text[3].setText(cps.getValue());
            }
            }

        } catch (Exception e) {
            e.printStackTrace();
        }
        }

        setControl(composite);

    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



