in plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/SecurityRealmWizard.java [881:969]
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 connectionGroup = new Group(composite, SWT.NULL);
connectionGroup.setText(Messages.ldapServerConnection);
GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 4;
GridData data1 = new GridData();
data1.horizontalAlignment = GridData.FILL;
data1.grabExcessHorizontalSpace = true;
data1.horizontalSpan = 2;
connectionGroup.setLayout(gridLayout);
connectionGroup.setLayoutData(data1);
createLabel(connectionGroup, Messages.initContextFactory, 1);
combo[0] = new Combo(connectionGroup, SWT.NONE);
combo[0].setLayoutData(new GridData(GridData.FILL, GridData.FILL,
true, false, 3, 1));
combo[0].add("com.sun.jndi.ldap.LdapCtxFactory");
createLabel(connectionGroup, Messages.connectionUrl, 1);
combo[1] = new Combo(connectionGroup, SWT.NONE);
combo[1].setLayoutData(new GridData(GridData.FILL, GridData.FILL,
true, false, 3, 1));
combo[1].add("ldap://localhost:1389");
combo[1].add("ldap://localhost:389");
createLabel(connectionGroup, Messages.connectUsername, 1);
text[0] = createText(connectionGroup, 3);
text[0].setText("system");
createLabel(connectionGroup, Messages.conncetPwd, 1);
text[1] = createText(connectionGroup, 3);
text[1].setEchoChar('*');
text[1].setText("manager");
createLabel(connectionGroup, Messages.confirmPassword, 1);
text[2] = createText(connectionGroup, 3);
text[2].setEchoChar('*');
text[2].setText("manager");
createLabel(connectionGroup, Messages.connectProtocol, 1);
text[3] = createText(connectionGroup, 1);
createLabel(connectionGroup, Messages.authentication, 1);
combo[2] = new Combo(connectionGroup, SWT.NONE);
combo[2].setLayoutData(new GridData(GridData.FILL, GridData.FILL,
true, false, 1, 1));
combo[2].add(Messages.none);
combo[2].add(Messages.simple);
combo[2].add(Messages.strong);
combo[2].select(1);
if (eObject != null) {
Gbean gbean = (Gbean) ((JAXBElement) eObject).getValue();
if (getOptionValue(gbean, "initialContextFactory") != null) {
this.combo[0].setText(getOptionValue(gbean,
"initialContextFactory"));
}
if (getOptionValue(gbean, "connectionURL") != null) {
this.combo[1]
.setText(getOptionValue(gbean, "connectionURL"));
}
if (getOptionValue(gbean, "connectionUsername") != null) {
this.text[0].setText(getOptionValue(gbean,
"connectionUsername"));
}
if (getOptionValue(gbean, "connectionPassword") != null) {
this.text[1].setText(getOptionValue(gbean,
"connectionPassword"));
this.text[2].setText(getOptionValue(gbean,
"connectionPassword"));
}
if (getOptionValue(gbean, "connectionProtocol") != null) {
this.text[3].setText(getOptionValue(gbean,
"connectionProtocol"));
}
if (getOptionValue(gbean, "authentication") != null) {
this.combo[2].setText(getOptionValue(gbean,
"authentication"));
}
}
setControl(composite);
}