META-INF.resources.xava.propertyActions.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
<%@ include file="imports.jsp"%>
<%@page import="org.openxava.model.meta.MetaProperty"%>
<%@page import="org.openxava.web.Ids"%>
<%
boolean lastSearchKey = "true".equals(request.getParameter("lastSearchKey"));
boolean editable = "true".equals(request.getParameter("editable"));
String viewObject = request.getParameter("viewObject");
viewObject = (viewObject == null || viewObject.equals(""))?"xava_view":viewObject;
org.openxava.view.View view = (org.openxava.view.View) context.get(request, viewObject);
String propertyKey = Ids.undecorate(request.getParameter("propertyKey"));
String propertyName = request.getParameter("propertyName");
MetaProperty p = view.getMetaProperty(propertyName);
if (lastSearchKey) {
String referencedModel = p.getMetaModel().getName();
%>
<% if (view.isSearch() && editable) {%>
<% } %>
<% if (view.isCreateNew() && editable) {%>
<% } %>
<% if (view.isModify() && editable) {%>
<% } %>
<% if (editable) {%>
<% } %>
<%
}
if (editable){
for (java.util.Iterator itActions = view.getActionsNamesForReference(lastSearchKey).iterator(); itActions.hasNext();) {
String action = (String) itActions.next();
%>
<%
}
}
for (java.util.Iterator itActions = view.getActionsNamesForProperty(p, editable).iterator(); itActions.hasNext();) {
String action = (String) itActions.next();
%>
<%
}
%>