All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.xava.editors.largeDisplayEditor.jsp Maven / Gradle / Ivy

There is a newer version: 7.4.3
Show newest version
<%@ page import="org.openxava.model.meta.MetaProperty" %>
<%@ page import="org.openxava.util.Is" %>
<%@ page import="org.openxava.util.Moneys" %>

<%
String propertyKey = request.getParameter("propertyKey");
String fvalue = (String) request.getAttribute(propertyKey + ".fvalue");
String prefix = request.getParameter("prefix");
String suffix = request.getParameter("suffix"); 
if (Is.emptyStringAll(prefix, suffix)) {
	MetaProperty p = (MetaProperty) request.getAttribute(propertyKey);
	if (Moneys.isMoneyProperty(p)) {
		String symbol = Moneys.getCurrencySymbol();
		if (Moneys.isCurrencySymbolAtStart()) prefix = symbol;
		else suffix = symbol;
	}
}
String icon = request.getParameter("icon");
String iconHTML = Is.emptyString(icon)?"":"";
Object value = request.getAttribute(propertyKey + ".value");
String negativeClass = "";
if (value instanceof Number) {
	Number number = (Number) value;
	if (number.longValue() < 0) negativeClass = "ox-large-display-negative"; 
}
%>
<%=iconHTML%><%=prefix%><%=fvalue%><%=suffix%>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy