cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Larson <timlarsonw...@yahoo.com>
Subject Re: Need help fixing a Woody flow sample
Date Fri, 22 Aug 2003 12:58:25 GMT
For what its worth, I like both of the suggestions below:

--- Sylvain Wallez <sylvain.wallez@anyware-tech.com> wrote:
...
> This makes me think that Form.show() does call sendPageAndWait, but 
> provides no way for the script to pass its own biz-data to the view. 
> This is IMO very limiting, as we may want the page template to display 
> non-form data (actually, I will have this case very soon).
> 
> So what about copying the prototype of sendPage[AndWait]() for show() ? 
> This would then be Form.show("view.html", biz-data).
> 
> Going back to the eventHandler/validator discussion, this also means 
> that these should not more be passed as parameters (would be too long 
> and thus inconvenient), but as properties of the Form. Same applies to 
> locale. We'll then have :
> 
> var form = new Form("form-decl.xml");
> form.eventHandler = function(event) {....}; // optional
> form.validator = function(form) {....}; // optional
> form.locale = myLocale; // optional
> form.show(
>   "form-view.html",
>   { user: userName, foo: bar} // optional
> );
> 

This make more sense to me and looks like it will play well with
future changes to echo the validation logic in client-side javascript.

> In that case what about providing an optional feature in woody.js 
> through a "requestAttribute" property ? If this property is defined, 
> Form.show() stores the form in the corresponding request attribute, thus 
> allowing the use of non flow-aware pipelines/components.

Very good.

--Tim Larson


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

Mime
View raw message