PageRenderTime 10ms CodeModel.GetById 2ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/src/main/java/com/googlecode/struts2yuiplugin/views/YUITagLibrary.java

http://struts2yuiplugin.googlecode.com/
Java | 29 lines | 21 code | 8 blank | 0 comment | 0 complexity | 082235a3466bf0b0eeb56c5dca3d4960 MD5 | raw file
 1package com.googlecode.struts2yuiplugin.views;
 2
 3import java.util.Arrays;
 4import java.util.List;
 5
 6import javax.servlet.http.HttpServletRequest;
 7import javax.servlet.http.HttpServletResponse;
 8
 9import org.apache.struts2.views.TagLibrary;
10
11import com.googlecode.struts2yuiplugin.views.freemarker.tags.YUIModels;
12import com.googlecode.struts2yuiplugin.views.velocity.components.DatePickerDirective;
13import com.googlecode.struts2yuiplugin.views.velocity.components.HeadDirective;
14import com.opensymphony.xwork2.util.ValueStack;
15
16public class YUITagLibrary implements TagLibrary {
17
18    public Object getFreemarkerModels(ValueStack stack, HttpServletRequest req,
19        HttpServletResponse res) {
20        return new YUIModels(stack, req, res);
21    }
22
23    @SuppressWarnings("unchecked")
24    public List<Class> getVelocityDirectiveClasses() {
25        Class[] directives = new Class[] { HeadDirective.class, DatePickerDirective.class };
26        return Arrays.asList(directives);
27    }
28
29}