PageRenderTime 19ms CodeModel.GetById 8ms app.highlight 6ms RepoModel.GetById 2ms app.codeStats 0ms

/src/main/java/com/googlecode/struts2yuiplugin/views/jsp/ui/AbstractYUITag.java

http://struts2yuiplugin.googlecode.com/
Java | 40 lines | 20 code | 7 blank | 13 comment | 0 complexity | 90219e1b943dea7a38f7c6aab65a7b8c MD5 | raw file
 1package com.googlecode.struts2yuiplugin.views.jsp.ui;
 2
 3import com.googlecode.struts2yuiplugin.components.YUIBean;
 4import org.apache.struts2.views.jsp.ui.AbstractUITag;
 5
 6/**
 7 * Includes attributes common for all the YUI Tags
 8 */
 9public abstract class AbstractYUITag extends AbstractUITag {
10
11    private String widget;
12    private String noscript;
13
14    @Override
15    protected void populateParams() {
16        super.populateParams();
17
18        YUIBean yuiBean = (YUIBean) this.component;
19        yuiBean.setWidget(widget);
20        yuiBean.setNoscript(noscript);
21    }
22
23    /**
24     * Specify the javascript name of the widget
25     *
26     * @param widget   the javascipt name of the widget
27     **/
28    public void setWidget(String widget) {
29        this.widget = widget;
30    }
31
32    /**
33     * Disable inclusion of javascript
34     *
35     * @param noscript   true to disable inclusion of javascript (default is false)
36     **/
37    public void setNoscript(String noscript) {
38        this.noscript = noscript;
39    }
40}