Hello,

You can create a ConrainerBen and then set it to the pageContext:

ContainerBean newsContainerBean =
    new ContainerBean(newsContainer, jParams);
pageContext.setAttribute("newsContainerBean",newsContainerBean);

Then you an use tags like jahiaHtml

<jahiaHtml:actionMenu name="newsContainerBean" namePostFix=""
    resourceBundle="jahiatemplates.Corporate_portal_templates">
</jahiaHtml:actionMenu>

If you want to display fields, you can't use the content tags, but you need to use struts tags with something like this:

<bean:write name="newsContainerBean" property="field(title).value"/>

Cheers,

Philippe

At 21.06.2005 10:48, you wrote:
Hello,
we would like to get a single container from a containerList using his ID and print the content using common jahia tags.
From People demo template we got this code:

String cnid = request.getParameter("cnid");
ContentContainer newsContentContainer = ContentContainer.getContainer(Integer.parseInt(cnid));
if (newsContentContainer != null) {
JahiaContainer newsContainer = newsContentContainer.getJahiaContainer(jParams, jParams.getEntryLoadRequest());
  if (newsContainer != null) {
String title = newsContainer.getFieldValue("title","", true , jData.params()); String shortContent = newsContainer.getFieldValue("shortContent","", true , jData.params()); String mainContent = newsContainer.getFieldValue("mainContent","");
  }
}

but from JahiaContainer object how can we start using tags like
<content:container id="newsContainer">
<content:textField name="title" defaultValue="" diffActive="true" />
</content:container>

which are more readable end easy to use ?

Thank You Lorenzo

--
Lorenzo Patocchi
Dipl. Ing. STS/ETS/HTL
lorenzo.patocchi at cryms.com - www.cryms.com
Tel: +41 91 60 55266
Cel: +41 79 375 0891
Fax: +41 91 223 9797

Cryms sagl
Via Cantonale 34a
6928 Manno - Lugano
Switzerland




-------=[ pvollenweider at jahia dot com ]=---------
Jahia : A collaborative source CMS and Portal Server
www.jahia.org Community and product web site
www.jahia.com Commercial services company

Reply via email to