META-INF.resources.xava.editors.timeCalendarEditor.jsp Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of openxava Show documentation
Show all versions of openxava Show documentation
Automatic frontend engine for Java
<%-- WARNING: IF YOU CHANGE THIS CODE PASS THE MANUAL TEST ON DateCalendarTest.txt --%>
<%@ page import="org.openxava.model.meta.MetaProperty" %>
<%
String propertyKey;
MetaProperty p;
boolean editable;
String title;
String align;
String fvalue;
String disabled;
if (request.getParameter("timeCalendarName") != null) {
propertyKey = request.getParameter("timeCalendarName");
p = (MetaProperty) request.getAttribute(propertyKey);
editable = "true".equals(request.getParameter("editable"));
align = request.getParameter("timeCalendarAlign");
fvalue = request.getParameter("timeCalendarFTime");
disabled = request.getParameter("timeCalendarDisabled");
} else {
propertyKey = request.getParameter("propertyKey");
p = (MetaProperty) request.getAttribute(propertyKey);
editable = "true".equals(request.getParameter("editable"));
align = p.isNumber() ? "right" : "left";
fvalue = (String) request.getAttribute(propertyKey + ".fvalue");
disabled = editable ? "" : "disabled";
}
boolean label = org.openxava.util.XavaPreferences.getInstance().isReadOnlyAsLabel();
String browser = request.getHeader("user-agent");
int sizeIncrement = browser.contains("Chrome")?0:2;
String dateClass = editable?"xava_time":"";
if (editable || !label) {
%>
>
<%if (editable) {%><%} %>
<%
} else {
%>
<%=fvalue%>
<%
}
%>
<% if (!editable) { %>
<% } %>