Leszek Gawron wrote:

<snip>

none of these is strictly connected to the form (the only one is the rowset
displayed as the form controls invoke actions that change this part of view).

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?

It looks like the form is the most important part of the model here while it
is completely not true. Moreover if I wanted to turn over the rowset
capabilities it would also affect other page parts (I would have to rewrite
the whole view to use new variable paths)

WDYT?
lg


This is based on the fact that the current API is form.showForm(), i.e. "show this form". Thus the context object sent to the pipeline ends up being the (single) form.

I think your comments are valid, but calling form.showForm(pageDataOutsideThisForm) is equally non-intuitive IMO. The V2 API is by no means intended to be final and was meant to spur discussion so thanks for your comments.

Chris

Reply via email to