Skip to main content
aboutsummaryrefslogblamecommitdiffstats
blob: 27ff87573fdc13b68491ffa7251f5e712007a46f (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
















                                                                                
                                  

















                                                                                                                                              
<!-- **************************************************************************
#
# 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>
    Binds an enum field to a &lt;select> element.
    The body of this tag is evaluated for each enum value,
    which is passed as 'it'.

    <st:attribute name="field">
      Used for databinding. TBD.
    </st:attribute>
  </st:documentation>
  <select class="setting-input" name="${field}">
    <j:forEach var="it" items="${descriptor.getPropertyType(instance,field).enumConstants}">
      <f:option value="${it.name()}" selected="${it==instance[field]}">
        <d:invokeBody />
      </f:option>
    </j:forEach>
  </select>
</j:jelly>

Back to the top