Nico Klasens wrote:
> The head has currently a pattern on the Datatype String which makes it a 
> little hard to upgrade some sites. The pattern is \A[^\n\r]*\z which 
> means that no newlines are allowed in the input.
> There is a specialization 'field' which does allow newlines, but we 
> haven't used that a lot in our builders. It sounds odd to me that a 
> specialization is more lenient then its base type.

Yes, but guitype 'string' always meant that. It simply a unfortunate coincidence
that it is the same string as a db-type.

Perhaps it would also have been nice if it would be possible to actually
nest those datatypes. So then you could define db type 'string' with 
specialization 'string' etc. Now they fall together.

> I propose to make a new specialization and move the pattern to that one.
> 
>     <specialization id="line">
>       <!-- no new lines -->
>       <pattern value="\A[^\n\r]*\z" />
>     </specialization>

I think the guitype 'string' was always used to create an input field of
one line. It's hard to imagine how one succeeded to enter newlines
there.

But anyhow, an other option would be to only add 'enforce="never"' or
'enforce="oncreate"' to the pattern of string. That means that it only
serves as an indication for the gui-editor. Just as 'guitype="string"'
always was, I think.

But I don't know what the problem excactly is, that you encounter?

Michiel

-- 
Michiel Meeuwissen                  mihxil'
Peperbus 111 MediaPark H'sum          [] ()
+31 (0)35 6772979         nl_NL eo_XX en_US



_______________________________________________
Developers mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/developers

Reply via email to