Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 026b6216c41b3e9e77ca7a836ba1e1401d89d8bb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<!-- **************************************************************************
#
# Copyright  (c) 2004-2009 Oracle Corporation.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors: 
#
#    Kohsuke Kawaguchi
#        
#
#************************************************************************** --> 

<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
  <st:documentation>
    Foldable block expanded when the corresponding item is selected in the drop-down list.

    <st:attribute name="value" use="required">
      value of the list item. set to &lt;option value="...">
    </st:attribute>
    <st:attribute name="title" use="required">
      human readable text displayed for this list item.
    </st:attribute>
    <st:attribute name="selected" type="boolean">
      is this value initially selected?
    </st:attribute>
    <st:attribute name="staplerClass">
      provide hint for stapler data binding.
      typically set to ${descriptor.clazz.name} if dropdownList is for a list of descriptors.
    </st:attribute>
  </st:documentation>
  <j:choose>
    <j:when test="${dropdownListMode=='createSelectField'}">
      <f:option selected="${attrs.selected}" value="${value}">${title}</f:option>
    </j:when>
    <j:when test="${dropdownListMode=='generateEntries'}">
      <!-- sandwich them by markers so that we know what to show/hide -->
      <tr class="dropdownList-start" style="display:none">
        <j:if test="${!empty(attrs.staplerClass)}">
          <td><input type="hidden" name="stapler-class" value="${attrs.staplerClass}"/></td>
        </j:if>
      </tr>
      <d:invokeBody />
      <tr class="dropdownList-end" style="display:none" />
    </j:when>
  </j:choose>
</j:jelly>

Back to the top