2 /*******************************************************************************
3 * Copyright (c) 2012-2013 University of Stuttgart.
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * and the Apache License 2.0 which both accompany this distribution,
7 * and are available at http://www.eclipse.org/legal/epl-v10.html
8 * and http://www.apache.org/licenses/LICENSE-2.0
11 * Oliver Kopp - initial API and implementation and/or initial documentation
12 *******************************************************************************/
14 <%@tag description="Offers choice for valid endings" pageEncoding="UTF-8"%>
16 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
18 <%@attribute name="shortName" required="true" description="source|target"%>
19 <%@attribute name="currentSelection" required="false"%>
20 <%@attribute name="possibleValidEndings" type="java.util.Collection" %>
23 <select name="valid${shortName}" onchange="updateValue('valid${shortName}', this.options[this.selectedIndex].value);">
25 <c:when test="${empty currentSelection}">
26 <option value="" selected="selected">(all)</option>
29 <option value="">(all)</option>
32 <c:forEach var="typeId" items="${possibleValidEndings}">
34 <c:when test="${currentSelection eq typeId.QName}">
35 <c:set var="selected" value=" selected=\"selected\"" />
38 <c:set var="selected" value="" />
41 <option value="${typeId.QName}"${selected}>${typeId.xmlId.decoded} (${typeId.namespace.decoded})</option>