cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: Widget states: let's do it (was Re: CForms making widgets invisible)
Date Fri, 24 Sep 2004 15:26:35 GMT
Hunsberger, Peter wrote:

>Sylvain Wallez <sylvain@apache.org> asks:
>
><snip>discussion on hidden etc.</snip>
>  
>
>>>I also think we can find a better names:
>>>
>>>formInclusion --> show, render, presentation, view, [fill a 
>>>      
>>>
>>new name] 
>>    
>>
>>>notIncluded -->  Excluded validation --> validate
>>> 
>>>
>>>      
>>>
>>Ok, maybe the "phantom" state isn't a good idea after all. 
>>But I still 
>>consider that "hidden" is a view concern since it has no 
>>impact on the 
>>request processing.
>>
>>Now I have a problem with separating state and validation: 
>>what does it 
>>mean if an active widget has validate="false". Does it mean that we 
>>allow the user to validate a form where she has input invalid data? 
>>Doesn't seem good to me...
>>    
>>
>
>It means simply that you don't perform validation on any input from that
>widget, the user is free to put what ever data they want into it.
>

>In our system we default to requiring validation but allow the analysts to
>mark a field as not requiring any validation.  They sometimes do this
>for comment fields or optional pick lists.
>  
>

And what's the default validation for these comments and pick lists?

Does this mean that a particular user category is allowed to violate the 
constraints? And what if you want _some_ of the constraints to be 
optional, but not all (e.g. a date that must always be in the future, 
but can be outside of the specified maximum)?

It seems to me like a particular implementation of a validator: a 
container validator, that would call its children only if some condition 
is true (in your case user role + a flag indicating relaxed constraints)

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