roller-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From evgeniy.stro...@yahoo.com
Subject Re: What is the best way to add custom methodes
Date Fri, 30 Nov 2007 15:11:37 GMT
Thank you,.. But I don't know how to get Weblog object form Model.. Could you please help me
out?...
Also, I was thinking: let's say I have 1000 visitors and each of them change cookie values
once. It means entire cache will be flushed each time, and for other users as well even if
they didn't change anything..
May be there is better way to flush cache, only for the user who submit request? May be I
just don't make any sense at all))...
Any help is greatly appreciated.
 
Thank you
Gene 

 
----- Original Message ----
From: Dave <snoopdave@gmail.com>
To: user@roller.apache.org
Sent: Thursday, November 29, 2007 5:59:43 PM
Subject: Re: What is the best way to add custom methodes

Assuming weblog is a Weblog object, CacheManager.invalidate(weblog)
will flush the cache for your weblog.

- Dave


On Nov 28, 2007 3:50 PM,  <evgeniy.strokin@yahoo.com> wrote:
> Thanks, it helps a lot. But I've got another related problem.
> I'm able to get and set Cookie now.
> In one page I set cookie in all others I'm reading it. But if I come back to the first
page and change the value of the cookie and go to the second page and read it I'm still getting
the old value until I flush cache of the blog. Is any way to do this from the Model I've build?
I'd like to flush cache at the moment I set the cookie.
>
>
> Thank you
> Gene
>
>
> ----- Original Message ----
> From: Dave <snoopdave@gmail.com>
> To: user@roller.apache.org
> Sent: Wednesday, November 28, 2007 12:28:01 AM
> Subject: Re: What is the best way to add custom methodes
>
> Create a custom page model object with the method(s) you wish to add.
> Here are some instructions I posted earlier:
>
>  http://markmail.org/message/jdrk5jw4tg2ynkdp
>
> It is possible to get the Servlet API request object in a model, so
> you can get headers, cookies, etc.
>
> - Dave
>
>
> On Nov 27, 2007 11:17 AM, Evgeniy Strokin <evgeniy.strokin@yahoo.com> wrote:
> > Hello,.. I have such task: Our blog has many categories and subcategories. User
should be able to choose some of them as default and I need to display posts only from those
categories.
> > So I thought I'll provide a screen where user can see the list of all categories
and he can choose some. I'll store it in cookie. When next time user will come I'll read the
cookie and show posts based on the values.
> > I need to submit the form with user's choice to the server (right?) and set cookie.
Also I need some kind of custom method which will read the cookie and return me list of categories.
> > What is the best way to do this?
> > Any suggestions are greatly appreciated.
> >
> > I use Roller 3.1 so far, but I have freedom to switch to Roller 4, but since it's
not ready yet (I know, there is release soon,.. but I just tested RC10 and I still had problems
there, may be just my config is wrong, may be problem with the RC, but this is not a good
sine anyway) may be I'd need a solution for 3.1 first, and for 4.0 after..
> >
> > Thank you,
> > Gene
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message