Skip to main content
aboutsummaryrefslogblamecommitdiffstats
blob: 874b38e74d7e512f73867dc2b8859faecc741eb1 (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: 
#
#   
#        
#
#************************************************************************** --> 


<?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 a set of Enum to a list of checkboxes, each with the label taken from enum Enum.toString()
    Should be used inside an &lt;f:entry field='...'> element.
    <st:attribute name="field" implicit="true">
      Used for databinding.
    </st:attribute>
  </st:documentation>
  <div name="${field}">
    <j:forEach var="e" items="${descriptor.getPropertyType(instance,field).itemType.enumConstants}">
      <div>
        <input type="checkbox" name="_.${e.name()}" checked="${instance[field].contains(e)?'true':null}"/>
        <label class="attach-previous">${e}</label>
      </div>
    </j:forEach>
  </div>
</j:jelly>

Back to the top