META-INF.resources.xava.editors.dateCalendarEditor.jsp Maven / Gradle / Ivy
<%-- WARNING: IF YOU CHANGE THIS CODE PASS THE MANUAL TEST ON DateCalendarTest.txt --%>
<%@ page import="org.openxava.model.meta.MetaProperty" %>
<%
String propertyKey = request.getParameter("propertyKey");
MetaProperty p = (MetaProperty) request.getAttribute(propertyKey);
String fvalue = (String) request.getAttribute(propertyKey + ".fvalue");
String align = p.isNumber()?"right":"left";
boolean editable="true".equals(request.getParameter("editable"));
String disabled=editable?"":"disabled";
boolean label = org.openxava.util.XavaPreferences.getInstance().isReadOnlyAsLabel();
String browser = request.getHeader("user-agent");
int sizeIncrement = browser.contains("Chrome")?0:2;
if (editable || !label) {
String dateClass = editable?"xava_date":"";
%>
><%if (editable) {%><%} %>
<%
} else {
%>
<%=fvalue%>
<%
}
%>
<% if (!editable) { %>
<% } %>