Hi Guys,
In some examples I found a way to get a list in my builders. See
http://www.mmbase.org/mmdocs/informationanalysts/datatypes.html#enumerations
I used it in my code:
<editor>
<positions>
<!-- position in the input
area of the editor -->
<input>6</input>
<!-- position in the list area of the editor -->
<list>6</list>
<!-- position in the search area of the editor -->
<search>6</search>
</positions>
</editor>
<datatype base="long" xmlns="
http://www.mmbase.org/xmlns/
datatypes">
<enumeration>
<entry value="Man" />
<entry value="Vrouw" />
</enumeration>
</datatype>
<!-- database related -->
<db>
<!-- name of the field in the database -->
<name xml:lang="nl">gender</name>
<!-- MMBase datatype and demands on it -->
<type key="false" notnull="false" size="1024"
state="persistent">STRING</type>
</db>
But then my app won't deploy , I get the following error messages:
17:07:57,988 ERR mmbase.util.xml.ErrorHandler - file:/D:/VWL_DEV/
tomcat/webapps/nib/WEB-INF/config/builders/applications/users.xml line:
142 column:77: class org.xml.sax.SAXParseException Element type
"datatype" must be declared.
17:07:57,988 ERR mmbase.util.xml.ErrorHandler - file:/D:/VWL_DEV/
tomcat/webapps/nib/WEB-INF/config/builders/applications/users.xml line:
143 column:17: class org.xml.sax.SAXParseException Element type
"enumeration" must be declared.
17:07:57,988 ERR mmbase.util.xml.ErrorHandler - file:/D:/VWL_DEV/
tomcat/webapps/nib/WEB-INF/config/builders/applications/users.xml line:
144 column:28: class org.xml.sax.SAXParseException Element type
"entry" must be declared.
17:07:57,988 ERR mmbase.util.xml.ErrorHandler - file:/D:/VWL_DEV/
tomcat/webapps/nib/WEB-INF/config/builders/applications/users.xml line:
145 column:30: class org.xml.sax.SAXParseException Element type
"entry" must be declared.
17:07:57,988 ERR mmbase.util.xml.ErrorHandler - file:/D:/VWL_DEV/
tomcat/webapps/nib/WEB-INF/config/builders/applications/users.xml line:
155 column:15: class org.xml.sax.SAXParseException The content of
element type "field" must match "(descriptions?,gui?,editor?,db)".
17:07:57,988 ERR mmbase.util.xml.ErrorHandler - file:/D:/VWL_DEV/
tomcat/webapps/nib/WEB-INF/config/builders/applications/users.xml line:
284 column:77: class org.xml.sax.SAXParseException Element type
"datatype" must be declared.
17:07:57,988 ERR mmbase.util.xml.ErrorHandler - file:/D:/VWL_DEV/
tomcat/webapps/nib/WEB-INF/config/builders/applications/users.xml line:
285 column:16: class org.xml.sax.SAXParseException Element type
"enumeration" must be declared.
17:07:57,988 ERR mmbase.util.xml.ErrorHandler - file:/D:/VWL_DEV/
tomcat/webapps/nib/WEB-INF/config/builders/applications/users.xml line:
286 column:31: class org.xml.sax.SAXParseException Element type
"entry" must be declared.
17:07:57,988 ERR mmbase.util.xml.ErrorHandler - file:/D:/VWL_DEV/
tomcat/webapps/nib/WEB-INF/config/builders/applications/users.xml line:
287 column:34: class org.xml.sax.SAXParseException Element type
"entry" must be declared.
17:07:57,988 ERR mmbase.util.xml.ErrorHandler - file:/D:/VWL_DEV/
tomcat/webapps/nib/WEB-INF/config/builders/applications/users.xml line:
297 column:15: class org.xml.sax.SAXParseException The content of
element type "field" must match "(descriptions?,gui?,editor?,db)".
17:07:58,113 WAR mmbase.util.xml.BuilderReader - Using both deprecated
'gui/guitype' and 'datatype' subelements in field tag for field
'gender', ignoring the first one.
17:07:58,113 WAR mmbase.util.xml.BuilderReader - Using both deprecated
'gui/guitype' and 'datatype' subelements in field tag for field
'isactive', ignoring the first one.
I remember I used the same sort of code in MMBase 1.8 ! Is there a
"new" way of doing this in MMBase 1.9? Or am I doing it wrong all the
way?
hope you have enough information to help me on this
Regards Aschwin