/* Automatically generated.
 * Copyright (c) 2000 by SAP AG, Walldorf.,
 * http://www.sap.com
 * All rights reserved.
 *
 * This software is the confidential and proprietary information
 * of SAP AG, Walldorf. You shall not disclose such Confidential
 * Information and shall use it only in accordance with the terms
 * of the license agreement you entered into with SAP.
 * Do not edit.
 */

package web;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import ro.emid.common.utils.Formatter;


public class tag_datetimefield_1875650_1561484973599
	extends javax.servlet.jsp.tagext.SimpleTagSupport
{




	private JspContext jspContext;
	private java.io.Writer _jspx_sout;
	private java.lang.String name;
	private java.util.Date value;
	private java.lang.String width;
	private java.lang.String readonly;
	private java.lang.String onchange;
	private java.lang.String onblur;
	private java.lang.Boolean hourFirst;


	public java.lang.String getName() {
		return this.name;
	}
	public void setName(java.lang.String name) {
		this.name = name;
	}
	public java.util.Date getValue() {
		return this.value;
	}
	public void setValue(java.util.Date value) {
		this.value = value;
	}
	public java.lang.String getWidth() {
		return this.width;
	}
	public void setWidth(java.lang.String width) {
		this.width = width;
	}
	public java.lang.String getReadonly() {
		return this.readonly;
	}
	public void setReadonly(java.lang.String readonly) {
		this.readonly = readonly;
	}
	public java.lang.String getOnchange() {
		return this.onchange;
	}
	public void setOnchange(java.lang.String onchange) {
		this.onchange = onchange;
	}
	public java.lang.String getOnblur() {
		return this.onblur;
	}
	public void setOnblur(java.lang.String onblur) {
		this.onblur = onblur;
	}
	public java.lang.Boolean getHourFirst() {
		return this.hourFirst;
	}
	public void setHourFirst(java.lang.Boolean hourFirst) {
		this.hourFirst = hourFirst;
	}
	public void setJspContext(JspContext ctx) {
		super.setJspContext(ctx);
		java.util.ArrayList _jspx_nested = null;
		java.util.ArrayList _jspx_at_begin = null;
		java.util.ArrayList _jspx_at_end = null;
		this.jspContext = new com.sap.engine.services.servlets_jsp.lib.jspruntime.JspContextWrapper(ctx, _jspx_nested, _jspx_at_begin, _jspx_at_end, null);
	}

	public JspContext getJspContext() {
		return this.jspContext;
	}

	public void doTag() throws JspException, java.io.IOException {
		com.sap.engine.services.servlets_jsp.lib.jspruntime.PageContextImpl _jspx_pageContext = (com.sap.engine.services.servlets_jsp.lib.jspruntime.PageContextImpl)jspContext;
		HttpServletRequest request = (HttpServletRequest) _jspx_pageContext.getRequest();
		HttpServletResponse response = (HttpServletResponse) _jspx_pageContext.getResponse();
		HttpSession session = _jspx_pageContext.getSession();
		ServletContext application = _jspx_pageContext.getServletContext();
		ServletConfig config = _jspx_pageContext.getServletConfig();
		JspWriter out = jspContext.getOut();
		com.sap.engine.services.servlets_jsp.server.application.InjectionWrapper _jspx_resourceInjector = ((com.sap.engine.services.servlets_jsp.server.application.ServletContextImpl)_jspx_pageContext.getServletContext()).getApplicationContext().getInjectionWrapper();


		if( getName() != null ) {
			_jspx_pageContext.setAttribute("name", getName());
		}
		if( getValue() != null ) {
			_jspx_pageContext.setAttribute("value", getValue());
		}
		if( getWidth() != null ) {
			_jspx_pageContext.setAttribute("width", getWidth());
		}
		if( getReadonly() != null ) {
			_jspx_pageContext.setAttribute("readonly", getReadonly());
		}
		if( getOnchange() != null ) {
			_jspx_pageContext.setAttribute("onchange", getOnchange());
		}
		if( getOnblur() != null ) {
			_jspx_pageContext.setAttribute("onblur", getOnblur());
		}
		if( getHourFirst() != null ) {
			_jspx_pageContext.setAttribute("hourFirst", getHourFirst());
		}
		try {
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/tags/datetimefield.tag";from=(1,50);to=(3,0)]
			out.print("\r\n\r\n");
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/tags/datetimefield.tag";from=(3,48);to=(4,0)]
			out.print("\r\n");
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/tags/datetimefield.tag";from=(4,20);to=(6,0)]
			out.print("\r\n\r\n");
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/tags/datetimefield.tag";from=(6,63);to=(7,0)]
			out.print("\r\n");
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/tags/datetimefield.tag";from=(7,87);to=(8,0)]
			out.print("\r\n");
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/tags/datetimefield.tag";from=(8,45);to=(9,0)]
			out.print("\r\n");
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/tags/datetimefield.tag";from=(9,48);to=(10,0)]
			out.print("\r\n");
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/tags/datetimefield.tag";from=(10,72);to=(11,0)]
			out.print("\r\n");
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/tags/datetimefield.tag";from=(11,70);to=(12,0)]
			out.print("\r\n");
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/tags/datetimefield.tag";from=(12,74);to=(15,0)]
			out.print("\r\n\r\n\r\n");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/tags/datetimefield.tag";from=(15,0);to=(19,2)]
			
    request.setAttribute("datetimevalue", hourFirst != null && hourFirst ? Formatter.TIME_DATE.format(value): Formatter.DATE_TIME.format(value));
    request.setAttribute("calendarformat", hourFirst != null && hourFirst ? "%H:%M %d.%m.%Y": "%d.%m.%Y %H:%M");
    request.setAttribute("onUpdateFunction", onchange != null ? onchange.substring(0, onchange.length() - 2) : "null");

// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/tags/datetimefield.tag";from=(19,2);to=(27,14)]
			out.print("\r\n<div style=\"vertical-align: middle; display: inline-block\">\r\n    <input type=\"text\" id=\"");
			out.print((java.lang.String) _jspx_pageContext.evaluateInternal("${name}", java.lang.String.class, false, null));
			out.print("\"\r\n           name=\"");
			out.print((java.lang.String) _jspx_pageContext.evaluateInternal("${name}", java.lang.String.class, false, null));
			out.print("\"\r\n           value=\"");
			out.print((java.lang.String) _jspx_pageContext.evaluateInternal("${datetimevalue}", java.lang.String.class, false, null));
			out.print("\"\r\n           onblur=\"");
			out.print((java.lang.String) _jspx_pageContext.evaluateInternal("${empty onblur ? \"\'\'\": onblur}", java.lang.String.class, false, null));
			out.print("\"\r\n           style=\"float: left;width:");
			out.print((java.lang.String) _jspx_pageContext.evaluateInternal("${empty width ? \"100px\" : width}", java.lang.String.class, false, null));
			out.print(";\" ");
			out.print((java.lang.String) _jspx_pageContext.evaluateInternal("${empty readonly ? \"\" : \"readonly\"}", java.lang.String.class, false, null));
			out.print("/>\r\n    <img id=\"");
			out.print((java.lang.String) _jspx_pageContext.evaluateInternal("${name}", java.lang.String.class, false, null));
			out.print("-trigger\"\r\n         src=\"");
// end
// begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/tags/datetimefield.tag";from=(27,14);to=(27,43)]
			out.print(request.getContextPath());
// end
// HTML // begin [file="D:/usr/sap/POR/J00/j2ee/cluster/apps/JavaEE/emid-admin/servlet_jsp/emid-admin/root/WEB-INF/tags/datetimefield.tag";from=(27,43);to=(47,0)]
			out.print("/resources/images/cal.gif\"\r\n         border=\"0\"\r\n         alt=\"Calendar\"\r\n         style=\"margin-left: 3px;float: right;cursor: pointer\"\r\n    />\r\n</div>\r\n\r\n<script type=\"text/javascript\">\r\n    //on page ready\r\n    jQuery(function(){\r\n        Calendar.setup({\r\n            inputField  : \"");
			out.print((java.lang.String) _jspx_pageContext.evaluateInternal("${name}", java.lang.String.class, false, null));
			out.print("\",         // ID of the input field\r\n            ifFormat    : \"");
			out.print((java.lang.String) _jspx_pageContext.evaluateInternal("${calendarformat}", java.lang.String.class, false, null));
			out.print("\",       // the date format\r\n            button      : \"");
			out.print((java.lang.String) _jspx_pageContext.evaluateInternal("${name}", java.lang.String.class, false, null));
			out.print("-trigger\",         // ID of the button\r\n            showsTime   : true,\r\n            onUpdate : ");
			out.print((java.lang.String) _jspx_pageContext.evaluateInternal("${onUpdateFunction}", java.lang.String.class, false, null));
			out.print("\r\n        });\r\n    });\r\n</script>\r\n\r\n");
// end

		} catch(Throwable t) {
			if(t instanceof SkipPageException)
				throw (SkipPageException) t;
			if(t instanceof java.io.IOException)
				throw (java.io.IOException) t;
			if(t instanceof IllegalStateException)
				throw (IllegalStateException) t;
			if(t instanceof JspException)
				throw (JspException) t;
			throw new JspException(t);
		} finally {
			((com.sap.engine.services.servlets_jsp.lib.jspruntime.JspContextWrapper)jspContext).syncEndTagFile();
		}
	}
}
