- fixing naming for variables passed to jsp, xsl and freemarker

- cleanup of generate and regenerate apis and adding documentation.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@4203 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ariel Backenroth
2006-10-24 00:33:52 +00:00
parent 2b35eed0e0
commit eeec32d5ce
9 changed files with 455 additions and 440 deletions

View File

@@ -359,7 +359,7 @@ public class AVMEditBean
if (nodeService.getProperty(avmRef, WCMModel.PROP_PARENT_FORM) != null) if (nodeService.getProperty(avmRef, WCMModel.PROP_PARENT_FORM) != null)
{ {
final FormsService fs = FormsService.getInstance(); final FormsService fs = FormsService.getInstance();
fs.regenerate(avmRef); fs.regenerateRenditions(avmRef);
} }
resetState(); resetState();

View File

@@ -115,6 +115,7 @@ public class CreateFormWizard extends BaseWizardBean
private String schemaRootTagName; private String schemaRootTagName;
private String formName; private String formName;
private String formDescription;
private Class renderingEngineType = null; private Class renderingEngineType = null;
protected ContentService contentService; protected ContentService contentService;
private DataModel renderingEnginesDataModel; private DataModel renderingEnginesDataModel;
@@ -158,7 +159,7 @@ public class CreateFormWizard extends BaseWizardBean
// apply the titled aspect - title and description // apply the titled aspect - title and description
Map<QName, Serializable> props = new HashMap<QName, Serializable>(2, 1.0f); Map<QName, Serializable> props = new HashMap<QName, Serializable>(2, 1.0f);
props.put(ContentModel.PROP_TITLE, this.getFormName()); props.put(ContentModel.PROP_TITLE, this.getFormName());
props.put(ContentModel.PROP_DESCRIPTION, ""); props.put(ContentModel.PROP_DESCRIPTION, this.getFormDescription());
this.nodeService.addAspect(schemaNodeRef, ContentModel.ASPECT_TITLED, props); this.nodeService.addAspect(schemaNodeRef, ContentModel.ASPECT_TITLED, props);
props = new HashMap<QName, Serializable>(1, 1.0f); props = new HashMap<QName, Serializable>(1, 1.0f);
@@ -211,6 +212,7 @@ public class CreateFormWizard extends BaseWizardBean
this.removeUploadedRenderingEngineFile(); this.removeUploadedRenderingEngineFile();
this.schemaRootTagName = null; this.schemaRootTagName = null;
this.formName = null; this.formName = null;
this.formDescription = null;
this.renderingEngineType = null; this.renderingEngineType = null;
this.renderingEngines = new ArrayList<RenderingEngineData>(); this.renderingEngines = new ArrayList<RenderingEngineData>();
this.fileExtension = null; this.fileExtension = null;
@@ -535,6 +537,22 @@ public class CreateFormWizard extends BaseWizardBean
: this.formName); : this.formName);
} }
/**
* Sets the description for this form.
*/
public void setFormDescription(final String formDescription)
{
this.formDescription = formDescription;
}
/**
* @return the description for this form.
*/
public String getFormDescription()
{
return this.formDescription;
}
/** /**
* @return Returns the summary data for the wizard. * @return Returns the summary data for the wizard.
*/ */

View File

@@ -104,20 +104,20 @@ public class CreateWebContentWizard extends BaseContentWizard
{ {
if (logger.isDebugEnabled()) if (logger.isDebugEnabled())
logger.debug("generating form data renderer output for " + this.formName); logger.debug("generating form data renderer output for " + this.formName);
final Form tt = this.getForm(); final Form form = this.getForm();
final FormsService ts = FormsService.getInstance(); final FormsService fs = FormsService.getInstance();
final NodeRef formInstanceDataNodeRef =
AVMNodeConverter.ToNodeRef(-1, this.createdPath);
final Map<QName, Serializable> props = new HashMap<QName, Serializable>(1, 1.0f); final Map<QName, Serializable> props = new HashMap<QName, Serializable>(1, 1.0f);
props.put(WCMModel.PROP_PARENT_FORM, tt.getNodeRef()); props.put(WCMModel.PROP_PARENT_FORM, form.getNodeRef());
props.put(WCMModel.PROP_PARENT_FORM_NAME, tt.getName()); props.put(WCMModel.PROP_PARENT_FORM_NAME, form.getName());
this.nodeService.addAspect(AVMNodeConverter.ToNodeRef(-1, this.createdPath), this.nodeService.addAspect(formInstanceDataNodeRef,
WCMModel.ASPECT_FORM_INSTANCE_DATA, WCMModel.ASPECT_FORM_INSTANCE_DATA,
props); props);
ts.generate(this.createdPath.substring(0, this.createdPath.lastIndexOf('/')), fs.generateRenditions(formInstanceDataNodeRef,
ts.parseXML(this.content), fs.parseXML(this.content),
tt, form);
this.fileName);
} }
// return the default outcome // return the default outcome

