Hi ickphum,

ickphum wrote:
I want to change the default date format from MM/dd/yyyy to yyyy/MM/dd and
don't want to import the AppFuse code into my project if I can avoid it. Can
I avoid it?

I created a class with a java.util.Date field and ran the code generator,
and the list page came up ok:

    <display:column sortProperty="birthday" sortable="true"
titleKey="person.birthday">
         <fmt:formatDate value="${personList.birthday}"
pattern="${datePattern}"/>
    </display:column>

But the form page doesn't include any reference to date formatting, and I'm
getting strings like this:
Um, it does actually. In the code snippet you refer to above, there is a variable ${datePattern}. You don't say which version of AppFuse you're using, but in AppFuse 2, this variable is set in common/taglibs.jsp, using the "date.format" string in your ApplicationResources.properties file.

So you don't have to download the AppFuse source and re-code anything., Just search for "date.format" in your ApplicationResources.properties file and change the format there. That will change the format wherever a date is formatted using the pattern in the JSTL snippet you posted.

If you just want to change it in one place, simply replace ${datePattern} with your own format string.

HTH,
Rob Hills
Waikiki, Western Australia


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

Reply via email to