You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by pguillard <pg...@soociety.com> on 2004/11/01 04:58:43 UTC

CForms : fd:case for union widget ?

Hi all,

I'd like to know if a fd:case for the union widget is still planned to 
give more flexibility than the fd:struct or if there is another way to give a matching expression 
to the fd:struct.

Regards,

Phil


Re: CForms : fd:case for union widget ?

Posted by pguillard <pg...@soociety.com>.
Thanks to all!

Tim Larson wrote:

>On Mon, Nov 01, 2004 at 11:19:15PM +0100, Joerg Heinicke wrote:
>  
>
>>On 01.11.2004 09:20, Sylvain Wallez wrote:
>>
>>    
>>
>>>>I'd like to know if a fd:case for the union widget is still planned to 
>>>>give more flexibility than the fd:struct or if there is another way to 
>>>>give a matching expression to the fd:struct.
>>>>        
>>>>
>>>There were discussions about this [1] which unfortunately have stalled. 
>>>IIRC, using an expression for cases was considered to bring too much 
>>>overhead, as it expressions would need to be computed for each request. 
>>>Additional flexibility can be achieved though by having the union's case 
>>>widget be an output whose value is computed, eventually reacting to 
>>>change to other widget values.
>>>      
>>>
>>When I talked the last time with Tim about it (yes I think it was just 
>>Time and me) we agreed that the missing fd:case causes just troubles. It 
>>was not about an additional expression, but about needing fd:struct, 
>>which results in needing ft:struct and fb:struct - where you need 
>>ft:case and fb:case anyway. Furthermore the inconsequence is just 
>>irritating.
>>    
>>
>
>Yes there are two issues here, parallel structure between the binding,
>model, and template (binding and template use *:case, model does not,)
>and allowing cases to specify their own conditions rather than being
>simple cases like in a switch statement.
>
>For the first issue (parallel structure), we should add fd:case to the
>form model for consistency's sake, to simplify learning the union/
>choose concept.
>
>As for the second issue (conditions on cases), it should be an option.
>This way you can have the choice of fast switch-like behaviour versus
>slower if...elseif...elseif...else behaviour depending on your needs.
>
>--Tim Larson
>
>
>  
>


Re: CForms : fd:case for union widget ?

Posted by Tim Larson <ti...@keow.org>.
On Mon, Nov 01, 2004 at 11:19:15PM +0100, Joerg Heinicke wrote:
> On 01.11.2004 09:20, Sylvain Wallez wrote:
> 
> >>I'd like to know if a fd:case for the union widget is still planned to 
> >>give more flexibility than the fd:struct or if there is another way to 
> >>give a matching expression to the fd:struct.
> >
> >There were discussions about this [1] which unfortunately have stalled. 
> >IIRC, using an expression for cases was considered to bring too much 
> >overhead, as it expressions would need to be computed for each request. 
> >Additional flexibility can be achieved though by having the union's case 
> >widget be an output whose value is computed, eventually reacting to 
> >change to other widget values.
> 
> When I talked the last time with Tim about it (yes I think it was just 
> Time and me) we agreed that the missing fd:case causes just troubles. It 
> was not about an additional expression, but about needing fd:struct, 
> which results in needing ft:struct and fb:struct - where you need 
> ft:case and fb:case anyway. Furthermore the inconsequence is just 
> irritating.

Yes there are two issues here, parallel structure between the binding,
model, and template (binding and template use *:case, model does not,)
and allowing cases to specify their own conditions rather than being
simple cases like in a switch statement.

For the first issue (parallel structure), we should add fd:case to the
form model for consistency's sake, to simplify learning the union/
choose concept.

As for the second issue (conditions on cases), it should be an option.
This way you can have the choice of fast switch-like behaviour versus
slower if...elseif...elseif...else behaviour depending on your needs.

--Tim Larson

Re: CForms : fd:case for union widget ?

Posted by Joerg Heinicke <jo...@gmx.de>.
On 01.11.2004 09:20, Sylvain Wallez wrote:

>> I'd like to know if a fd:case for the union widget is still planned to 
>> give more flexibility than the fd:struct or if there is another way to 
>> give a matching expression to the fd:struct.
> 
> There were discussions about this [1] which unfortunately have stalled. 
> IIRC, using an expression for cases was considered to bring too much 
> overhead, as it expressions would need to be computed for each request. 
> Additional flexibility can be achieved though by having the union's case 
> widget be an output whose value is computed, eventually reacting to 
> change to other widget values.

When I talked the last time with Tim about it (yes I think it was just 
Time and me) we agreed that the missing fd:case causes just troubles. It 
was not about an additional expression, but about needing fd:struct, 
which results in needing ft:struct and fb:struct - where you need 
ft:case and fb:case anyway. Furthermore the inconsequence is just 
irritating.

Joerg


Re: CForms : fd:case for union widget ?

Posted by Sylvain Wallez <sy...@apache.org>.
pguillard wrote:

> Hi all,
>
> I'd like to know if a fd:case for the union widget is still planned to 
> give more flexibility than the fd:struct or if there is another way to 
> give a matching expression to the fd:struct.


There were discussions about this [1] which unfortunately have stalled. 
IIRC, using an expression for cases was considered to bring too much 
overhead, as it expressions would need to be computed for each request. 
Additional flexibility can be achieved though by having the union's case 
widget be an output whose value is computed, eventually reacting to 
change to other widget values.

Sylvain

[1] http://wiki.apache.org/cocoon/WoodyScratchpad

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