You could do something like the following.

in the HTML add a drop down list

<select name="DateFormat">
<option value="MM/dd/yyyy HH:mm:s">Military- 01/16/2006 13:01:32</option>
<option value="MM/dd/yyyy h:mm:s a">Standard -01/16/2006 1:32:10 pm</option>
<option value="yyyy-MM-dd">Year First 2006-01-16</option>
</select>

this would give the user a day format they would like to use.  The value
would be the date format you stick into the SimpleDateForm. You would need
to setup your tapestry app to have the
value returned as a string

in the java page handler
(have tapestry fill in the value from the drop down list)
abstract String getDateFormat();


Define a listener
public void doSomethingWithDate(){
  SimpleDateFormat sdf = new SimpleDateFormat(getDateFormat());
  String formattedDate = sdf.format(someDate);

 ...

}






On 9/14/06, Peter Dawn <[EMAIL PROTECTED]> wrote:

can you also give some help on the html page and the page file. thanks a
lot.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Ed Ross
[EMAIL PROTECTED]

Reply via email to