<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Mario,<br>
<br>
Thank you for your response. Ultimately I got things working -
though not exactly as I would have liked. I wanted the calling page
(for simplicity let's just make it a jsp) to issue a cms:include
for the structured xml content item. Somehow, I wanted that xml
content item to render using it's template-elements jsp. This I
could not get working, so (with some help) the calling page -
instead - issues a call to a jsp fragment (in my module's elements/
directory). Within the cms:include I am using a parameter to
reference the structured xml content file.<br>
<br>
In my specific case the structured xml content is not intended to
live by itself as a page. It will always only be a fragment of
content that lives in the context of other pages. So the
template-elements jsp is essentially the same jsp that I ended up
putting in my module's /elements directory.<br>
<br>
Basically, it's the reverse of what I was expecting... Normally, an
http request would come in for the xml content (assuming it's
designed to be accessed by itself as a page), and it finds the
template-elements property and uses that as a "wrapper" for it's
content. Now, I instead call the file that would normally serve as
the template-elements property and attach a parameter so that it can
find the content document.<br>
<br>
In the end I am content that it's working at all :) But if there is
another way to do it (perhaps this way is not a "standard") I would
be curious to know. The one flaw in what I've got working is that
one must be aware of both the content to include and the elements
object that serves as it's wrapper. It would be better if I could
just include the content and it automatically grabs the associated
template-elements as the wrapper. I hope I'm making sense :)<br>
<br>
In the example I provided I should probably have re-named
slide-test-1.jsp instead to slide-test-1.xml to make clear that this
was the structured xml document.<br>
<br>
Thanks,<br>
eelboy<br>
<br>
On 12/16/2010 8:05 AM, Mario Jäger wrote:
<blockquote cite="mid:4D0A0E80.5070506@alkacon.com" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<pre>Hi,
I advice the chapter "How to use the OpenCms JSP Taglib" in the Alkacon Documentation to better understand the OpenCms JSP Taglib. If you still have not installed the Alkacon Documentation in your OpenCms, you can download that documentation here: <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.opencms.org/en/download/documentation.html">http://www.opencms.org/en/download/documentation.html</a>
I do not know if you have understood the OpenCms basics, because I do not know what you want to reach with your own module and I do not know the content of the jsp files in your module.
But, general it is possible to include a jsp file which renders xml content in another jsp.
How did you implement in your "slide-test-1.jsp" which xml content is to render?
</pre>
<pre class="moz-signature" cols="72">--
Kind Regards,
Mario.
-------------------
Mario Jäger
Alkacon Software GmbH - The OpenCms Experts
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.alkacon.com">http://www.alkacon.com</a> - <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.opencms.org">http://www.opencms.org</a></pre>
Am 28.11.2010 16:49, schrieb <a moz-do-not-send="true"
class="moz-txt-link-abbreviated" href="mailto:eelboy@aol.com:">eelboy@aol.com:</a>
<blockquote
cite="mid:8CD5D2B0448CEE2-534-32C02@webmail-d064.sysops.aol.com"
type="cite"><font size="2" color="black" face="arial"><font
size="2" color="black" face="arial">
<div style="font-family: arial,helvetica; font-size: 10pt;
color: black;">
<div
id="AOLMsgPart_0_04cc4a8a-8bdb-407c-8536-a56d9ae93440"
style="margin: 0px; font-family:
Tahoma,Verdana,Arial,Sans-Serif; font-size: 12px; color:
rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
Hi, <br>
<br>
I keep getting a Null Exception Pointer (at
org.opencms.xml.CmsXmlUtils.createXpath(CmsXmlUtils.java:145)
when trying to include a structured content type into a
jsp. Here is my VFS layout: <br>
<br>
/sites/mysite/index.jsp (<-- has cms:include
file=/_include/_hpSlides/slide-test-1.jsp) <br>
/sites/mysite/_include/_hpSlides/slide-test-1.jsp
(<-- Type is hp-slide-default) <br>
/system/modules/com.mysite/schemas/hp-slide-default.xsd <br>
/system/modules/com.mysite/templates/HP-Slide-Default.jsp
(<-- this is the value for property template-elements
on _include_ folder) <br>
<br>
So basically, if I navigate in the workplace directly to
/sites/mysite/_include/_hpSlides/slide-test-1.jsp I see
my content render just as I want it: with the template
controlling all the surrounding markup, and the
structured content elements being pulled in via the
cms:include tags (referencing the specific elements)
within the template. <br>
<br>
Now I would like to include that same rendered markup
inside of another jsp page. In this case, I want my
index.jsp to simply include the slide-test-1.jsp so that
the exact same markup I saw when I previewed the
slide-test-1.jsp simply appears inside the index.jsp
where the cms:include is. Instead I get the always
dreaded NullExceptionPointer.... I feel like I am just
not understanding something very basic about how OpenCms
works (I am a complete newbie of course!) I am using
version 7.5.3. I hope I've provided enough information
if not let me know and I can provide plenty more :) <br>
<br>
I should point out that I can of course use a
cms:include from within index.jsp and then pull in
specific elements (exactly the same way as the template
code does) but this defeats the purpose (for me anyways)
as I would like to abstract the entire block of that
section in the index page so that perhaps some other day
a different cms:include will pull in a completely
different block of markup from a different structured
content type. Does this make sense? <br>
<br>
Thanks, <br>
eelboy <br>
<br>
</div>
<!-- end of AOLMsgPart_0_04cc4a8a-8bdb-407c-8536-a56d9ae93440 -->
</div>
</font></font>
<pre wrap=""><fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.opencms.org/mailman/listinfo/opencms-dev">http://lists.opencms.org/mailman/listinfo/opencms-dev</a></pre>
</blockquote>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
<a class="moz-txt-link-freetext" href="http://lists.opencms.org/mailman/listinfo/opencms-dev">http://lists.opencms.org/mailman/listinfo/opencms-dev</a>
</pre>
</blockquote>
</body>
</html>