<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I am trying to add a custom form field to TemplateOne in OpenCms version 6.2.2. I have not found any documentation anywhere as to how to do this; I am working off of the existing instructions and documentation of the person who developed the custom form field code. I have three files: <div><br></div><div>CmsTextLabelField.class - A compiled class file of the java source for the new form field, which extends A_CmsField. </div><div><br></div><div>inputfield.xsd - A modified version of the existing file which adds the form field to the FieldType SelectorWidget configuration value. </div><div><br></div><div>custom_form_fields.properties - A single line of text which maps the new form field's label (used in inputfield.xsd) to the full class name.  It consists of this line:</div><div><span class="Apple-style-span" style="font-family: -moz-fixed; font-size: 13px; ">FIELDS=textLabel:org.opencms.frontend.templateone.form.CmsTextLabelField </span></div><div><br></div><div>The instructions I have say the following:</div><div><div><br></div><div><span class="Apple-style-span" style="font-family: -moz-fixed; font-size: 13px; ">inputfield.xsd goes into: <br><i class="moz-txt-slash"><span class="moz-txt-tag">/</span>system/modules/org.opencms.frontend.templateone.form/schemas<span class="moz-txt-tag">/</span></i> <br><br>CmsTextLabelField.class goes into: <br><i class="moz-txt-slash"><span class="moz-txt-tag">/</span>system/modules/org.opencms.frontend.templateone.form/classes/org/opencms/frontend/templateone/form<span class="moz-txt-tag">/</span></i> <br><br>custom_form_fields.properties goes into: <br><i class="moz-txt-slash"><span class="moz-txt-tag">/</span>system/modules/org.opencms.frontend.templateone.form/classes<span class="moz-txt-tag">/</span></i> </span><br><div><br></div><div>When I put these files in these directories (within the workspace), I successfully see a new field in the select box when editing a form. It does not have the proper label, however; it shows as:</div><div>??? form.field.type.textLabel ???</div><div><br></div><div>When I  save the form and try to view it, I get a null pointer exception:</div><div><br></div><div>10 Apr 2008 14:10:08,156 ERROR [mplateone.form.CmsFieldFactory: 199] Unable to create form field class instance for type textLabel!</div><div><div>java.lang.NullPointerException</div><div><span class="Apple-tab-span" style="white-space: pre; ">     </span>at java.lang.Class.forName0(Native Method)</div><div><span class="Apple-tab-span" style="white-space: pre; ">        </span>at java.lang.Class.forName(Class.java:164)</div><div><span class="Apple-tab-span" style="white-space: pre; ">        </span>at org.opencms.frontend.templateone.form.CmsFieldFactory.getField(CmsFieldFactory.java:195)</div><div><span class="Apple-tab-span" style="white-space: pre; ">       </span>at org.opencms.frontend.templateone.form.CmsForm.initInputFields(CmsForm.java:1260)</div><div><span class="Apple-tab-span" style="white-space: pre; ">       </span>at org.opencms.frontend.templateone.form.CmsForm.init(CmsForm.java:627)</div><div><span class="Apple-tab-span" style="white-space: pre; ">   </span>at org.opencms.frontend.templateone.form.CmsForm.<init>(CmsForm.java:261)</div><div><span class="Apple-tab-span" style="white-space: pre; ">   </span>at org.opencms.frontend.templateone.form.CmsFormHandler.init(CmsFormHandler.java:294)</div><div><span class="Apple-tab-span" style="white-space: pre; ">     </span>at org.opencms.frontend.templateone.form.CmsFormHandler.<init>(CmsFormHandler.java:124)</div><div><span class="Apple-tab-span" style="white-space: pre; ">     </span>at org.apache.jsp.WEB_002dINF.jsp.offline.system.modules.org_opencms_frontend_templateone_form.pages.form_html_jsp._jspService(form_html_jsp.java:57)</div><div><span class="Apple-tab-span" style="white-space: pre; ">     </span>...<br></div><div><br></div><div>Looking through the source of both CmsForm and CmsFieldFactory for the version 6.2.2 of OpenCms, it appears that it is trying to instantiate the field by calling Class.forName() on the string "textLabel" rather than the full name of the class file (as specified in custom_form_field.properties).  How do I fix this? How do I make OpenCms read in the properties file? And, assuming I get that running, is this the standard way to add new form fields?  Is there any documentation on this process available somewhere?  I am an experienced Java developer, but I'm a newbie to OpenCms. Any help would be appreciated.</div><div><br></div><div>Thank you! </div><div><br></div></div></div></div><div>_________________________________</div><div apple-content-edited="true"><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Ellery Crane - Bear Code</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">85 Granite Shed Lane - Unit 1</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Montpelier, Vermont <span class="Apple-converted-space"> </span>05602</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">+1 802-225-1331</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><a href="http://bear-code.com/">http://bear-code.com/</a></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></span></div></span> </div><br></body></html>