You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Siggelkow, Bill" <bi...@mirant.com> on 2001/12/19 18:18:57 UTC
RE: Problem with bean:define? Issue with Date fields
Well ... if you have been following this thread I thought I had a problem
with the 'define' tag ... actually my problem was not with the define tag.
The problem was I did not include a 'hidden' field to hold a date property
in my form bean.
Once I did this I was able to use the define as I originally intended.
It was a slight inconvenience to realize that I had to provide a special
'get/setDateAsString' type methods to hold the render/transform the date
value.
It would be nice if in the future, the Struts tags supported some automatic
conversion of Date objects.
-----Original Message-----
From: Siggelkow, Bill [mailto:bill.siggelkow@mirant.com]
Sent: Wednesday, December 19, 2001 9:56 AM
To: 'Struts Users Mailing List'
Subject: RE: Problem with bean:define?
Yes that is what I am saying ... I am not sure if the bean:write works ...
(Since I found the problem I was able to find a work-around as noted in a
previous post.)
-----Original Message-----
From: Keith Bacon [mailto:keithbaconstruts@yahoo.com]
Sent: Wednesday, December 19, 2001 7:15 AM
To: Struts Users Mailing List
Subject: RE: Problem with bean:define?
are you saying your jsp is getting null pointer excp
in setAttribute() in the <bean:define tag?
does this work?
<bean:write name="editRegForm" property="postDate" />
Keith. (not much use I suspect - try my best!).
--- "Siggelkow, Bill" <bi...@mirant.com>
wrote:
> Specifically, I am trying to use the define tag to
> define a variable based
> on a property of the FormBean as follows: (the
> getLocalDate is my own tag
> for rendering dates.
>
> <bean:define id="postDate" name="editRegForm"
> property="postDate"
> type="java.util.Date"/>
> <mir:getLocalDate date="<%=postDate%>"
> style="long"/>
>
> -----Original Message-----
> From: Siggelkow, Bill
> [mailto:bill.siggelkow@mirant.com]
> Sent: Tuesday, December 18, 2001 11:33 AM
> To: 'struts-user@jakarta.apache.org'
> Subject: Problem with bean:define?
>
>
> I am using the bean:define tag to make a variable
> available ... he's the
> wierd part ... it works the "first time" I enter the
> form ... but if I
> return to the form because of a validation error ...
> it fails with a
> NullPointerException in the pageContext.setAttribute
> method ... it seems to
> me the second time around it is not finding the
> value for some reason ...
> any ideas?
>
> Bill Siggelkow
> eBusiness Lead Developer
> 678.579.6458
> Mirant
> http://www.mirant.com
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>