Sha256: 5bde784199e6f76eab1a1a29cdd191ddc71b2151b0bf1af3f4836efd2bd2f6c8

Contents?: true

Size: 1.15 KB

Versions: 1

Compression:

Stored size: 1.15 KB

Contents

<c:if test="${not empty errors}">
	<c:forEach items="${errors}" var="error">
		${error.category} - ${error.message}<br />
	</c:forEach>
</c:if>

<form action="<%= path %>" method="post">
  
	<c:if test="${not empty <%= model_parameter_name %>.id}">
		<input type="hidden" name="<%= model_parameter_name %>.id" value="${<%= model_parameter_name%>.id}"/>
		<input type="hidden" name="_method" value="put"/>
	</c:if>

<% @attributes.each do |att| -%>
	<div class="field">
		<%= att.html_label %>:<br />
		<%- if att.type.eql?("references") -%>
		<select name="<%= model_parameter_name %>.<%=att.name%>.id">
		  <c:forEach var="<%=att.name%>" items="${<%=att.name%>List}">
		    <option value="${<%=att.name%>.id}" <c:if test = "${<%= model_parameter_name %>.<%=att.name%>.id == <%=att.name%>.id}">selected="true"</c:if>>
		      ${<%=att.name%>.id}
			</option>
		  </c:forEach>
		</select>
		<%- else -%>	
		<input type="text" name="<%= model_parameter_name %>.<%=att.name%>" value="${<%=model_parameter_name%>.<%=att.name%>}"/>
		<%- end -%>
	</div>
	
<% end -%>
  <div class="actions">
	  <button type="submit">send</button>
	</div>
</form>

<a href="<%= path %>">Back</a>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vraptor-scaffold-1.3.0 lib/vraptor-scaffold/generators/scaffold/template_engine_generator/jsp_generator/templates/form.erb