Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 64d69c23aad87a2573ff093d1874ddb2c6b7df35 (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
52
53
54
<!-- **************************************************************************
#
# Copyright  (c) 2004-2010 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, Bruce Chapman, Alan Harder
#        
#
#************************************************************************** --> 


<!-- Tomcat doesn't like us using the attribute called 'class' -->
<?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>
    Editable drop-down combo box. Deprecated as of 1.356. Use f:combobox and databinding instead.

    <st:attribute name="clazz">
      Additional CSS classes that the control gets.
    </st:attribute>
    <st:attribute name="items">
      List of possible values. Either this or nested &lt;f:editableComboBoxValue/>s are required.
    </st:attribute>
    <st:attribute name="field">
      Used for databinding.
    </st:attribute>
  </st:documentation>

  <st:once>
    <script type="text/javascript" src="${request.contextPath}/scripts/utilities.js"/>
    <script type="text/javascript" src="${request.contextPath}/scripts/combobox.js"/>
  </st:once>

  <f:prepareDatabinding/>

  <input id="${attrs.id}" autocomplete="off" class="combobox ${attrs.clazz}${attrs.checkUrl!=null ? ' validated' : ''}"
         name="${attrs.name ?: '_.'+attrs.field}"
         value="${attrs.value ?: instance[attrs.field]}"
         checkUrl="${attrs.checkUrl}" />
  <div class="combobox-values">
    <j:if test="${items!=null}">
      <j:forEach var="v" items="${items}">
        <f:editableComboBoxValue value="${v}" />
      </j:forEach>
    </j:if>
    <d:invokeBody />
  </div>
</j:jelly>

Back to the top