CALL FOR: Cleaning up and making the mm:fieldinfo tag from the MMBase Taglib more powerfull/configurable.
Currently the fieldinfo tag is full of rather awfull code with giant switch statements in the functions htmlInput, whereHtmlInput, useHtmlInput. Gerard van de Looi of e-id proposed the divide the code up in several class in a new package org.mmbase.bridge.jsp.taglib.typehandler. These classes are 'registered' in the FieldInfo implementation for every field type. I reviewed his code and made the registrations process of the classes use a new XML 'fieldtypes' which is available as a resource in org.mmbase.bridge.jsp.taglib.resources (I can/will move it to the 'config' dir if you want, but I like trying this out) I also added the 'EnumHandler' functionality, by which now you can add 'enum' types (dependant on the 'guitype' of an integer) to FieldInfo without recompiling and java-coding. This depends on a ResourceBundle of which the name is based on the guitype, which make it e.g. also internationalized. I make an example for the 'dirs' field of reldefs which now can appear as a dropdown box in the editors (even with internationalized content). Until now this simply was an input-box where you had to type '1' or '2'. After this hack you can choose between 'unidirectional' and 'bidirectional' (or 'unidirectioneel/bidirectioneel' etc,) and it will be possible to add these kind of things as many as you like (by use of property files) Since cleaning up code and making things configurable could be considered part of the 'documentation' project, this perhaps could be commited without a vote, but because it is quite a major change and the freeze for 1.6 is very soon, I make a vote of it. This is majority call, with a margin of 3 votes. LINKS: I'll attach the new code in a reaction (Gerard's code + my changes) to this mail tonight or tomorrow morning (I'm still polishing it, but I'm sure it will work now) Some implementation details will perhaps change in the next days. (Not sure about using FieldReferrer rather then FieldInfo in the TypeHandlers e.g.) START OF CALL: 2002-10-22 23:00 END OF CALL: 2002-10-25 23:00 [_] +1 (YEA) [_] +0 (ABSTAIN ) [_] -1 (NAY), because : [_] VETO, because:
