DM Forms - fix create/edit web project (when listing web forms) and UI tweaks for DM forms

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@7425 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2007-11-22 17:31:56 +00:00
parent a3325bff9e
commit b9d8bb4a51
8 changed files with 74 additions and 76 deletions

View File

@@ -95,8 +95,7 @@ public class CreateContentWizard extends BaseContentWizard
{
this.content = XMLUtil.toString(this.instanceDataDocument, true);
// TODO - first step in wizard should auto-select XML when form is selected
this.mimeType = MimetypeMap.MIMETYPE_XML; // override mimetype (in case is not set to XML)
this.mimeType = MimetypeMap.MIMETYPE_XML; // belts & braces - override mimetype (in case is not set to XML)
}
String result = super.finish();
@@ -130,6 +129,7 @@ public class CreateContentWizard extends BaseContentWizard
this.content = null;
this.inlineEdit = true;
this.mimeType = MimetypeMap.MIMETYPE_HTML;
this.formName = "";
this.instanceDataDocument = null;
if (this.formProcessorSession != null)
@@ -160,6 +160,24 @@ public class CreateContentWizard extends BaseContentWizard
return disabled;
}
@Override
public boolean getFinishButtonDisabled()
{
boolean disabled = false;
int step = Application.getWizardManager().getCurrentStep();
switch(step)
{
case 1:
{
disabled = (this.fileName == null || this.fileName.length() == 0);
break;
}
}
return disabled;
}
@Override
protected String doPostCommitProcessing(FacesContext context, String outcome)
{
@@ -257,8 +275,7 @@ public class CreateContentWizard extends BaseContentWizard
if (this.instanceDataDocument != null)
{
// TODO - first step in wizard should auto-select XML when form is selected
this.mimeType = MimetypeMap.MIMETYPE_XML; // override mimetype (in case it is not set to XML)
this.mimeType = MimetypeMap.MIMETYPE_XML; // belts & braces - override mimetype (in case is not set to XML)
}
// TODO: show first few lines of content here?