Hi,

I am using cocoon-2.1.3 with Woody. I have a situation where I am using xsp
to display some data from a Woody form. The problem is when trying to
display the value of a date widget and the date format is the default one
instead of the one set in the widget definition. I have the following
configuration (using xml binding):

Widget definition:
        ...
        <wd:field id="start_date">
            <wd:datatype base="date">
                <wd:convertor type="formatting">
                    <wd:patterns>
                        <wd:pattern>dd/MM/yyyy</wd:pattern>
                    </wd:patterns>
                </wd:convertor>
            </wd:datatype>
            <wd:label>Start Date</wd:label>
        </wd:field>
        ...


The confirm.xsp file:
            ...
            <xsp:logic>
                //Fetching the form from the request attribute
                Form form = (Form)request.getAttribute("theform");
                Field start_date = (Field)form.getWidget("start_date");
            </xsp:logic>
            ...
            <item>
                   <xsp:expr>start_date.getValue()</xsp:expr>
             </item>
            ...

And the output is in the form of: "Tue Feb 10 00:00:00 EST 2004", instead of
"10/02/2004".

Can anyone help?
Rgds
Alex



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

Reply via email to