Merge "Fix build errors in autorelease full clean build"
[vfc/nfvo/wfengine.git] / winery / org.eclipse.winery.repository / src / main / webapp / WEB-INF / tags / relationshiptype / validnodetypeendingsselect.tag
1 <%--
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
9  *
10  * Contributors:
11  *    Oliver Kopp - initial API and implementation and/or initial documentation
12  *******************************************************************************/
13 --%>
14 <%@tag description="Offers choice for valid endings" pageEncoding="UTF-8"%>
15
16 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
17
18 <%@attribute name="shortName" required="true" description="source|target"%>
19 <%@attribute name="currentSelection" required="false"%>
20 <%@attribute name="possibleValidEndings" type="java.util.Collection" %>
21
22
23 <select name="valid${shortName}" onchange="updateValue('valid${shortName}', this.options[this.selectedIndex].value);">
24         <c:choose>
25                 <c:when test="${empty currentSelection}">
26                         <option value="" selected="selected">(all)</option>
27                 </c:when>
28                 <c:otherwise>
29                         <option value="">(all)</option>
30                 </c:otherwise>
31         </c:choose>
32         <c:forEach var="typeId" items="${possibleValidEndings}">
33                 <c:choose>
34                         <c:when test="${currentSelection eq typeId.QName}">
35                                 <c:set var="selected" value=" selected=\"selected\"" />
36                         </c:when>
37                         <c:otherwise>
38                                 <c:set var="selected" value="" />
39                         </c:otherwise>
40                 </c:choose>
41                 <option value="${typeId.QName}"${selected}>${typeId.xmlId.decoded} (${typeId.namespace.decoded})</option>
42         </c:forEach>
43 </select>