cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <va...@reverycodes.com>
Subject Re: CForms view model? (was Re: Externalizing JXTG tag configuration)
Date Wed, 11 May 2005 16:06:22 GMT
Daniel Fagerstrom wrote:
> Sylvain Wallez wrote:
> 
>> and why producing SAX events is a mixing of concerns? 
> 
> 
> It would not nececarilly be a mix of concern, but in CForms it IMO is 
> because the Widget mainly is about content in the form of Java data 
> structures, but it also make some presentation details (the label) 
> available through SAX.

Depending on how it's done, it can be a good thing. IMHO,

   public XMLizable getLabel();

seems like a right approach to me; and templating language should be more than 
happy to work with XMLizable objects, so to render a label you don't need 
anything more than:

   #{widget/label}


> The mix of Java data structure and SAX production 
> makes it harder to use from e.g. a template language.
> 
> I think that CForms would be simpler if we removed the SAX generation 
> from the widgets and made SAX generation the responsibility of e.g. the 
> template language.

IMHO, if done right (see above), cforms can generate sax events.

Vadim

Mime
View raw message