[opencms-dev] (no subject)

Quast, Torben Quast at makdata.de
Fri Mar 26 10:36:01 CET 2004


Hello everybody!
I've got a problem with opencms. I would like to combine an jsp template and a xml template and fill the xml template with my own content. So i followed the Alkacon documentation and used 3 files. They look like this:

file index (type plain)
<?xml version="1.0" encoding="ISO-8859-1"?>
<xmltemplate>
   <template>
       <![CDATA[ This ist the content ]]><process>content</process>
   </template>
</xmltemplate>

file index.html (type xmltemplate)
<?xml version="1.0" encoding="ISO-8859-1"?>
<PAGE>
    <class>makdata.opencms.projektliste.ProjektlisteBackOffice</class>
    <masterTemplate>/www/de/projektliste/bsp/jsptemplate</masterTemplate>
    <ELEMENTDEF name="body">
        <TEMPLATE>/www/de/projektliste/bsp/index</TEMPLATE>
        <CLASS>makdata.opencms.projektliste.ProjektlisteBackOffice</CLASS>
    </ELEMENTDEF>
</PAGE>

file jsptemplate (type plain)
<?xml version="1.0" encoding="ISO-8859-1"?>
<xmltemplate>
   <template>
      <element name="jsptemplate"/>
   </template>
   <elementdef name="jsptemplate">
       <class>com.opencms.flex.CmsJspTemplate</class>   
       <template>/system/modules/org.opencms.default/jsptemplates/mak_events.jsp</template>
   </elementdef>
</xmltemplate>

the souce of the class:
public class ProjektlisteBackOffice extends CmsXmlTemplate
{
   public byte[] getContent(CmsObject cms, String templateFile, String elementName, Hashtable parameters, String templateSelector) 
                            throws CmsException
   {
      CmsXmlTemplateFile template = getOwnTemplateFile(cms, templateFile, elementName, parameters, templateSelector);
      String content = "Java content";
      template.setData("content", content);	
      return startProcessing(cms, template, elementName, parameters, templateFile); 
}
	
but this doesn't work. The jsptemplat is generated correctly and the written content of the index file is also correct, but it says:
? UNKNOWN DATABLOCK content 
It seems that it doesn't use my own class, but i don't know why. Can anybody help me??

Best reguards

Torben Quast



Torben Quast
MaK Data System GmbH 
Falklandstraße 1 - 3
24159 Kiel
Telefon: +49(0)431-3993-500
FAX: +49(0)431-3993-998
email: quast at makdata.de

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20040326/77dcd4f2/attachment.htm>


More information about the opencms-dev mailing list