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

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

<%@ include file="../imports.jsp"%>

<%@ page import="java.util.Iterator" %>
<%@ page import="java.util.Locale" %> <%-- Trifon --%>
<%@ page import="org.openxava.util.Locales" %> <%-- Trifon --%>
<%@ page import="org.openxava.util.Labels" %> <%-- Trifon --%>
<%@ page import="org.openxava.util.Is" %> 
<%@ page import="org.openxava.web.Ids"%>




<%
String tabObject = request.getParameter("tabObject");
tabObject = (tabObject == null || tabObject.equals(""))?"xava_tab":tabObject;
org.openxava.tab.Tab tab = (org.openxava.tab.Tab) context.get(request, "xava_customizingTab");
String searchWord = request.getParameter("searchWord");
searchWord = searchWord == null?"":searchWord.toLowerCase();
boolean originalColumnsToAddUntilSecondLevel = tab.isColumnsToAddUntilSecondLevel();
if (!Is.emptyString(searchWord)) tab.setColumnsToAddUntilSecondLevel(false);
%>
>
 
<%
int f=0;
Locale currentLocale = Locales.getCurrent(); //Trifon
int c=0; 
for (Iterator it=tab.getColumnsToAdd().iterator(); it.hasNext();) { 
	String property = (String) it.next();
	String cssClass=c%2==0?"ox-list-pair":"ox-list-odd";	
	String cssCellClass=c%2==0?"ox-list-pair":"ox-list-odd";
	String events=c%2==0?style.getListPairEvents():style.getListOddEvents();	
	String rowId = Ids.decorate(request, "xavaPropertiesList") + f;
	f++;
	String propertyI18n = Labels.getQualified(property, currentLocale);
	if (!Is.emptyString(searchWord) && !propertyI18n.toLowerCase().contains(searchWord)) continue;
	c++;
	if (tab.isColumnsToAddUntilSecondLevel() && c > 20) break;
%>
>
	
<%
}
%>

<%
if (tab.isColumnsToAddUntilSecondLevel()) {
%>

<%
}
tab.setColumnsToAddUntilSecondLevel(originalColumnsToAddUntilSecondLevel);
%>

<%=propertyI18n%>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy