A custom taglib is a possibility. The custom taglib calls the business logic in the doEndTag() method and sets all the request or page attributes before returning. Then the jsp can just display the results. Something like ....

<jsp:root ... taglib declarations, etc, ...>
<mycms:myAction ...stuff to pass in from the paragraph .../>
<h1><cms:out nodeData="title"/></h1>
<p>The results are <c:out value="${myResult}" /></p>
</jsp:root>

This is all self-contained within the paragraph template so the business logic is only called for as necessary.

--David

Lara Pinato wrote:
Hi Hussain,
Probably my question was not clear.
I need  to do something like this:
Call a Servlet that does all business logic and set in request all
properties before rendering the result in a jsp linked to paragraph.
Is it possible?

Thanks Lara
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 06, 2007 5:20 PM
To: [email protected]
Subject: Re: [magnolia-user] Question:Is it possible to invoke a custom
class to populate information showed in a custom paragraph instead of
include all java code in a jsp ?

Hi Lara,

Yes, You can do it by putting your class file in the web-inf folder.
E.g. In case of author instance you should put your package(including
class file) in the \%magnolia-Author-Root-folder%\WEB-INF. Then use the
<jsp:useBean id=".." scope="..." class="package_name.class_name"> tag in
the jsp file. Hope it will work.

Thankyou.


-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]
Sent: 06 March 2007 15:20
To: [email protected]
Subject: [magnolia-user] Question:Is it possible to invoke a custom
class to populate information showed in a custom paragraph instead of
include all java code in a jsp ?

Hi,
I need to integrate a forum in magnolia 3.0 CE.
I saw that there was a mangnolia-forum-module developed for 2.1.5
version, but it is a starting point and with 3.0 release doesn't
compile.
So I'll  try to integrate mvnforum.
Mvnforum's information are stored in a repository there are not part of
magnolia.
I'd like to know if it's possible to show information in a paragraphs
retrieved using class of mvnforum less include them directly in a jsp.

Lara
Any suggestion will be very appreciate.


----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/developer.html
----------------------------------------------------------------

Reply via email to