[dotcms]paginate db result

23 views
Skip to first unread message

Dario Granato

unread,
Jun 15, 2012, 10:14:27 AM6/15/12
to dot...@googlegroups.com
hi,
it's possible to use some macro to paginate db result

i have find only this macro:

#pageContent('query' 'sort by' '# per page' '# current page')

where accept a lucene query but not sql query

any suggestion?

Jason Tesser

unread,
Jun 15, 2012, 10:29:52 AM6/15/12
to dot...@googlegroups.com
just FYI that macro should not be used. The ContentTool is the replacement.
$contentTool.pullPagenated(String query, int limit, int offset, String sort){

That is for content.

Ther is a sql macro which can get you results and handles some
pagination. Look up the macro named getSQLResults. It has 2 options
which can be set before calling it dbStartRow and dbMaxRow


Thanks,
Jason S. Tesser
Director, Support Services
dotCMS, Inc.
T: 305.858.1422 x7003
http://twitter.com/dotCMS
www.dotcms.com
> --
> You received this message because you are subscribed to the Google Groups
> "dotCMS User Group" group.
> To post to this group, send email to dot...@googlegroups.com.
> To unsubscribe from this group, send email to
> dotcms+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/dotcms?hl=en.

Maria Ahues Bouza

unread,
Jun 15, 2012, 11:53:44 AM6/15/12
to dot...@googlegroups.com
Dario,

Like JT mentioned you should use this macro if you want to run a query
http://dotcms.com/docs/2.0/ExecutingAnSQLQuery

This macro has two parameters dbStartRow and dbMaxRow, you can use these to create the pagination.

Thanks
Maria
--
Community Manager

dotCMS
Main: 305.900.2001
Fax: 305.397.2579
www.dotcms.com
http://www.twitter.com/dotCMS
http://www.facebook.com/dotCMS
http://www.twitter.com/mabouza

Please consider the planet before printing this email.

Dario Granato

unread,
Jun 15, 2012, 11:57:54 AM6/15/12
to dot...@googlegroups.com
thanks!!!

Dario Granato

unread,
Jun 15, 2012, 12:12:56 PM6/15/12
to dot...@googlegroups.com
but it's possibile to use in jsp the displaytag library?

Maria Ahues Bouza

unread,
Jun 15, 2012, 12:26:57 PM6/15/12
to dot...@googlegroups.com
Dario,

Is this question related to the sql macro question?

I'm confused :)

-Maria
Reply all
Reply to author
Forward
0 new messages