cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: disabling widgets
Date Mon, 05 Apr 2004 14:39:27 GMT
Vadim Gritsenko wrote:

> Sylvain Wallez wrote:
>
>> Vadim Gritsenko wrote:
>>
>>> Sylvain Wallez wrote:
>>>
>>>> Now, as I mentioned already [1], I started using the generator 
>>>> approach
>>>> to form templates, using the implementation of "wt:" statements using
>>>> JXMacro provided by Chris [2]. And this approach is very powerful, 
>>>> as it
>>>> allows complex conditional form layout without requiring the
>>>> introduction of yet-another-control-structure-markup in the "wt:" 
>>>> namespace.
>>>>
>>>> Introducing the widget states would allow these conditions to be
>>>> computed with the form's own state rather than using some separate 
>>>> flow
>>>> values.
>>>>
>>>> So, I propose the following changes to Cocoon forms:
>>>> - add a state to widgets (enabled/disabled/hidden).
>>>>  
>>>>
>>>
>>> Assuming this state will be available during binding, as well as in 
>>> form... +1. But, this will require some kind of "wt:" control markup 
>>> anyway... Given simple example:
>>> <table><tr><td><wt:widget-label id="x"/></td><td><wt:widget

>>> id="x"/></td></tr></table>
>>>
>>> There is a need to disable whole table, it's not enough to take out 
>>> widget only.
>>
>>
>> This is exactly why a generator approach is needed :
>
>
> Well, of course it will work with generator. But what if generator can 
> not be used in this scenario (xslt processing required; use of other 
> template engine; something else), what then? Either it should be also 
> possible with JXTemplateTransformer, or FormsTransformer to be 
> extended, or (ideally) both of those.


The source of your generator can be a "cocoon:". This has the benefit 
(if the "cocoon:" is cacheable) that you don't necessarily have 
recompile the template like what would be needed with a transformer.

> Also, what do you think about something to allow generation of 
> <label>s? Currently, <widget-label> does not produce any label at all...


Actually, that's not a generator/transformer problem, but something 
wrong with <ft:widget-label>. It should produce a <fi:label> tag 
containing what it produces today. This then allows the styling to 
generate the correct <label> tags.

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }


Mime
View raw message