You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Carmona Perez, David" <DP...@fcc.es> on 2003/11/06 13:02:54 UTC

Woody proposals

Hi all,
 
I've been studying Woody a little, and have some proposals (maybe some of them are nonsense):
 
1.	Ability to generate client-side JavaScript for validation, in addition to server-side one, like ASP.NET.  E.g. the required condition is easy to do
2.	Possibility of embedding the widget definitions directly into the template file, so you don't have to maintain 2 files that must be in sync
3.	The binding framework could be simpler, if given a bean we bind matching widgets names with bean properties, by using Java reflection.  In this way the binding xml file could be omitted.  Normally the set of bean properties and widget names are the same.
 
--------
David
 

Re: Woody proposals

Posted by Ugo Cei <u....@cbim.it>.
Carmona Perez, David wrote:
> I've been studying Woody a little, and have some proposals (maybe some 
> of them are nonsense):
>    1. Ability to generate client-side JavaScript for validation, in
>       addition to server-side one, like ASP.NET.  E.g. the required
>       condition is easy to do

This would be a welcome addition. It would not be difficult to implement 
in XSL-T.

>    2. Possibility of embedding the widget definitions directly into the
>       template file, so you don't have to maintain 2 files that must be
>       in sync

I'm not sure I like this. Could save a little typing in simple cases, 
but would rule out the possibility, for example, of using different 
templates for different devices.

>    3. The binding framework could be simpler, if given a bean we bind
>       matching widgets names with bean properties, by using Java
>       reflection.  In this way the binding xml file could be omitted. 
>       Normally the set of bean properties and widget names are the same.

Again, this could be useful in simple cases.

	Ugo

-- 
Ugo Cei - Consorzio di Bioingegneria e Informatica Medica
P.le Volontari del Sangue, 2 - 27100 Pavia - Italy
Phone: +39.0382.525100 - E-mail: u.cei@cbim.it


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE: Woody proposals

Posted by Gunter D'Hondt <gu...@sofico.be>.
David,

1) you can easily adjust the woody-default.xsl that generates the html
tags and then also the javascript code. I've already developed a basic
clientside javascript framework but didn't had any time to finish it
completely (then I might throw it to the community)

2) this would be against the SoC (Separation of Concerns) of Cocoon but
in a form template you are talking about a widget instance while in the
form definition it's a widget definition. An object wi (woody instance)
is made based on the form definition and then the wi is send to the
WoodyTemplateTransformer to inject the html representation of each
widget inside the form template

3) not a bad idea but the binding framework is also used to xml binding
and then each widget should always be a separate child of the root
element (no nested structures could be possible); but also keep in mind
that the binding does more than only setting and getting a property; it
can also add/delete rows/nodes in a repeater etc. I think when using
reflection it would make the bean or xml restricted and that is
something we better avoid.

Regards,
Gunter D'Hondt



-----Original Message-----
From: users-return-58018-gudo=sofico.be@cocoon.apache.org
[mailto:users-return-58018-gudo=sofico.be@cocoon.apache.org] On Behalf
Of Carmona Perez, David
Sent: donderdag 6 november 2003 13:03
To: Cocoon (E-mail)
Subject: Woody proposals


Hi all,
 
I've been studying Woody a little, and have some proposals (maybe some
of them are nonsense):
 
Ability to generate client-side JavaScript for validation, in addition
to server-side one, like ASP.NET.  E.g. the required condition is easy
to do 
Possibility of embedding the widget definitions directly into the
template file, so you don't have to maintain 2 files that must be in
sync 
The binding framework could be simpler, if given a bean we bind matching
widgets names with bean properties, by using Java reflection.  In this
way the binding xml file could be omitted.  Normally the set of bean
properties and widget names are the same. 
 
--------
David
 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org