I call rsv_info.getField("info_type") because I need to use the value
returned. It's not for display purposes.
Since I call rsv_info.getField("info_type") in the <db:body> tag I thought
dbform should not execute the <db:body> tag if there are no records returned
(and hence resultsetVector is null) or if it must execute <db:body> for some
reasons then I expect to get a null value when I call
rsv_info.getField("info_type") instead of an exception.
> -----Original Message-----
> From: Dirk Kraemer [SMTP:[EMAIL PROTECTED]]
> Sent: 28 November 2002 14:31
> To: J M Okomba; dbforms-interest mailing list
> Subject: Re: [dbforms] RE: <db:dbform> with empty filtered data
> throws NullPointerException
>
> Hi J.M.!
>
> J M Okomba wrote:
> >
> > I forgot to mention that the NullPointerException is thrown when I call
> > getField e.g. when I call
> >
> > rsv_info.getField("info_type")
> >
> If there is no result, there is no resultsetVector, you get a NPE
> if you try to access it.
>
> Maybe you have set allowNew attribute to "true" within body tag, set
> that to "false".
>
> If you can't do that for other reasons, use labels instead of
> above variable, e.g.
>
> <db:dataLabel fieldName="info_type"/>
>
> instead of
>
> <%= rsv_info.getField("info_type") %>
>
> Regards
>
> Dirk
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Get the new Palm Tungsten T
> handheld. Power & Color in a compact size!
> http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
> _______________________________________________
> DbForms Mailing List
>
> http://www.wap-force.net/dbforms
-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T
handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
_______________________________________________
DbForms Mailing List
http://www.wap-force.net/dbforms