Re: datepicker

Perry Jeung <[email protected]>
Newsgroups gmane.comp.java.open-symphony.webwork
Message-ID <7613059.1165129299515.JavaMail.os-j2ee@opensymphony01.managed.contegix.com>
Here's how I did it, but I think there's a better way.

In my action, I have this:
        // format date for the datepicker
        DateFormatter dateFormatter = new DateFormatter();
        dateFormatter.setDate(originalDate);
        dateFormatter.setFormat("MM/dd/yyyy");
        formattedDate = dateFormatter.getFormattedDate();

In my JSP page, I have this:
                <ww:datepicker id="liveOrderHeader_deliveryDate" 
                name="liveOrderHeader.deliveryDate" 
                value="%{formattedDate}" 
                maxlength="11" size="11"/>

I get hints in the wiki that there's a way to avoid putting the formatting in every action,
but I don't know how exactly.  I think there's a better way using value = %{getText(...)}.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=41685&messageID=104884#104884

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.