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

META-INF.resources.xava.editor.jsp Maven / Gradle / Ivy

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





<%@ page import="org.openxava.util.XavaPreferences" %>
<%@ page import="org.openxava.util.Is" %>
<%@ page import="org.openxava.model.meta.MetaProperty" %>
<%@ page import="org.openxava.view.meta.MetaPropertyView" %>


<%
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 = request.getParameter("propertyKey");
MetaProperty p = (MetaProperty) request.getAttribute(propertyKey);
String shasFrame = request.getParameter("hasFrame"); 
boolean hasFrame="true".equals(shasFrame)?true:false;
boolean editable = view.isEditable(p);
boolean lastSearchKey = view.isLastSearchKey(p); 
boolean throwPropertyChanged = view.throwsPropertyChanged(p);
	

int labelFormat = view.getLabelFormatForProperty(p);
String labelStyle = view.getLabelStyleForProperty(p);
if (Is.empty(labelStyle)) labelStyle = XavaPreferences.getInstance().getDefaultLabelStyle();
String label = view.getLabelFor(p);
%>

<% if (view.isFlowLayout()) { %> 
<% } %> <%@ include file="htmlTagsEditor.jsp"%> <% if (first && !view.isAlignedByColumns()) label = org.openxava.util.Strings.change(label, " ", " "); %> <% if (!hasFrame) { %> <%=preLabel%> <% if (labelFormat == MetaPropertyView.NORMAL_LABEL) { %> '/>" class="<%=labelStyle%>"> <%=label%> <% } %> <%=postLabel%> <%=preEditor%> <% if (labelFormat == MetaPropertyView.SMALL_LABEL) { %> '/>" class="<%=style.getSmallLabel()%> <%=labelStyle%>"><%=label%>
<% } %> <% } // if (!hasFrame) String placeholder = !Is.empty(p.getPlaceholder()) ? "data-placeholder='" + p.getPlaceholder() + "'" : ""; String required = view.isEditable() && p.isRequired() ? style.getRequiredEditor():""; %> '/>" class="xava_editor <%=required%>" <%=placeholder%>> <% if (!(lastSearchKey && view.displayWithFrame())) { %> '/>"> <% if (view.propertyHasActions(p)) { %> <% } %> <% } %> <% if (!hasFrame) { %> <%@ include file="propertyActionsExt.jsp"%> <%=postEditor%> <% if (labelFormat == MetaPropertyView.SMALL_LABEL) { %> <% } %> <% } // if (!hasFrame) %> <% if (view.isFlowLayout()) { %>
<% } %>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy