|
|
Index
| Recent Threads
| Who's Online
| User List
| Register
| Search
| Help
| |
![]() |
OpenCms Forum » List all forums » Forum: Questions about Template Development » Thread: Structured content: Why does this content require double JSP programming? |
|
Thread Status: Normal Total posts in this thread: 2 |
[Add To My Favorites] [Watch this Thread] |
| Author |
|
|
Stranger
|
Hi everyone I've been testing OpenCMS for a couple of months and I have a general idea about its funtionality. I've downloaded Alkacon OpenCms Add-On Module Package (OAMP) (a set of very handy structured content features) a few days ago and it seemed easy to use at first sight, using the WYSIWYG editor for this kind of content. But after some tests, I've found what I consider a big weakness about those ones and the XML content in general: You cannot use an already created structured content item directly without recode it inside a template or any JSP page. I mean: In order to show this content, It should be enough to use one of the <%@include %>or <jsp:include />JSP directives; or just something like this line of code: <cms:contentload collector="%(property.collector)" param="%(property.xmlcontent-demo)webform_%(number).html|alkacon-webform" editable="true" /> with the option of "linking" a css file with the structured content item using a property (example: "template-elements" property is used to attach the template that renders the content) Instead, the content has to be hardcoded inside another JSP page. See my point? Why do I implement a module if I have to recode its content in another one? So, My question is: Does someone know an easier way to "embed" a structured content item inside a JSP page? Thanks in advance. |
||
|
|
Newbie
|
The "easiest" way of embedding data on the page is simple html:) If seriously, MVC pattern is very effective for splitting levels: presentation (user front end), business logic and data. In facts, in the wide sense, modules describe model data. View is html or xml page. Controller is jsp page which generates front end page. And Model is actual content in database or xml. It is very flexible approach. We can use one module many times on different systems for different views. You may read, for example: http://en.wikipedia.org/wiki/Model-view-controller http://java.sun.com/blueprints/patterns/MVC.html |
||
|
| [Show Printable Version of Thread] |