01: package com.opensymphony.webwork.views.velocity.components;
02:
03: import com.opensymphony.webwork.components.Component;
04: import com.opensymphony.webwork.components.Date;
05: import com.opensymphony.xwork.util.OgnlValueStack;
06:
07: import javax.servlet.http.HttpServletRequest;
08: import javax.servlet.http.HttpServletResponse;
09:
10: /**
11: * <code>DateDirective</code>
12: *
13: * @author Rainer Hermanns
14: * @version $Id: DateDirective.java 2274 2006-02-26 16:49:43Z rainerh $
15: */
16: public class DateDirective extends AbstractDirective {
17:
18: public String getBeanName() {
19: return "date";
20: }
21:
22: protected Component getBean(OgnlValueStack stack,
23: HttpServletRequest req, HttpServletResponse res) {
24: return new Date(stack);
25: }
26: }
|