Here's the binding: <?xml version="1.0" encoding="UTF-8"?> <binding name="model" direction="output" value-style="attribute"> <format type="java.util.Date" label="Date:Time" serializer="com.example.ModelSerializer.serializeTime"/> <format type="java.util.Date" label="Date:DayMonth" serializer="com.example.ModelSerializer.serializeDayMonth"/> <mapping name="example" class="com.example.Example"> <value name="date" field="date" format="Date:DayMonth"/> </mapping> </binding>
And the Java class: package com.example; import java.text.DateFormat; import java.util.Date; import java.util.Locale; public class ModelSerializer { public static String serializeDayMonth(Date date) { return DateFormat.getDateInstance(DateFormat.LONG, Locale.getDefault()).format(date); } public static String serializeTime(Date date) { return DateFormat.getTimeInstance(DateFormat.LONG, Locale.getDefault()).format(date); } } Regards, Andreas On 10/11/05, Lorelei Tosello <[EMAIL PROTECTED]> wrote: > Is it possible to have a concrete example? (For the syntax to use…) > Thanks for your response > -- > Lorelei Tosello -- Andreas Brenk [EMAIL PROTECTED] http://andreasbrenk.com/ N�HS^�隊X���'���u�����!�ל���E�(�� ��z�ky�(�ק��0�Zv�b�ˬ�*'��ݚ�ކ�i��(��b�{'{��r�������m��c��n��왨��x%��c��n����+-��.�ǟ����a��l��b��,���y�+���b��?�+-�w��8����