Special treatment to java.util.Date and java.util.Calendar

82 views
Skip to first unread message

Ricardo Fraga Camelo

unread,
Mar 25, 2010, 3:37:58 PM3/25/10
to json-taglib

This taglib is lacking special treatment for the date types, it
could create a javascript Date object. In the current version (0.5),
it uses the toString() method to generate the value to the JSON
"rendering" of those types. I could add it, if i now where to get the
source and modify it. It could accept a "to JSON value" interface
like.

public interface ValueRenderer {

String renderValue(Object value);

}

and could be registered like:

<json:property name="id" value="${bid.id}"
renderer="com.mysystem.json.BidIdValueRenderer"/>

Ricardo Fraga Camelo

Reply all
Reply to author
Forward
0 new messages