On Tue, Apr 06, 2004 at 02:14:24PM +0100, Tim Larson wrote:
> On Tue, Apr 06, 2004 at 12:30:03PM +0200, Leszek Gawron wrote:
> > In v2 I have to do something like this:
> >
> > form = new Form( definition );
> >
> > form[ "globalAppContext" ] = getGlobalAppContext();
> > form[ "user" ] = getLoggedInUser();
> > form[ "userContext" ] = getContextForUser( getLoggedInUser() );
> > form[ "items" ] = rowset;
> > form [ "pageContext" ] = contractor;
> >
> > everything is doable so far but if I were to give somebody my code he would
> > surely ask me: why is the form top level object in your page model?
>
> I also found this strange. IMHO this needs to be changed, becase as
> we are finding out, the form is not the page. Think of examples like
> portals, pages containing several forms, etc. The form should just
> use one customizable key, to allow for multiple forms and other data.
You are right. I have also doubts about how to implement a page that contains
more than one form (i.e. two managed rowsets). I would have to maintain widget
names unique across multiple widget definition.
I think it would be good if the form itself had an id. For example a top
level widget username gets a request parameter named loginform.username - this
way multipleforms wouldn't use the same req params by mistake.
WDYT?
lg
--
__
| / \ | Leszek Gawron // \\
\_\\ //_/ [EMAIL PROTECTED] _\\()//_
.'/()\'. Phone: +48(501)720812 / // \\ \
\\ // recursive: adj; see recursive | \__/ |