Re: container list and fields

Philippe Vollenweider <[email protected]>
Newsgroups gmane.comp.cms.jahia.template
Message-ID <[email protected]>
Hello,

At 26.07.2004 09:30, you wrote:
>hi,
>
>I have a few questions concerning container lists and entry frields with 
>the use of jahia tags.
>
>1) window size
>is it possible to have a container list with window size 10 in one jsp and 
>reuse the container in anothr template with another window size?
>I would like to have a list with window size 10 in WEB and view the same 
>list in WAP with window size 1. can this be done with tags only?`

You can set the windows site and offset by setting a parameter in the 
jParams. The name of the parameter is "ctnscroll_" + container list name. 
For example:

String ctnscroll_newsContainer = "10_0";
if (/*test here if you user agent is wap*/) {
         ctnscroll_newsContainer = "1_0";
}
jParams.setParameter("ctnscroll_newsContainer",ctnscroll_newsContainer);
JahiaContainerList newsContainerList = jData.containers().getContainerList( 
"newsContainer" );
newsEnumeration = newsContainerList.getContainers();
while (newsEnumeration.hasMoreElements()) {
     // ...
}


>2) field lengths
>can the maximum length of entry fields be restricted? I am aware of the 
>parameter "maxchar" in entry field tags but this only restricts the output 
>like "Test output ..." (maxchar="15") but I can still enter a longer text 
>in the pop-up.

There is a javascript issue. Please reffer to this thread 
http://list.jahia.org/dev_list/msg01352.html
This is a similar question.


>3) auto-publish
>is it possible to automatically publish a site if I have the necessary 
>rights? let's say I am working on a list with event dates and I want to 
>keep the workflow as simple as possible. can I somwhow get Jahia to 
>publish the site autmatically when I enter a new container into the list?

Yes it's possible, using the formContentMapperHandler tag. You will find 
examples:
http://cvspub.jahia.org/cgi-bin/cvsweb.cgi/~checkout~/jahia/src/views/jsp/test/Attic/addContainerWithForm.jsp?rev=1.2;content-type=text%2Fplain
or here 
http://cvspub.jahia.org/cgi-bin/cvsweb.cgi/~checkout~/basic_templates/src/jsp/blog_dayview.inc?rev=1.8;content-type=text%2Fplain

Cheers,

Philippe


>thanks for your help,
>
>Aaron
>
>_________________________________________________________________
>Behalten Sie Ihre Hotmails, den Messenger und die Suchfunktionen stets im 
>Auge! http://toolbar.msn.at?DI=43&XAPID=2170

-------=[ 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.