From: Anthony E. <me...@an...> - 2001-11-20 01:51:50
|
> Hello. > > I've been trying out FormProc the last couple of days. Overall, I think > it is an excellent tool. Very nice work! I would like to share some of > my impressions being a first time user. I also have a few questions. Thanks. I always look forward to comments and questions from others. > > My first question is how do you set up a field with no validator? When > I configure a field like: > > <formproc:element name="address" /> > > or even > > <formproc:element name="address"> > <formproc:write-method>setAddress</formproc:write-method> > </formproc:element> > > It throws a ResourceException. Correct me if I'm wrong, but this field > configuration seems valid. if not, an exception with some description > of the problem would be helpful. Like "ResourceException: Missing > required --- tag" for example. I have modified the source in the CVS to allow both forms of the element method as described above. > > Secondly, I received this error that seems due to the fact that I had > fields in my form that were not included in the configuration file: > > [DEBUG]:com.anthonyeden.lib.resource.ResourceFileMonitor - Starting > FileMonitor > [DEBUG]:com.anthonyeden.lib.resource.ResourceFileMonitor - FileMonitor > running. > [DEBUG]:org.formproc.FormManager - Formproc configuration loaded > [DEBUG]:org.formproc.servlet.HttpForm - Processing servlet request. > [DEBUG]:org.formproc.Form - Validating field action > [DEBUG]:org.formproc.Form - getName: action > [DEBUG]:org.formproc.Form - Found form element. > java.lang.NullPointerException > at org.formproc.Form.validate(Form.java:300) > at org.formproc.Form.process(Form.java:266) > at org.formproc.servlet.HttpForm.process(HttpForm.java:38) > at EntryForm.handle(EntryForm.java:49) > > Wouldn't it be better to gracefully ignore fields in the form that are > not included in the xml configuration file? Or at least throw a > meaningfull exception with some description of the problem with the > config file? I have modified the source code in the CVS so that fields which are not in the XML configuration are ignored. I have created a new class PassFormValidator which implements this functionality. I have not tested these modifications yet, but I have modified the example app to simulate this new behavior - I just need to run it. Sincerely, Anthony Eden |