Emile wrote: > Michiel wrote: > > > I have no real clue how to communicate in some comprehensible way this > > kind of information to the client, for javascript impelmentaiton of the > > same or so. > > > > This is where I figured the client-side XML would earn it's keep. > > > I figure that much of this stuff will for some time remain to be > > customized on the JSP's/javascript. Or would you have hope to define > > these kind of things genericly? > > > Yes, to some or other degree. Simply starting with a relationship type or > definition of sorts (user-define or standard) would go a long way in > providing generic logic and variants thereof. I'd suggest that javascript > may earn a space in CSV before long.
Yes, I agree it may be a good idea to provide some javascript library to enforce mmbase specific constraints on the client side, and which understand how MMBase gives this meta-info (perhaps as an XML indeed). > > > Perhaps it is easiest to talk back to the server with request for > > validity only, which it then can report, without crashing an exception > > to the poor user. > > > That's a simple validation exercise, Yes, simple, and therefore a nice start.. ;-) > but the more scalable option would be > the inclusion of generic (and specific) client-side logic, which could then > also manage some degree of business rules and complex validation. > We certainly have to keep that possibility in mind. We includes also you btw, so if you want to contribute something more concrete on this area, please feel free :-) I myself am IIRC the leader of the 'fieldtypes' project, and field-value validation in the broadest possible sense I consider in the scope of this project. I was about to add a simple server side 'check' function for that, but I totally agree that that would only be a start, and that client-side validation is preferable as much as possible. I think it never can be complete, btw. For example one of the already possible constraints on a field-value is uniqueness, for which I see no other way then server-side checking, because it is of course out of the question to send all existing values to the client... We can of course agree that the current 'check' is too lame (i.e. simply confronting the client with a database exception...) Michiel -- Michiel Meeuwissen mihxil' Mediacentrum 140 H'sum [] () +31 (0)35 6772979 nl_NL eo_XX en_US _______________________________________________ Developers mailing list [email protected] http://lists.mmbase.org/mailman/listinfo/developers
