2008/4/26, Christoph Zwerschke <[EMAIL PROTECTED]>:
>
> > Normally you go to the first sub-page. But when entryId is given, the
> > sub-page where that entry is displayed should be current. Is this
> possible?
> > For example there are now 4 sub-pages. When the entryId 13 is send to
> this
> > page, instead of the first sub-page, the thirth sub-page should be
> > displayed.
>
>
> No, you need to calculate the proper page yourself and set the paginate
> parameter accordingly.


That is what I ment. ;-}  I want the page with the seventh record.  (7 + 2)
/  3 = 3. So I want the thirth subpage. But how do I set the paginate
parameter?


> Also is it possible to have the parameters not show up in the URL? Because
> > now they get also in the paginate links.
>
>
> That's how paginate data grid is rendering the links. You can use a form
> with hidden fields and make the pages and forward/backward links buttons
> instead. But you have to use your own template for this.


That was also not what I ment. (I need to become more clear.)
The index page receives as parameters tg_flash and entryId. From the log:
    2008-04-26 16:04:11,968 tblog.controllers INFO parameters index:
{'tg_flash': u'Comment Succesfully Added', 'entryId': u'13'}
And the link become something like:

http://localhost:8080/?tg_flash=Comment%20Succesfully%20Added&blogEntries_tgp_limit=3&blogEntries_tgp_no=2&entryId=22
instead of:
    http://localhost:8080/?blogEntries_tgp_limit=3&blogEntries_tgp_no=2
This is because index is called from saveComment:
    @expose()
    @error_handler(commentError)
    @validate(form = comment_form)
    @identity.require(identity.not_anonymous())
    def saveComment(self, **data):
        log.info('parameters saveComment: %s' % (data))
        BlogComment(commentText = data['commentText'],
                    commenter   = identity.current.user.id,
                    entry       = BlogEntry.get(data['blogEntryId']))
        raise redirect('/',
                       entryId = data['blogEntryId'],
                       tg_flash = 'Comment Succesfully Added')

-- 
Cecil Westerhof

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to turbogears@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to