/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

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