<?xml version="1.0" encoding="ISO-8859-1"?>

<jsp:root	xmlns:jsp="http://java.sun.com/JSP/Page" 
				xmlns:c="http://java.sun.com/jsp/jstl/core" 
				xmlns:fe="http://www.emdt.ardeo.net/jsp/fe"
				xmlns:bean="http://jakarta.apache.org/struts/tags-bean"
				xmlns:webapp="http://www.emdt.ardeo.net/jsp/webapp"
				version="2.0">
	<jsp:directive.page contentType="text/html" />
	<fe:formElement var="fe" element="${currentElement}"/>
	<fe:getAttribute var="size" element="${currentElement}" attribute="size"/>
	<c:choose>
		<c:when test="${fe.type == 'date'}">
			<c:set var="pattern" value="dd/MM/yyyy"/>
		</c:when>
		<c:when test="${fe.type == 'time'}">
			<c:set var="pattern" value="HH:mm"/>
		</c:when>
	</c:choose>
	<c:set var="fd" value="${xmlFormCtx.fieldDataMap[fe.id]}"/>
	<webapp:input type="text" class="${!fd.valid ? 'invalid' : ''}" id="${fe.id}" name="${fe.id}" title="${fe.hint}" size="${size}" value="${xmlFormCtx.data[fe.id]}" pattern="${pattern}"/>
	<c:if test="${!fd.valid}">
		&#160;<img title="<c:out value="${fe.alert}"/>" src="../images/16x16/important.png"/>
	</c:if>
	<c:if test="${fe.type == 'date' }">
		&#160;<img title='Click to choose date' style='cursor: pointer' src='../images/16x16/date.png' id='<c:out value="${fe.id }"/>_DateTrigger'/>
	</c:if>
</jsp:root>