View File

@@ -196,6 +196,13 @@ public final class FormsService
} }
} }
/**
* Returns the form backed by the given NodeRef. The NodeRef should
* point to the schema for this form.
*
* @param nodeRef the node ref for the schema for the form
* @return the form for the given node ref.
*/
public Form getForm(final NodeRef nodeRef) public Form getForm(final NodeRef nodeRef)
{ {
return this.newForm(nodeRef); return this.newForm(nodeRef);
@@ -242,137 +249,139 @@ public final class FormsService
return tt; return tt;
} }
public void generate(final String parentPath, /**
final Document xml, * Generates renditions for the provided formInstanceData.
final Form tt, *
final String fileName) * @param formInstanceDataNodeRef the noderef containing the form instance data
* @param formInstanceData the parsed contents of the form.
* @param form the form to use when generating renditions.
*/
public void generateRenditions(final NodeRef formInstanceDataNodeRef,
final Document formInstanceData,
final Form form)
throws IOException, throws IOException,
RenderingEngine.RenderingException RenderingEngine.RenderingException
{ {
for (RenderingEngine tom : tt.getRenderingEngines()) final String formInstanceDataFileName = (String)
nodeService.getProperty(formInstanceDataNodeRef, ContentModel.PROP_NAME);
final String formInstanceDataAvmPath = AVMNodeConverter.ToAVMVersionPath(formInstanceDataNodeRef).getSecond();
final String parentPath = AVMNodeConverter.SplitBase(formInstanceDataAvmPath)[0];
for (RenderingEngine re : form.getRenderingEngines())
{ {
// get the node ref of the node that will contain the content // get the node ref of the node that will contain the content
final String generatedFileName = stripExtension(fileName) + "." + tom.getFileExtension(); final String renditionFileName =
final OutputStream fileOut = this.avmService.createFile(parentPath, generatedFileName); this.stripExtension(formInstanceDataFileName) + "." + re.getFileExtension();
final String fullAvmPath = parentPath + '/' + generatedFileName; final OutputStream fileOut = this.avmService.createFile(parentPath, renditionFileName);
final String avmStore = parentPath.substring(0, parentPath.indexOf(":/")); final String renditionAvmPath = parentPath + '/' + renditionFileName;
final String sandBoxUrl = AVMConstants.buildAVMStoreUrl(avmStore);
if (LOGGER.isDebugEnabled()) if (LOGGER.isDebugEnabled())
LOGGER.debug("Created file node for file: " + LOGGER.debug("Created file node for file: " + renditionAvmPath);
fullAvmPath);
final OutputStreamWriter out = new OutputStreamWriter(fileOut); final OutputStreamWriter out = new OutputStreamWriter(fileOut);
final HashMap<String, String> parameters = final HashMap<String, String> parameters =
getOutputMethodParameters(sandBoxUrl, fileName, generatedFileName, parentPath); this.getOutputMethodParameters(formInstanceDataFileName,
tom.generate(xml, parameters, out); renditionFileName,
parentPath);
re.generate(formInstanceData, parameters, out);
out.close(); out.close();
NodeRef outputNodeRef = AVMNodeConverter.ToNodeRef(-1, fullAvmPath); final NodeRef renditionNodeRef =
AVMNodeConverter.ToNodeRef(-1, parentPath + '/' + renditionFileName);
Map<QName, Serializable> props = new HashMap<QName, Serializable>(2, 1.0f); Map<QName, Serializable> props = new HashMap<QName, Serializable>(2, 1.0f);
props.put(WCMModel.PROP_PARENT_FORM, tt.getNodeRef()); props.put(WCMModel.PROP_PARENT_FORM, form.getNodeRef());
props.put(WCMModel.PROP_PARENT_FORM_NAME, tt.getName()); props.put(WCMModel.PROP_PARENT_FORM_NAME, form.getName());
nodeService.addAspect(outputNodeRef, WCMModel.ASPECT_FORM_INSTANCE_DATA, props); nodeService.addAspect(renditionNodeRef, WCMModel.ASPECT_FORM_INSTANCE_DATA, props);
props = new HashMap<QName, Serializable>(2, 1.0f); props = new HashMap<QName, Serializable>(2, 1.0f);
props.put(WCMModel.PROP_PARENT_RENDERING_ENGINE, tom.getNodeRef()); props.put(WCMModel.PROP_PARENT_RENDERING_ENGINE, re.getNodeRef());
props.put(WCMModel.PROP_PRIMARY_FORM_INSTANCE_DATA, props.put(WCMModel.PROP_PRIMARY_FORM_INSTANCE_DATA,
AVMNodeConverter.ToNodeRef(-1, parentPath + fileName)); AVMNodeConverter.ToNodeRef(-1, parentPath + formInstanceDataFileName));
nodeService.addAspect(outputNodeRef, WCMModel.ASPECT_RENDITION, props); nodeService.addAspect(renditionNodeRef, WCMModel.ASPECT_RENDITION, props);
props = new HashMap<QName, Serializable>(1, 1.0f); props = new HashMap<QName, Serializable>(1, 1.0f);
props.put(ContentModel.PROP_TITLE, fileName); props.put(ContentModel.PROP_TITLE, renditionFileName);
nodeService.addAspect(outputNodeRef, ContentModel.ASPECT_TITLED, props); nodeService.addAspect(renditionNodeRef, ContentModel.ASPECT_TITLED, props);
LOGGER.debug("generated " + generatedFileName + " using " + tom); LOGGER.debug("generated " + renditionFileName + " using " + re);
} }
} }
public void regenerate(final NodeRef nodeRef) /**
* Regenerates all renditions of the provided form instance data.
*
* @param formInstanceDataNodeRef the node ref containing the form instance data.
*/
public void regenerateRenditions(final NodeRef formInstanceDataNodeRef)
throws IOException, throws IOException,
SAXException, SAXException,
RenderingEngine.RenderingException RenderingEngine.RenderingException
{ {
final NodeRef formNodeRef = (NodeRef) final NodeRef formNodeRef = (NodeRef)
nodeService.getProperty(nodeRef, WCMModel.PROP_PARENT_FORM); nodeService.getProperty(formInstanceDataNodeRef, WCMModel.PROP_PARENT_FORM);
final Form tt = this.getForm(formNodeRef); final Form form = this.getForm(formNodeRef);
final ContentReader reader = contentService.getReader(nodeRef, ContentModel.PROP_CONTENT); final ContentReader reader = contentService.getReader(formInstanceDataNodeRef, ContentModel.PROP_CONTENT);
final Document xml = this.parseXML(reader.getContentInputStream()); final Document formInstanceData = this.parseXML(reader.getContentInputStream());
final String fileName = (String) final String formInstanceDataFileName = (String)
nodeService.getProperty(nodeRef, ContentModel.PROP_NAME); nodeService.getProperty(formInstanceDataNodeRef, ContentModel.PROP_NAME);
final String avmPath = AVMNodeConverter.ToAVMVersionPath(nodeRef).getSecond();
final String avmStore = avmPath.substring(0, avmPath.indexOf(":/")); // other parameter values passed to rendering engine
final String sandBoxUrl = AVMConstants.buildAVMStoreUrl(avmStore); final String formInstanceDataAvmPath = AVMNodeConverter.ToAVMVersionPath(formInstanceDataNodeRef).getSecond();
final String parentPath = AVMNodeConverter.SplitBase(avmPath)[0]; final String parentPath = AVMNodeConverter.SplitBase(formInstanceDataAvmPath)[0];
for (RenderingEngine tom : tt.getRenderingEngines())
for (RenderingEngine re : form.getRenderingEngines())
{ {
final String generatedFileName = stripExtension(fileName) + "." + tom.getFileExtension(); final String renditionFileName =
this.stripExtension(formInstanceDataFileName) + "." + re.getFileExtension();
if (LOGGER.isDebugEnabled()) if (LOGGER.isDebugEnabled())
LOGGER.debug("regenerating file node for : " + fileName + " (" + LOGGER.debug("regenerating file node for : " + formInstanceDataFileName +
nodeRef.toString() + ") to " + parentPath + "/" + generatedFileName); " (" + formInstanceDataNodeRef.toString() +
") to " + parentPath +
"/" + renditionFileName);
// get a writer for the content and put the file // get a writer for the content and put the file
OutputStream out = null; OutputStream out = null;
try try
{ {
out = this.avmService.getFileOutputStream(parentPath + "/" + generatedFileName); out = this.avmService.getFileOutputStream(parentPath + "/" + renditionFileName);
} }
catch (AVMNotFoundException e) catch (AVMNotFoundException e)
{ {
out = this.avmService.createFile(parentPath, generatedFileName); out = this.avmService.createFile(parentPath, renditionFileName);
} }
final OutputStreamWriter writer = new OutputStreamWriter(out); final OutputStreamWriter writer = new OutputStreamWriter(out);
final HashMap<String, String> parameters = final HashMap<String, String> parameters =
getOutputMethodParameters(sandBoxUrl, fileName, generatedFileName, parentPath); this.getOutputMethodParameters(formInstanceDataFileName,
tom.generate(xml, parameters, writer); renditionFileName,
parentPath);
re.generate(formInstanceData, parameters, writer);
writer.close(); writer.close();
LOGGER.debug("generated " + fileName + " using " + tom);
LOGGER.debug("generated " + renditionFileName + " using " + re);
} }
} }
private static HashMap<String, String> getOutputMethodParameters(final String sandBoxUrl, private static HashMap<String, String> getOutputMethodParameters(final String formInstanceDataFileName,
final String fileName, final String renditionFileName,
final String generatedFileName, final String parentAvmPath)
final String parentPath)
{ {
final HashMap<String, String> parameters = new HashMap<String, String>(); final HashMap<String, String> parameters = new HashMap<String, String>();
parameters.put("avm_store_url", sandBoxUrl); parameters.put("avm_sandbox_url", AVMConstants.buildAVMStoreUrl(parentAvmPath));
parameters.put("derived_from_file_name", fileName); parameters.put("form_instance_data_file_name", formInstanceDataFileName);
parameters.put("generated_file_name", generatedFileName); parameters.put("rendition_file_name", renditionFileName);
parameters.put("parent_path", parentPath); parameters.put("parent_path", parentAvmPath);
return parameters; return parameters;
} }
/** utility function for creating a document */ /** utility function for creating a document */
public Document newDocument() public Document newDocument()
{ {
try return this.getDocumentBuilder().newDocument();
{
final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setNamespaceAware(true);
dbf.setValidating(false);
final DocumentBuilder db = dbf.newDocumentBuilder();
return db.newDocument();
}
catch (ParserConfigurationException pce)
{
assert false : pce;
LOGGER.error(pce);
return null;
}
// catch (SAXException saxe)
// {
// LOGGER.error(saxe);
// }
// catch (IOException ioe)
// {
// LOGGER.error(ioe);
// }
} }
/** utility function for serializing a node */ /** utility function for serializing a node */

View File

@@ -1,14 +1,40 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!--
Copyright (C) 2005 Alfresco, Inc.
Licensed under the Mozilla Public License version 1.1
with a permitted attribution clause. You may obtain a
copy of the License at
http://www.alfresco.org/legal/license.txt
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific
language governing permissions and limitations under the
License.
Produces the index page for the press release page.
-->
<jsp:root version="1.2"
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<jsp:output doctype-root-element="html"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3c.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
<jsp:directive.page language="java" contentType="text/html; charset=UTF-8"/>
<jsp:directive.page isELIgnored="false"/>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <jsp:directive.include file="/assets/include_in_head.html"/>
<title>Alfresco - Open Source Enterprise Content Management (CMS) including Web Content Management</title> <title>Alfresco - Open Source Enterprise Content Management (CMS) including Web Content Management</title>
<meta name="description" lang="en" content="Alfresco offers open source enterprise content management including open source web content management software and document management software (Documentum, Jackrabbit, Sharepoint)" /> <meta name="description" lang="en" content="Alfresco offers open source enterprise content management including open source web content management software and document management software (Documentum, Jackrabbit, Sharepoint)" />
<meta name="keywords" lang="en" content="open source cms, web document, enterprise content management software system, documentum, jackrabbit, sharepoint" />
<meta name="GOOGLEBOT" content="index, follow" /> <meta name="GOOGLEBOT" content="index, follow" />
<meta name="robots" content="index, follow" /> <meta name="robots" content="index, follow" />
<meta name="author" content="" /> <meta name="author" content="" />
<link href="assets/css/screen.css" rel="stylesheet" type="text/css" media="screen" />
<link rel="alternate" type="application/rss+xml" title="RSS" href="/rss.php?feed=all" /> <link rel="alternate" type="application/rss+xml" title="RSS" href="/rss.php?feed=all" />
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script> </script>
@@ -142,49 +168,12 @@ urchinTracker();
</style> </style>
</head> </head>
<body> <body>
<script language="JavaScript" type="text/javascript" src="assets/js/controls.js"></script>
<script language="JavaScript" type="text/javascript" src="assets/js/search.js"></script>
<!-- Container --> <!-- Container -->
<div id="container"> <div id="container">
<div id="masthead"> <jsp:directive.include file="/assets/include_main_navigation.html"/>
<!-- Search -->
<div id="top_links">
<ul>
<li><a href="/login/?returnpath=/">Sign In</a> |</li>
<li><a href="/accessibility/index.html">Accessibility</a> |</li>
<li><a href="/sitemap/index.html">Site Map</a> |</li>
<li><a href="/about/contact/index.html">Contact Us</a> |</li>
<li><a href="/store/index.html">Store</a> |</li>
<li><a href="/rss/?feed=all">RSS</a> <img src="/assets/images/icons/feedicon10.gif" alt="RSS" title="RSS" width="10" height="10" /></li>
</ul>
<form action="http://www.google.com/search" method="get"><br />
<input type="hidden" name="sitesearch" value="www.alfresco.com" />
<input type="hidden" name="ie" value="UTF-8" />
<input type="hidden" name="oe" value="UTF-8" />
<input class="searchbox" type="text" size="20" value="Search..." name="query" onfocus="if (this.value == 'Search...') this.value = ''; " onblur="if (this.value == '') this.value = 'Search...';" />
<input class="searchbutton" type="submit" name="" value="Go" />
</form>
</div>
<!-- End Search -->
</div>
<div id="topnav">
<ul id="nav">
<li id="home"><a href="/index.jsp" accesskey="h" class="selected" ><span>Home</span></a></li>
<li id="products"><a href="/products/index.html" accesskey="p" ><span>Products</span></a></li>
<li id="services"><a href="/services/index.html" accesskey="s" ><span>Services</span></a></li>
<li id="customers"><a href="/customers/index.html" accesskey="c" ><span>Customers</span></a></li>
<li id="partners"><a href="/partners/index.html" accesskey="r" ><span>Partners</span></a></li>
<li id="about"><a href="/about/index.html" accesskey="a" ><span>About us</span></a></li>
<li id="developers"><a href="http://dev.alfresco.com/" accesskey="v" ><span>Developers</span></a></li>
<li id="blogs"><a href="http://blogs.alfresco.com/" accesskey="b" ><span>Blogs</span></a></li>
<li id="end"></li>
</ul>
</div>
<div id="outer"> <div id="outer">
<div id="inner"> <div id="inner">
<div id="shome"></div> <div id="shome">&#160;</div>
</div> </div>
</div> </div>
<div id="content"><img id="banner1" src="assets/images/banners/partner_podcast.gif" border="0" width="372" height="146" alt="Alfresco Partner Podcast" usemap="#bannermap1" /><img id="banner2" src="assets/images/banners/1_4_preview_banner.gif" border="0" width="373" height="146" alt="Alfresco 1.4 Community Preview now available" usemap="#bannermap2" /></div> <div id="content"><img id="banner1" src="assets/images/banners/partner_podcast.gif" border="0" width="372" height="146" alt="Alfresco Partner Podcast" usemap="#bannermap1" /><img id="banner2" src="assets/images/banners/1_4_preview_banner.gif" border="0" width="373" height="146" alt="Alfresco 1.4 Community Preview now available" usemap="#bannermap2" /></div>
@@ -238,9 +227,9 @@ urchinTracker();
</ul> </ul>
</div> </div>
</div> </div>
<div style="clear:both; padding-bottom: 0px;"></div> <div style="clear:both; padding-bottom: 0px;">&#160;</div>
</div> </div>
<div style="clear:both; padding-bottom: 20px;"></div> <div style="clear:both; padding-bottom: 20px;">&#160;</div>
<div class="front_column"> <div class="front_column">
<div class="front_list"> <div class="front_list">
<h2>Alfresco In the News</h2> <h2>Alfresco In the News</h2>
@@ -284,10 +273,8 @@ urchinTracker();
<div class="front_list" style="margin-right: 0;"> <div class="front_list" style="margin-right: 0;">
<h2>Links</h2> <h2>Links</h2>
<div> <div>&#160;</div>
</div> <div style="clear: both;">&#160;</div>
<div style="clear: both;">
</div>
<div class="front-links-bot-left"> <div class="front-links-bot-left">
<ul class="front-links-top"> <ul class="front-links-top">
<li><a href="http://forge.alfresco.com/" title="Alfresco Community Forge"><img src="http://dev.alfresco.com/community/newsletters/2006/05/forge.gif" alt="Alfresco Forge" align="top" /><br />Forge</a></li> <li><a href="http://forge.alfresco.com/" title="Alfresco Community Forge"><img src="http://dev.alfresco.com/community/newsletters/2006/05/forge.gif" alt="Alfresco Forge" align="top" /><br />Forge</a></li>
@@ -311,46 +298,13 @@ urchinTracker();
<li><a href="/about/careers/index.html" title="Alfresco Careers">Careers</a></li> <li><a href="/about/careers/index.html" title="Alfresco Careers">Careers</a></li>
</ul> </ul>
</div> </div>
<div style="clear: both;"></div></div> <div style="clear: both;">&#160;</div>
</div>
</div> </div>
<div style="clear:both; padding-bottom: 10px;"></div> <div style="clear:both; padding-bottom: 10px;">&#160;</div>
</div> <!-- end container --> </div> <!-- end container -->
<!-- Footer --> <jsp:directive.include file="/assets/footer.html"/>
<div id="footer">
<div id="site">
<div id="footer-logos">
<a href="http://www.mysql.com/"><img src="/assets/images/footer/mysql.gif" alt="MySQL" title="MySQL" border="0" /></a>
<a href="http://www.jboss.org"><img src="/assets/images/footer/jboss.gif" alt="JBoss Certified Partner" title="JBoss Certified Partner" border="0" width="74" height="34" /></a>
<a href="http://www.springframework.org/"><img src="/assets/images/footer/spring.gif" alt="Spring Framework" title="Spring Framework" border="0" width="67" height="34" /></a>
<a href="http://www.hibernate.org/"><img src="/assets/images/footer/hibernate.gif" alt="Hibernate" title="Hibernate" border="0" width="111" height="34" /></a>
<a href="http://tomcat.apache.org"><img src="/assets/images/footer/tomcat.gif" alt="Tomcat" title="Tomcat" border="0" width="44" height="34" /></a>
<a href="http://lucene.apache.org/"><img src="/assets/images/footer/lucene.gif" alt="Lucene" title="Lucene" border="0" width="143" height="34" /></a>
<a href="http://myfaces.apache.org/"><img src="/assets/images/footer/myfaces.gif" alt="My Faces" title="My Faces" border="0" width="37" height="34" /></a></div>
<div id="footer-links">
<p>
<a href="/index.jsp">Home</a> |
<a href="/legal/index.html">Legal</a> |
<a href="/privacy/index.html">Privacy</a> |
<a href="/accessibility/index.html">Accessibility</a> |
<a href="/sitemap/index.html">Site Map</a> |
<a href="/rss/?feed=all/">RSS</a>
<img src="/assets/images/icons/feedicon12.gif" alt="RSS" title="RSS" width="12" height="12" />
</p>
<p>
<a href="/about/index.html">Open Source ECMS</a> |
<a href="/products/">CMS Products</a> |
<a href="/services/support/index.html">Management Services</a> |
<a href="/resources/index.html">EMS Resources</a>
</p>
<p>&copy; 2005-2006 Alfresco Software, Inc., All Rights Reserved</p>
<p><img src="/assets/images/icons/powered_by_alfresco.gif" alt="Powered by Alfresco" width="88" height="32" /><img src="http://alfresco.sourceforge.net/image.php" alt="" width="1" height="1" /></p>
</div>
</div>
<div style="clear:both; padding-bottom: 10px;"></div>
</div>
<div style="clear:both; padding-bottom: 20px;"></div>
<!-- End Footer -->
<!-- START OF VERTICAL LEAP TRACKING --> <!-- START OF VERTICAL LEAP TRACKING -->
<script type="text/javascript" language="JavaScript"> <script type="text/javascript" language="JavaScript">
<!-- <!--
@@ -362,3 +316,4 @@ src="http://roi.vertical-leap.co.uk/scripts/tracker.js"></script>
<!-- END OF VERTICAL LEAP TRACKING --> <!-- END OF VERTICAL LEAP TRACKING -->
</body> </body>
</html> </html>
</jsp:root>

View File

@@ -78,7 +78,7 @@ Produces an html rendition of a press release
</xsl:if> </xsl:if>
<!-- END MAIN CONTENT --> <!-- END MAIN CONTENT -->
<xsl:element name="a"> <xsl:element name="a">
<xsl:attribute name="href"><xsl:value-of select="fn:replaceAll(string($alfresco:derived_from_file_name), '.xml', '.txt')"/></xsl:attribute> <xsl:attribute name="href"><xsl:value-of select="fn:replaceAll(string($alfresco:form_instance_data_file_name), '.xml', '.txt')"/></xsl:attribute>
<xsl:text>view plain text version</xsl:text> <xsl:text>view plain text version</xsl:text>
</xsl:element> </xsl:element>
</div> </div>

View File

@@ -21,10 +21,19 @@
</head> </head>
<body> <body>
<div>Generated by output-method-callout.ftl</div> <div>Generated by output-method-callout.ftl</div>
<div class="name"><#noparse>${alfresco.avm_sandbox_url}</#noparse></div>
<span>${alfresco.avm_sandbox_url}</span>
<div class="name"><#noparse>${alfresco.form_instance_data_file_name}</#noparse></div>
<span>${alfresco.form_instance_data_file_name}</span>
<div class="name"><#noparse>${alfresco.rendition_file_name}</#noparse></div>
<span>${alfresco.rendition_file_name}</span>
<div class="name"><#noparse>${alfresco.parent_path}</#noparse></div>
<span>${alfresco.parent_path}</span>
<div class="name">My value accessed using <#noparse>${simple.string}</#noparse>:</div> <div class="name">My value accessed using <#noparse>${simple.string}</#noparse>:</div>
<span>${simple.string}</span> <span>${simple.string}</span>
<div class="name">My value accessed using <#noparse>$alfresco.getXMLDocument(${alfresco.derived_from_file_name})</#noparse>:</div> <div class="name">My value accessed using <#noparse>$alfresco.getXMLDocument(${alfresco.form_instance_data_file_name})</#noparse>:</div>
<span>${alfresco.getXMLDocument(alfresco.derived_from_file_name).simple.string}</span> <span>${alfresco.getXMLDocument(alfresco.form_instance_data_file_name).simple.string}</span>
<div class="name">Values from xml files generated by in ${alfresco.parent_path}:</div> <div class="name">Values from xml files generated by in ${alfresco.parent_path}:</div>
<ul> <ul>
<#list alfresco.getXMLDocuments('output-method-callout') as d> <#list alfresco.getXMLDocuments('output-method-callout') as d>

View File

@@ -32,10 +32,27 @@ body
</head> </head>
<body> <body>
<div>Generated by output-method-callout.xsl</div> <div>Generated by output-method-callout.xsl</div>
<div class="name">
&lt;xsl:value-of select="$alfresco:avm_sandbox_url"/&gt;
</div>
<span><xsl:value-of select="$alfresco:avm_sandbox_url"/></span>
<div class="name">
&lt;xsl:value-of select="$alfresco:form_instance_data_file_name"/&gt;
</div>
<span><xsl:value-of select="$alfresco:form_instance_data_file_name"/></span>
<div class="name">
&lt;xsl:value-of select="$alfresco:rendition_file_name"/&gt;
</div>
<span><xsl:value-of select="$alfresco:rendition_file_name"/></span>
<div class="name">
&lt;xsl:value-of select="$alfresco:parent_path"/&gt;
</div>
<span><xsl:value-of select="$alfresco:parent_path"/></span>
<div class="name">My value accessed using /simple/string:</div> <div class="name">My value accessed using /simple/string:</div>
<span><xsl:value-of select="/simple/string"/></span> <span><xsl:value-of select="/simple/string"/></span>
<div class="name">My value accessed using alfresco:getXMLDocument(<xsl:value-of select="$alfresco:derived_from_file_name"/>):</div> <div class="name">My value accessed using alfresco:getXMLDocument($alfresco:form_instance_data_file_name):</div>
<span><xsl:value-of select="alfresco:getXMLDocument($alfresco:derived_from_file_name)/simple/string"/></span> <span><xsl:value-of select="alfresco:getXMLDocument($alfresco:form_instance_data_file_name)/simple/string"/></span>
<div class="name">Values from xml files generated by in <xsl:value-of select="$alfresco:parent_path"/>:</div> <div class="name">Values from xml files generated by in <xsl:value-of select="$alfresco:parent_path"/>:</div>
<ul> <ul>
<xsl:for-each select="alfresco:getXMLDocuments('output-method-callout')/simple"> <xsl:for-each select="alfresco:getXMLDocuments('output-method-callout')/simple">

View File

@@ -95,6 +95,7 @@ if (upload == null || upload.getFile() == null)
} }
%> %>
</h:column> </h:column>
<h:graphicImage id="graphic_image_root_tag_name" <h:graphicImage id="graphic_image_root_tag_name"
value="/images/icons/required_field.gif" alt="Required Field" /> value="/images/icons/required_field.gif" alt="Required Field" />
<h:outputText id="output_text_root_tag_name" value="#{msg.schema_root_tag_name}:"/> <h:outputText id="output_text_root_tag_name" value="#{msg.schema_root_tag_name}:"/>
@@ -103,7 +104,13 @@ if (upload == null || upload.getFile() == null)
<f:selectItems value="#{WizardManager.bean.schemaRootTagNameChoices}"/> <f:selectItems value="#{WizardManager.bean.schemaRootTagNameChoices}"/>
</h:selectOneMenu> </h:selectOneMenu>
<h:graphicImage id="graphic_image_name" value="/images/icons/required_field.gif" alt="Required Field" /> <h:graphicImage id="graphic_image_name" value="/images/icons/required_field.gif" alt="Required Field" />
<h:outputText id="output_text_name" value="#{msg.name}:"/> <h:outputText id="output_text_name" value="#{msg.name}:"/>
<h:inputText id="file-name" value="#{WizardManager.bean.formName}" <h:inputText id="file-name" value="#{WizardManager.bean.formName}"
maxlength="1024" size="35"/> maxlength="1024" size="35"/>
<h:outputText id="no_graphic_image_description" value=""/>
<h:outputText id="output_text_description" value="#{msg.description}:"/>
<h:inputText id="description" value="#{WizardManager.bean.formDescription}"
maxlength="1024" size="35"/>
</h:panelGrid> </h:panelGrid>