struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ben Anderson" <stuts_anderson...@hotmail.com>
Subject Re: DynaValidator Form is Null
Date Tue, 17 Jun 2003 11:56:53 GMT
<code>
DynaActionForm addressForm=(DynaActionForm) form;
addressForm.set("oAddress",str);
addressForm.set("oCity",str);
addressForm.set("oState",data[0][2]);
addressForm.set("oZip",data[0][3]);
addressForm.set("oZipExt",data[0][4]);
addressForm.set("oPhoneArea",data[0][5]);
addressForm.set("oPhoneExchange",data[0][6]);
addressForm.set("oPhoneExt",data[0][7]);
request.setAttribute("addressForm",addressForm);
</code>

the str, and data[][] could be any strings.  Obviously this is not the 
intended use for forms, but it may help you pinpoint your problem.

-Ben



>From: Natalie D Rassmann <natalie.d.rassmann@lmco.com>
>Reply-To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
>To: Struts Users Mailing List <struts-user@jakarta.apache.org>
>Subject: Re: DynaValidator Form is Null
>Date: Tue, 17 Jun 2003 07:37:03 -0400
>
>How do you add the form somewhere in the action?
>
>Ben Anderson wrote:
>
> > I had trouble with this as well.  Hopefully, the answer you're looking
> > for
> > was as simple as the one I was.  The action is looking for a form and
> > can't
> > find it.  Make sure you are submitting the form from the jsp page its
> > coming
> > from?  If not, you'll need to add the form somewhere in the action.
> > -Ben Anderson
> >
> > >From: Natalie D Rassmann <natalie.d.rassmann@lmco.com>
> > >Reply-To: "Struts Users Mailing List"
> > <struts-user@jakarta.apache.org>
> > >To: Struts Users Mailing List <struts-user@jakarta.apache.org>
> > >Subject: Re: DynaValidator Form is Null
> > >Date: Tue, 17 Jun 2003 07:24:10 -0400
> > >
> > >Sorry, that line isn't throwing the null pointer exception.  It is
> > >returning a null as the form.  The line throwing the null pointer
> > >exception is
> > >reviewRecordForm.set( "dispatchAction", "createPeerRec" );
> > >
> > >Gemes Tibor wrote:
> > >
> > > > Natalie D Rassmann írta:
> > > >
> > > > >I am getting a null pointer exception on the following line:
> > > > >
> > > > > DynaActionForm reviewRecordForm = (DynaActionForm)form;
> > > > >
> > > > >
> > > > This line could not throw NPE.
> > > > The proper way of retrieving the values stored in dyna form
> > > > is via beanutils package eg PropertyUtils.getProperty(form,
> > "prop");
> > > >
> > > > Tib
> > > >
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> >
> > > > For additional commands, e-mail:
> > struts-user-help@jakarta.apache.org
> > >---------------------------------------------------------------------
> >
> > >To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > >For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> > _________________________________________________________________
> > The new MSN 8: advanced junk mail protection and 2 months FREE*
> > http://join.msn.com/?page=features/junkmail
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message