fix bug in add selected disabling logic - it's no longer dependant on fileextension being defined - null is ok.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@4117 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ariel Backenroth
2006-10-17 05:31:27 +00:00
parent b068224185
commit 2d13a492d0

View File

@@ -250,9 +250,7 @@ public class CreateFormWizard extends BaseWizardBean
*/ */
public boolean getAddToListDisabled() public boolean getAddToListDisabled()
{ {
return (getTemplateOutputMethodFileName() == null || return getTemplateOutputMethodFileName() == null;
fileExtension == null ||
fileExtension.length() == 0);
} }
/** /**
@@ -541,17 +539,15 @@ public class CreateFormWizard extends BaseWizardBean
public String getSummary() public String getSummary()
{ {
final ResourceBundle bundle = Application.getBundle(FacesContext.getCurrentInstance()); final ResourceBundle bundle = Application.getBundle(FacesContext.getCurrentInstance());
final String[] labels = new String[2 + this.templateOutputMethods.size()]; final String[] labels = new String[1 + this.templateOutputMethods.size()];
final String[] values = new String[2 + this.templateOutputMethods.size()]; final String[] values = new String[1 + this.templateOutputMethods.size()];
labels[0] = "Schema File"; labels[0] = "Schema File";
values[0] = this.getSchemaFileName(); values[0] = this.getSchemaFileName();
labels[1] = "Template output method type";
values[1] = this.getTemplateOutputMethodType();
for (int i = 0; i < this.templateOutputMethods.size(); i++) for (int i = 0; i < this.templateOutputMethods.size(); i++)
{ {
final TemplateOutputMethodData tomd = this.templateOutputMethods.get(i); final TemplateOutputMethodData tomd = this.templateOutputMethods.get(i);
labels[2 + i] = "Template output method for " + tomd.getFileExtension(); labels[1 + i] = "Template output method for " + tomd.getFileExtension();
values[2 + i] = tomd.getFileName(); values[1 + i] = tomd.getFileName();
} }
return this.buildSummary(labels, values); return this.buildSummary(labels, values);