[opencms-dev] opencms-dev Digest, Vol 285, Issue 2

Kareem Jabr KareemJ at git.ae
Tue Mar 23 14:12:12 CET 2010


Hi,

Thanks for the prompt reply, I have found the jsp page for listbox under
/system/modules/org.opencms.frontend.templatetwo/elements/boxes/
I tried to edit the cms:contenload-tag to the following:
<%-- Entries of the list box --%>
<cms:contentload collector="${listbox.value['Collector']}"
param="${cms.parameter}|20" pageSize="2" pageIndex="%(param.pageIndex)"
pageNavLength="5" preload="true" >
			<cms:contentinfo var="info" />		
.
.
.(original code here)
.
.
</cms:contentload>

I added the following to the above tag: pageSize="2"
pageIndex="%(param.pageIndex)" pageNavLength="5"
After that I added the following code:
<c:if test="${info.pageIndex>1}">
		
		      <a href="<cms:link><cms:info
property="opencms.request.uri"
		/><c:out
value="?page=${info.pageIndex-1}"/></cms:link>">back</a> 
		
		</c:if>
		
		<c:forEach var="i" begin="${info.pageNavStartIndex}"
end="${info.pageNavEndIndex}">
		
		  <c:choose>
		
		      <c:when test="${info.pageIndex==i}">
		
		                  <b><c:out value="${i}"/></b>
		
		      </c:when>
		
		      <c:otherwise>
		
		                  <a href="<cms:link><cms:info
		property="opencms.request.uri" /><c:out
		value="?page=${i}"/></cms:link>"><c:out value="${i}"/></a> 
		
		      </c:otherwise>    
		
		  </c:choose>
		
		</c:forEach>
		
		<c:if test="${info.pageIndex < info.pageCount}">
		
		      <a href="<cms:link><cms:info
property="opencms.request.uri"
		/><c:out
value="?page=${info.pageIndex+1}"/></cms:link>">next</a> 
		
		</c:if>

My problem here is begin="${info.pageNavStartIndex}"
end="${info.pageNavEndIndex} the condition in the <foreach>
pageNavStartIndex is "1" and pageNavEndIndex is "1" it is not changing.

Please someone help me in this issue!!??

Thanks,
Kareem


-----Original Message-----
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of
opencms-dev-request at opencms.org
Sent: Tuesday, March 23, 2010 1:00 PM
To: opencms-dev at opencms.org
Subject: opencms-dev Digest, Vol 285, Issue 2

Send opencms-dev mailing list submissions to
	opencms-dev at opencms.org

To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.opencms.org/mailman/listinfo/opencms-dev
or, via email, send a message with subject or body 'help' to
	opencms-dev-request at opencms.org

You can reach the person managing the list at
	opencms-dev-owner at opencms.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of opencms-dev digest..."


Today's Topics:

   1. Re: Size of a valueList (Thomas Decher)
   2. pagination question (Kareem Jabr)
   3. Re: pagination question (Thomas Decher)


----------------------------------------------------------------------

Message: 1
Date: Mon, 22 Mar 2010 12:25:45 +0100
From: Thomas Decher <thomas.decher at tomdigital.de>
Subject: Re: [opencms-dev] Size of a valueList
To: The OpenCms mailing list <opencms-dev at opencms.org>
Message-ID: <4BA753B9.6000402 at tomdigital.de>
Content-Type: text/plain; charset=UTF-8

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Petr,

I think ${fn:length(content.valueList['multipleItem']) > 0} will help.
You'll
have to include the taglib:
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

HTH
regards Thommy

Petr Chel?ick? schrieb:
> Hi!
> 
> I started to use the expression language and am wondering how to get the
size of a returned valueList without looping through all its values? Is this
possible with only the expression language? 
> 
> Peter
> 
> _______________________________________________
> 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
> http://lists.opencms.org/mailman/listinfo/opencms-dev

- --

TOM Digital GmbH
Thomas Decher
Hammerbrookstrasse 93
20097 Hamburg, Germany

Fax: +49.40.254048-40

E-Mail: td at tomdigital.de
___________________________________________________________________________

TOM Digital GmbH

Gesch?ftsf?hrer / Managing Director: Thomas Heisterhagen
Eingetragen beim / registered at: Amtsgericht Hamburg HRB 110797

Diese E-Mail einschliesslich ihrer Anlagen ist vertraulich und nur fuer
den Adressaten bestimmt. Wenn Sie nicht der vorgesehene Empfaenger sind,
bitten wir Sie, dieses E-Mail mit Anlagen unverzueglich vollstaendig zu
loeschen und uns umgehend zu benachrichtigen.

Dieses Problem lie?e sich mit Verschl?sselung sehr leicht umgehen. F?r diese
E-Mail-Adresse ist ein PGP-Schl?ssel, die ID lautet 0xBDCC86D6, auf den
g?ngigen
Schl?sselservern verf?gbar.

