Akmal Sarhan wrote:
here is my own solution of this problem:
in a pull tool called utilTool:
public String formatDate(Date date, String format)
{
String d = "";
if (date != null)
{
SimpleDateFormat formatter = new SimpleDateFormat(format);
d = formatter.format(date);
}
return d;
}
in the template:
$!utilTool.formatDate($group.get("$name").value,$group.get("$name").validato
r.DateFormats.get(0))
where $group is the prepopulated intake group and $name is the DateString
field name.
this code will make it possible to update a date according to first rule in
the intake.xml
----- Original Message -----
From: "Jake Fear" <[EMAIL PROTECTED]>
To: "Turbine Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, December 17, 2002 4:53 PM
Subject: Re: DateString
That is precisely where I found out about the DateString. I have been<mailto:[EMAIL PROTECTED]>
looking over the rest of the code as well, and I think there is key
feature missing from the org.apache.turbine.services.intake.model.Field
class. Maybe I am off the mark here, but it seems like there should be
some formatting abilities in the Field class. For example, right now I
have things working for reading in new dates and getting them set
correctly, but I have no way (that I know of) to control the format of
the date when it is rendered via an intake Group/Field. The same
capability would be very nice for currency, and maybe even user defined
types (maybe user defined types are a stretch given nature of input in
web applications;-).
Jake
Quinton McCombs wrote:
There is work being done to get intake updated. This will include
updating the DTD. I hate to say this, but for now the best source of
information for the field types is the source code for
org.apache.turbine.services.intake.model.FieldFactory.
-----Original Message-------
From: Jake Fear [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 17, 2002 9:26 AM
To: Turbine Users List
Subject: DateString
It DateString is missing from the default intake.dtd in the latest
turbine source. I added it locally and it seems to work just fine
(however, the Date type in the intake.xml did not). I noticed the
latest TDK does not have any intake examples, and the documentation
covers on the the most basic data types. Does anyone know if this
particular subcomponent is still being actively developed?
Jake
--
To unsubscribe, e-mail:
<mailto:turbine-user-> [EMAIL PROTECTED]>
For
additional commands,
e-mail: <mailto:[EMAIL PROTECTED]>
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>--
To unsubscribe, e-mail:
For additional commands, e-mail:<mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
