Re: Problem validating dynamic Form with Validator-Framework

2002-07-31 Thread Eddie Bush

That's it!  It's got to be!  Yes - you must always specify 
dynamic="true" for these dynamic forms! :-)  Bleh - please post things 
in a "nicer" format next time you have to post things.  Some of us are 
spoiled to well-formatted configs and just can't read jumbled up messes 
very well.

[EMAIL PROTECTED] wrote:

>Depending on which version of Struts you are using, you might need to set the dynamic 
>attribute to true like this:
>
>  dynamic="true"
>  name="createStandortForm"
>  type="org.apache.struts.validator.DynaValidatorActionForm">
>
>
>
>I can't remember off the top of my head whether you needed to do this for the 
>DynaValidatorActionForm. I know that this has been changed so the framework can now 
>induce whether the class in the type attribute is a subclass of DynaActionForm, but 
>it hasn't always been that way.
>
>If you using the latest nightly and this problem still happens, then this is probably 
>not it. If you are using an older version of 1.1b (maybe a couple of weeks old), then 
>try adding this attribute or getting the latest version.
>
>HTH,
>Chuck
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Problem validating dynamic Form with Validator-Framework

2002-07-31 Thread struts-user

Depending on which version of Struts you are using, you might need to set the dynamic 
attribute to true like this:





I can't remember off the top of my head whether you needed to do this for the 
DynaValidatorActionForm. I know that this has been changed so the framework can now 
induce whether the class in the type attribute is a subclass of DynaActionForm, but it 
hasn't always been that way.

If you using the latest nightly and this problem still happens, then this is probably 
not it. If you are using an older version of 1.1b (maybe a couple of weeks old), then 
try adding this attribute or getting the latest version.

HTH,
Chuck
--
Sent via jApache.org

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Problem validating dynamic Form with Validator-Framework

2002-07-31 Thread Eddie Bush

I don't see any problem with what you're doing - at least not right off. 
 I don't use DynaValidatorActionForm though - just DynaValidatorForm. 
 Maybe try updating to a recent nightly and see if you have the same 
problem.  If you feel you are unclear on how to use the validator 
framework you may check out Chuck's book on theserverside.com (don't 
forget to pre-order a copy too!) - and don't forget there is also an 
example WAR file included with Struts.

If you still can't get it going, repost again with your config ... in a 
more (human) readable form :-)  I don't see any errors in it, from what 
I can tell though ...

Regards,

Eddie

Axel Stahlhut wrote:

>Hi, I've gfot problems with the validation Framework. (Struts 1.1b)
>If i try to validate a DynaValidatorForm I get the following error:
>java.lang.NullPointerException
>   at 
>org.apache.struts.action.DynaActionForm.getDynaProperty(DynaActionForm.java:539)
>   at org.apache.struts.action.DynaActionForm.set(DynaActionForm.java:357)
>   at org.apache.struts.action.DynaActionForm.reset(DynaActionForm.java:158)
>   at 
>org.apache.struts.validator.DynaValidatorForm.reset(DynaValidatorForm.java:357)
>   at org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:618)
>   at 
>org.apache.struts.action.RequestProcessor.processActionForm(RequestProcessor.java:349)
>   at de.neusta.j2ee.struts.NeustaRequestProcessor.process(Unknown Source)
>   at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109)
>   at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:452)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at 
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
>   at 
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
>   at 
>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
>   at 
>org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
>   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
>   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>   at 
>org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
>   at 
>org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
>   at 
>org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
>   at 
>org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
>   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
>   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>   at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
>   at 
>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
>   at 
>org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
>   at 
>org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
>   at 
>org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
>   at 
>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
>   at 
>org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
>   at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
>   at 
>org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
>   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
>   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>   at 
>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
>   at 
>org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
>   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
>   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
>   at 
>org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
>   at 
>org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
>   at java.lang.Thread.run(Thread.java:484)
>
>My struts-config (extracts):
>  type="org.apache.struts.validator.DynaValidatorActionForm">type="java.lang.String" initial="" />type="java.lang.String" initial="" />type="java.lang.String" initial="" />type="java.lang.String" initial="" />type="java.lang.String" initial="" />type="java.lang.String" initial="" />type="java.lang.String" initial="" />type="java.lang.String" initial="" />type="java.lang.String" initial="" />
>validate="true" input="/StandortErzeugen" 
>type="de.neusta.fortuna.webapp.standort.CreateStandortAction"> 

Problem validating dynamic Form with Validator-Framework

2002-07-31 Thread Axel Stahlhut

Hi, I've gfot problems with the validation Framework. (Struts 1.1b)
If i try to validate a DynaValidatorForm I get the following error:
java.lang.NullPointerException
at 
org.apache.struts.action.DynaActionForm.getDynaProperty(DynaActionForm.java:539)
at org.apache.struts.action.DynaActionForm.set(DynaActionForm.java:357)
at org.apache.struts.action.DynaActionForm.reset(DynaActionForm.java:158)
at 
org.apache.struts.validator.DynaValidatorForm.reset(DynaValidatorForm.java:357)
at org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:618)
at 
org.apache.struts.action.RequestProcessor.processActionForm(RequestProcessor.java:349)
at de.neusta.j2ee.struts.NeustaRequestProcessor.process(Unknown Source)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:452)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
at java.lang.Thread.run(Thread.java:484)

My struts-config (extracts):
  
  
  

  


Validator-rules.xml:



   

validator.xml:

Please help... Getting crazy on that since two days.

Axel