mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
- sample implementation of a callout in the alfresco sample website; using a jsp to produce an included xsd that lists all available company_footer.xmls - moving stuff around. XFormsbean is now in the xforms package rather than ajax package - more relevant to that codebase. - consolidating SchemaFormBuilder into one class since the inheritance hierarchy made very little sense. - refactored some of the sample website to reduce java code in the jsps and begining to think about a generic utility library for callouts and jsps that want to access templating generated data. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3957 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
62 lines
2.0 KiB
Plaintext
62 lines
2.0 KiB
Plaintext
<%--
|
|
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.
|
|
--%>
|
|
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
|
|
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
|
|
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
|
|
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
|
|
<%@ page import="org.alfresco.web.bean.wcm.AVMConstants" %>
|
|
<%@ page import="org.alfresco.web.app.Application" %>
|
|
<%@ page import="org.alfresco.web.templating.*" %>
|
|
<%@ page import="org.alfresco.web.bean.wcm.CreateWebContentWizard" %>
|
|
<%@ page import="org.w3c.dom.Document" %>
|
|
|
|
<%
|
|
final CreateWebContentWizard wiz = (CreateWebContentWizard)
|
|
Application.getWizardManager().getBean();
|
|
TemplateType tt = wiz.getTemplateType();
|
|
TemplateInputMethod tim = tt.getInputMethods().get(0);
|
|
final TemplatingService ts = TemplatingService.getInstance();
|
|
final InstanceData instanceData = new InstanceData()
|
|
{
|
|
public Document getContent()
|
|
{
|
|
try
|
|
{
|
|
return (wiz.getContent() != null ? ts.parseXML(wiz.getContent()) : null);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
e.printStackTrace();
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public void setContent(final Document d)
|
|
{
|
|
wiz.setContent(ts.writeXMLToString(d));
|
|
}
|
|
};
|
|
tim.generate(instanceData, tt, out);
|
|
%>
|
|
<script type="text/javascript">
|
|
dojo.addOnLoad(function()
|
|
{
|
|
addSubmitHandlerToButton(document.getElementById("wizard:next-button"));
|
|
addSubmitHandlerToButton(document.getElementById("wizard:finish-button"));
|
|
});
|
|
</script>
|