Dictionary/webroot/jsp/termForm.jsf

47 lines
1.8 KiB
Text

<%@ page buffer="512kb" autoFlush="false" import="org.thdl.lex.*,org.thdl.lex.component.*" errorPage="/jsp/error.jsp" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<!--termForm.jsf-->
<c:out value='<a name="${ component }" ></a>' escapeXml="false" />
<c:choose>
<c:when test="${ ! empty param.formMode && param.formMode == 'insert'}">
<c:set var="updateMode" value="${ false }" />
<c:set var="newCmd" value="insertTerm" />
<c:set var="term" value="${ component.term }" />
<c:set var="metaId" value="" />
<%-- <c:set var="precedence" value="1" /> --%>
</c:when>
<c:when test="${ ! empty param.formMode && param.formMode == 'update'}">
<c:set var="updateMode" value="${ true }" />
<c:set var="newCmd" value="updateTerm" />
<c:set var="term" value="${ component.term }" />
<c:set var="metaId" value="${ component.metaId }" />
<%-- <c:set var="precedence" value="${ component.precedence }" /> --%>
</c:when>
<c:otherwise>
<c:set var="updateMode" value="${ false }" />
<c:set var="newCmd" value="" />
<c:set var="term" value="ERROR" />
<%-- <c:set var="precedence" value="ERROR" /> --%>
</c:otherwise>
</c:choose>
<form id="newCompForm" action="/lex/action" method="post" >
<p>
<input type="hidden" name="comp" value="term" />
<c:if test="${ updateMode }">
<c:out value='<input type="hidden" name="metaId" value="${metaId}" />' escapeXml="false" />
</c:if>
<c:out value='<input type="hidden" name="cmd" value="${newCmd}" />' escapeXml='false' />
Term: <c:out value='<strong>${ term }</strong> Edit Term: <input type="text" value="${ term }" name="term" />' escapeXml='false' />
<br />
<%-- <c:out value='<input type="hidden" value="${ precedence }" name="precedence" size="3"/>' escapeXml='false' /> --%>
<jsp:include page="metaForm.jsf" />
<input type="submit" value="Submit Term" />
</p>
</form>