comment inline
----- Original Message -----
From: "Dave Johnson" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, June 16, 2006 2:28 PM
Subject: Re: New page models design (was Re: Atlas proposals: Frontpage
weblog and new Page Macro/Models)
On 6/16/06, Allen Gilliland <[EMAIL PROTECTED]> wrote:
I am thinking that we could modify that init() method to this ...
public void init(Map data) throws ModelInitializationException;
... this way whatever piece of code is initializing that page model can
pass in a set of data that may be useful to the page model. We also
allow the page model to throw an exception during init if somehow the
page model doesn't receive all the data it needs or something else bad
happens during init.
think that makes sense?
I don't think we can anticipate all of the things that a page model
author will need to access within a model and using a request here
stikes a good balance. Authors have access to the request and at the
same time we can provide access to request related things like the
parsed WeblogPageRequest object via request attibutes.
I do think the init method should throw an exception.
This suggests it would be a checked exception. I don't see any reason not
to make ModelInitializationException a subclass of RuntimeException here.