Package org.fordprefect.struts2jscalendarplugin.views.jsp.ui

Source Code of org.fordprefect.struts2jscalendarplugin.views.jsp.ui.HeadTag

/*
*  This file is part of Struts2JSCalendarPlugin.
*
*  Struts2JSCalendarPlugin is free software: you can redistribute it and/or modify
*  it under the terms of the GNU Lesser General Public License as published by
*  the Free Software Foundation, either version 3 of the License, or
*  (at your option) any later version.
*
*  Foobar is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*  GNU Lesser General Public License for more details.
*
*  You should have received a copy of the GNU Lesser General Public License
*  along with Struts2JSCalendarPlugin.  If not, see <http://www.gnu.org/licenses/>.
*
*  This work is based on the webwork datepicker plugin copyright (c) 2002-2006 by OpenSymphony
*
*  Copyright � 2007 - 2010 by Derik Vercueil, Philipp Leusmann
*/
package org.fordprefect.struts2jscalendarplugin.views.jsp.ui;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.components.Component;
import org.apache.struts2.views.jsp.ui.AbstractUITag;
import org.fordprefect.struts2jscalendarplugin.components.Head;

import com.opensymphony.xwork2.util.ValueStack;

/**
* @see Head
*/
@SuppressWarnings("serial")
public class HeadTag extends AbstractUITag {

  private String calendarcss;
  private String language;

  @Override
  public Component getBean(ValueStack stack, HttpServletRequest req,
      HttpServletResponse res) {
    return new Head(stack, req, res);
  }

  @Override
  protected void populateParams() {
    super.populateParams();
    if (calendarcss != null) {
      ((Head) component).setCalendarcss(calendarcss);
    }
    if (language != null) {
      ((Head) component).setLanguage(language);
    }
  }

  public String getCalendarcss() {
    return calendarcss;
  }

  public void setCalendarcss(String calendarcss) {
    this.calendarcss = calendarcss;
  }

  public void setLanguage(String language) {
    this.language = language;
  }

  public String getLanguage() {
    return language;
  }
}
TOP

Related Classes of org.fordprefect.struts2jscalendarplugin.views.jsp.ui.HeadTag

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.