");
+
+ if (WCMAppModel.CONSTRAINT_FILEDEPLOY.equals(getAddType()) ||
+ (WCMAppModel.CONSTRAINT_FILEDEPLOY.equals(server.getDeployType())))
+ {
+
+ out.write("");
+ out.write(bundle.getString(MSG_ADAPTER_NAME));
+ out.write(": | ");
+ if (server.getProperties().get(DeploymentServerConfig.PROP_ADAPTER_NAME) != null)
+ {
+ out.write((String)server.getProperties().get(DeploymentServerConfig.PROP_ADAPTER_NAME));
+ }
+ else
+ {
+ out.write(noData);
+ }
+ out.write(" |
");
+ }
+
+
out.write("");
out.write(bundle.getString(MSG_HOST));
out.write(": | ");
@@ -377,6 +403,7 @@ public class UIDeploymentServers extends UIInput
}
out.write(" |
");
+
out.write("");
out.write(bundle.getString(MSG_PORT));
out.write(": | ");
@@ -390,6 +417,19 @@ public class UIDeploymentServers extends UIInput
}
out.write(" |
");
+ out.write("");
+ out.write(bundle.getString(MSG_URL));
+ out.write(": | ");
+ if (server.getProperties().get(DeploymentServerConfig.PROP_URL) != null)
+ {
+ out.write(Utils.encode((String)server.getProperties().get(DeploymentServerConfig.PROP_URL)));
+ }
+ else
+ {
+ out.write(noData);
+ }
+ out.write(" |
");
+
out.write("");
out.write(bundle.getString(MSG_TYPE));
out.write(": | ");
@@ -407,19 +447,6 @@ public class UIDeploymentServers extends UIInput
}
out.write(" |
");
- out.write("");
- out.write(bundle.getString(MSG_URL));
- out.write(": | ");
- if (server.getProperties().get(DeploymentServerConfig.PROP_URL) != null)
- {
- out.write(Utils.encode((String)server.getProperties().get(DeploymentServerConfig.PROP_URL)));
- }
- else
- {
- out.write(noData);
- }
- out.write(" |
");
-
out.write("");
out.write(bundle.getString(MSG_USER));
out.write(": | ");
@@ -621,6 +648,87 @@ public class UIDeploymentServers extends UIInput
Utils.encodeRecursive(context, type);
out.write(" |
");
+ // create the server display name field
+ out.write("");
+ out.write(bundle.getString(MSG_NAME));
+ out.write(": | ");
+ UIComponent name = context.getApplication().createComponent(
+ UIInput.COMPONENT_TYPE);
+ FacesHelper.setupComponentId(context, name, null);
+ name.getAttributes().put("styleClass", "inputField");
+ ValueBinding vbName = context.getApplication().createValueBinding(
+ "#{WizardManager.bean.editedDeployServerProperties." +
+ DeploymentServerConfig.PROP_NAME + "}");
+ name.setValueBinding("value", vbName);
+ this.getChildren().add(name);
+ Utils.encodeRecursive(context, name);
+ out.write(" |
");
+
+ // create the display group name field
+ out.write("");
+ out.write(bundle.getString(MSG_GROUP));
+ out.write(": | ");
+ UIComponent group = context.getApplication().createComponent(
+ UIInput.COMPONENT_TYPE);
+ FacesHelper.setupComponentId(context, group, null);
+ group.getAttributes().put("styleClass", "inputField");
+ ValueBinding vbGroup = context.getApplication().createValueBinding(
+ "#{WizardManager.bean.editedDeployServerProperties." +
+ DeploymentServerConfig.PROP_GROUP + "}");
+ group.setValueBinding("value", vbGroup);
+ this.getChildren().add(group);
+ Utils.encodeRecursive(context, group);
+ out.write(" |
");
+
+
+ // MER START
+ if (WCMAppModel.CONSTRAINT_FILEDEPLOY.equals(getAddType() ) ||
+ (server != null && WCMAppModel.CONSTRAINT_FILEDEPLOY.equals(server.getDeployType())))
+ {
+ // for an FSR create the protocol adapter field
+ out.write("");
+ out.write(bundle.getString(MSG_ADAPTER_NAME));
+ out.write(": | ");
+
+ UIComponent adapterName = context.getApplication().createComponent(
+ UISelectOne.COMPONENT_TYPE);
+ FacesHelper.setupComponentId(context, adapterName, "deploy_server_adapter_name");
+ adapterName.getAttributes().put("styleClass", "inputField");
+
+ ValueBinding vbAdapterName = context.getApplication().createValueBinding(
+ "#{WizardManager.bean.editedDeployServerProperties." +
+ DeploymentServerConfig.PROP_ADAPTER_NAME + "}");
+ adapterName.setValueBinding("value", vbAdapterName);
+
+ UISelectItems adaptersComponent = (UISelectItems)context.getApplication().
+ createComponent(UISelectItems.COMPONENT_TYPE);
+
+ DeploymentService dep = getDeploymentService();
+ if(dep == null)
+ {
+ List adapters = new ArrayList(1);
+ adapters.add(new SelectItem("default", "Default"));
+ adaptersComponent.setValue(adapters);
+ }
+ else
+ {
+ Set adapterNames = dep.getAdapterNames();
+ List adapters = new ArrayList(adapterNames.size());
+ for(String aname : adapterNames)
+ {
+ adapters.add(new SelectItem(aname, aname));
+ }
+ adaptersComponent.setValue(adapters);
+ }
+
+ adapterName.getChildren().add(adaptersComponent);
+ this.getChildren().add(adapterName);
+ Utils.encodeRecursive(context, adapterName);
+
+ out.write(" |
");
+ }
+ // MER END
+
// create the server host field
out.write("");
out.write(bundle.getString(MSG_HOST));
@@ -661,38 +769,22 @@ public class UIDeploymentServers extends UIInput
Utils.encodeRecursive(context, port);
out.write(" |
");
- // create the server display name field
+ // create the server url field
out.write("");
- out.write(bundle.getString(MSG_NAME));
+ out.write(bundle.getString(MSG_URL));
out.write(": | ");
- UIComponent name = context.getApplication().createComponent(
+ UIComponent url = context.getApplication().createComponent(
UIInput.COMPONENT_TYPE);
- FacesHelper.setupComponentId(context, name, null);
- name.getAttributes().put("styleClass", "inputField");
- ValueBinding vbName = context.getApplication().createValueBinding(
+ FacesHelper.setupComponentId(context, url, null);
+ url.getAttributes().put("styleClass", "inputField");
+ ValueBinding vbUrl = context.getApplication().createValueBinding(
"#{WizardManager.bean.editedDeployServerProperties." +
- DeploymentServerConfig.PROP_NAME + "}");
- name.setValueBinding("value", vbName);
- this.getChildren().add(name);
- Utils.encodeRecursive(context, name);
+ DeploymentServerConfig.PROP_URL + "}");
+ url.setValueBinding("value", vbUrl);
+ this.getChildren().add(url);
+ Utils.encodeRecursive(context, url);
out.write(" |
");
-
- // create the display group name field
- out.write("");
- out.write(bundle.getString(MSG_GROUP));
- out.write(": | ");
- UIComponent group = context.getApplication().createComponent(
- UIInput.COMPONENT_TYPE);
- FacesHelper.setupComponentId(context, group, null);
- group.getAttributes().put("styleClass", "inputField");
- ValueBinding vbGroup = context.getApplication().createValueBinding(
- "#{WizardManager.bean.editedDeployServerProperties." +
- DeploymentServerConfig.PROP_GROUP + "}");
- group.setValueBinding("value", vbGroup);
- this.getChildren().add(group);
- Utils.encodeRecursive(context, group);
- out.write(" |
");
-
+
// create the server username field
out.write("");
out.write(bundle.getString(MSG_USER));
@@ -726,21 +818,7 @@ public class UIDeploymentServers extends UIInput
Utils.encodeRecursive(context, pwd);
out.write(" |
");
- // create the server url field
- out.write("");
- out.write(bundle.getString(MSG_URL));
- out.write(": | ");
- UIComponent url = context.getApplication().createComponent(
- UIInput.COMPONENT_TYPE);
- FacesHelper.setupComponentId(context, url, null);
- url.getAttributes().put("styleClass", "inputField");
- ValueBinding vbUrl = context.getApplication().createValueBinding(
- "#{WizardManager.bean.editedDeployServerProperties." +
- DeploymentServerConfig.PROP_URL + "}");
- url.setValueBinding("value", vbUrl);
- this.getChildren().add(url);
- Utils.encodeRecursive(context, url);
- out.write(" |
");
+
// create the source path field
out.write("");
@@ -962,4 +1040,13 @@ public class UIDeploymentServers extends UIInput
return items;
}
+ protected DeploymentService getDeploymentService()
+ {
+ if (deploymentService == null)
+ {
+ deploymentService = Repository.getServiceRegistry(FacesContext.getCurrentInstance()).getDeploymentService();
+ }
+ return deploymentService;
+ }
+
}
|