tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nazir Wasim Ahmed" <nazi...@sakinfotech.co.in>
Subject Parameter passing
Date Wed, 20 Aug 2003 07:00:01 GMT

Hi,
i have a tag which has the following signature.
<DateTag:DateUtil mode="changeformat" actualFormat="dd-mm-yyyy"
reqFormat="dd-mon-yyyy" date="20-05-2003" />
i want to break this up so that i can pass the parameter seperately like
<DateTag:DateUtil>
<param="mode" value="changeformat" >
.......


Can anyone help me out on this pls

Nazir



-----Original Message-----
From: Jason Lea [mailto:jason@kumachan.net.nz]
Sent: Wednesday, August 20, 2003 9:14 AM
To: Tag Libraries Users List
Subject: Re: Fw: [OT]Re: <sql:param> null weirdness BACK ON TOPIC


Rick,

Perhaps you could try this:

<sql:update>
     INSERT INTO myTable VALUES ( ? )
     <fmt:parseDate value="${param.time}" var="myTime" type="both" />
     <sql:dateParam value="${myTime}" />
</sql:update>

You might have to give parseDate a pattern or dateStyle/timeStyle to
parse correctly.  Apparently the sql:dateParam is supposed to be used
for DATE, TIME or TIMESTAMP columns.

fmt:parseDate will check for null and empty values and remove myTime
from scope.  I hope that means myTime will be null when param.time is an
empty string.


--
Jason Lea


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


Mime
View raw message