cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: [CForms] Streaming out widget attributes?
Date Tue, 01 Aug 2006 21:20:21 GMT
Carsten Ziegeler wrote:
> Sylvain Wallez schrieb:
>   
>> Carsten Ziegeler wrote:
>>     
>>> Hi,
>>>
>>> I'm currently looking into a way of getting information for a widget in
>>> my template that has been defined in the model. But it seems to me that
>>> this is not possible right now.
>>> Is anyone against streaming out all attributes of a widget in the
>>> generateSaxFragment() method? As attributes are not used frequently I
>>> think this shouldn't create problems.
>>>       
>> This *will* create problems, as attributes can be of any type, and not 
>> just Strings (although only Strings can be specified in the widget's 
>> definition).
>>     
>
> Yes, now I see two solutions for this: we could just stream out the
> attributes of
> the definition (which are strings) or if we need all attributes, stream
> out attributes which can be streamed.
> I would go for the first solution, anything against this?
>   

Sounds hacky to me...

>> Now if you're using JXTemplate, you can directly access attribute values 
>> with ${widget.getAttribute('foo')}.
>>     
>
> Yes, I know but I can't *directly* access the attributes in an xsl
> stylesheet. And unfortunately it's not possible to overwrite the
> jxmacros and extend the streaming mechanism there.
>   

Dumb question: why do you need these attributes in the XSL?

Attributes were meant to allow additional information to be communicated 
between the application logic and the various event handlers and 
validators attached to widgets, whereas the XSLs are supposed to use the 
styling information for their job.

Sylvain

-- 
Sylvain Wallez - http://bluxte.net


Mime
View raw message