cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Ziegeler <>
Subject Re: Ant: [cforms] compact notation for <fi:styling>
Date Fri, 23 Sep 2005 11:11:38 GMT
Reinhard Poetz wrote:
>>Hi all,
>>I'd like to introduce a compact notation on form
>>template elements for 
>>stylings that require only attributes (the vast
>>majority of them).
>>For example, we currently have to write:
>>  <ft:widget id="text">
>>    <fi:styling type="textarea" rows="10"
>>  </ft:widget>
>>The compact notation would allow to write:
>>  <ft:widget id="text" type="textarea" rows="10"
>>The more verbose form will still be allowed, and
>>both forms will produce 
>>the same results, as foreign attributes on
>>"ft:widget" will lead to 
>>generating a <fi:styling> with these attributes.
>>Another thing I'd like to change also is the need
>>submit-on-change="true", making it implicit on
>>widgets that have some 
>>attached change listeners.
>>That will make form templates less verbose and
>>closer to the traditional 
>>html syntax.
>>Any objections?
> generally not. While reading your proposal I had the
> idea of using prefixed attributes to make it very
> clear that they contain styling information:
> <ft:widget id="text" fi:type="textarea" fi:rows="10"
> fi:cols="30"/>
> This should also help with validation.
I agree with Reinhard here, we should use the namespace for the styling
attributes to clearly indicate that these attributes are for styling.

Apart from that I'm not against your suggestion, but I don't see a real
benefit. Imho it gets more complicated as now two different notations
are possible and users will worry about when to use what, or if there is
a difference etc. In addition creating an fi:styling element out of
attributes from a ft:widget element might be too much magic. What
happens if you use both?

So, if the majority thinks that it's useful, I'm ok with it - but I
remain sceptical.

Carsten Ziegeler - Open Source Group, S&N AG

View raw message