cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "roy huang" <>
Subject Re: disabling widgets
Date Mon, 05 Apr 2004 10:28:49 GMT
In this link,Sylvain suggest 3 states for a widget,I think it's a good idea.
Today I want to hide an action under some condition ,but I just can't if I don't modify the
I use a transformer to generate different cocoon form define under different condition,but
the widget is always there(type may be different).So in style xml I can always use widget
like that:
    <ft:widget id="edit">    
But if I remove the widget from the form define file,display will generate an error about
'Widget with id "***" does not exist in the form container'.I thought an afternoon and believe
I must modify forms-field-styling.xsl to do the job,but I don't like this method.(see also:

Yes,content and display should separate ,but if just the content indicate display it or not?The
Cocoon Forms proposal contain <fd:choice> (,
I think this proposal is similar to what I am doing now.So if the inline widget doesn't exist
and displaytemplate use it ,it will generate the same error.

Solution suggestion:
1.Do not generate error if a widget not exist ,just not render or ignore it.Of course ,this
can turn on and off by parameter.
2.Sylvain's suggest,3 states for a widget.this state is an attribute of a widget define,we
can modify it by flow or own transformer.


Roy Huang
View raw message