This e-mail and its attachments are strictly confidential and are
intended solely for the attention of the person to which it is
addressed. If you are not the intended recipient of this e-mail, please
delete it including its attachments immediately and inform us
accordingly.

This problem can be dealt with simply by encryption. A PGP-key, the id is
0xBDCC86D6, for this email-account is available on the established key
servers.
___________________________________________________________________________
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkunU7kACgkQJ51ior3Mhtb/rACglyVsfQoYpz0s6a/CCQymSpMZ
R5sAn2jxfO+vBuI3cLyCYlOYTWoajUAu
=bMpC
-----END PGP SIGNATURE-----


------------------------------

Message: 2
Date: Mon, 22 Mar 2010 14:55:19 +0200
From: "Kareem Jabr" <KareemJ at git.ae>
Subject: [opencms-dev] pagination question
To: <opencms-dev at opencms.org>
Message-ID: <002c01cac9be$f00aa880$d01ff980$@ae>
Content-Type: text/plain; charset="us-ascii"

Hi,

 

I would like to add pagination feature to a listbox (or whatever template)
which has a set of news headlines like the following:

 

News

.         News 1

.         News2

More>>

If I click more it opens the whole set of news headlines in a new page, or
it expands in the same page either way is fine for me.

I wish there is a ready made template in opencms to support my requirement.

 

Thanks,

Kareem 

-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.opencms.org/pipermail/opencms-dev/attachments/20100322/696d52ee
/attachment.html 

------------------------------

Message: 3
Date: Mon, 22 Mar 2010 16:19:59 +0100
From: Thomas Decher <thomas.decher at tomdigital.de>
Subject: Re: [opencms-dev] pagination question
To: The OpenCms mailing list <opencms-dev at opencms.org>
Message-ID: <4BA78A9F.7030208 at tomdigital.de>
Content-Type: text/plain; charset=ISO-8859-1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Kareem,

just habe a look at the module org.opencms.frontend.templateone.modules.
In the elements folder are several .jsp-files which uses the paging
attributes
of the cms:contentload-Tag and get the parameters for the paging-Navi from
the
cms:conentinfo-Tag.

Regards
Thommy


Kareem Jabr schrieb:
> Hi,
> 
>  
> 
> I would like to add pagination feature to a listbox (or whatever
> template) which has a set of news headlines like the following:
> 
>  
> 
> News
> 
> ?         News 1
> 
> ?         News2
> 
> More>>
> 
> If I click more it opens the whole set of news headlines in a new page,
> or it expands in the same page either way is fine for me.
> 
> I wish there is a ready made template in opencms to support my
requirement.
> 
>  
> 
> Thanks,
> 
> Kareem
> 
> 
> 
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 4964 (20100322) __________
> 
> The message was checked by ESET NOD32 Antivirus.
> 
> http://www.eset.com
> 
> 
> ------------------------------------------------------------------------
> 
> 
> _______________________________________________
> 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
> http://lists.opencms.org/mailman/listinfo/opencms-dev

- --

TOM Digital GmbH
Thomas Decher
Hammerbrookstrasse 93
20097 Hamburg, Germany

Fax: +49.40.254048-40

E-Mail: td at tomdigital.de
___________________________________________________________________________

TOM Digital GmbH

Gesch?ftsf?hrer / Managing Director: Thomas Heisterhagen
Eingetragen beim / registered at: Amtsgericht Hamburg HRB 110797

Diese E-Mail einschliesslich ihrer Anlagen ist vertraulich und nur fuer
den Adressaten bestimmt. Wenn Sie nicht der vorgesehene Empfaenger sind,
bitten wir Sie, dieses E-Mail mit Anlagen unverzueglich vollstaendig zu
loeschen und uns umgehend zu benachrichtigen.

Dieses Problem lie?e sich mit Verschl?sselung sehr leicht umgehen. F?r diese
E-Mail-Adresse ist ein PGP-Schl?ssel, die ID lautet 0xBDCC86D6, auf den
g?ngigen
Schl?sselservern verf?gbar.

This e-mail and its attachments are strictly confidential and are
intended solely for the attention of the person to which it is
addressed. If you are not the intended recipient of this e-mail, please
delete it including its attachments immediately and inform us
accordingly.

This problem can be dealt with simply by encryption. A PGP-key, the id is
0xBDCC86D6, for this email-account is available on the established key
servers.
___________________________________________________________________________
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkunip8ACgkQJ51ior3MhtY+eACfUqYcYA5PB1JLHtpOWEH4X5Bh
kMQAn2NTaeGUAPkAYeBFTuKq8OcCQsUN
=SZS8
-----END PGP SIGNATURE-----


------------------------------

_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms.org/mailman/listinfo/opencms-dev

End of opencms-dev Digest, Vol 285, Issue 2
*******************************************

__________ Information from ESET NOD32 Antivirus, version of virus signature
database 4966 (20100322) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


 

__________ Information from ESET NOD32 Antivirus, version of virus signature
database 4967 (20100323) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 




More information about the opencms-dev mailing list