Skip to main content
aboutsummaryrefslogblamecommitdiffstats
blob: 66cd05750e29c91379bf64af6487bb04feb9e116 (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>
    Generate config pages from a list of Descriptors into a section.

    <st:attribute name="title" use="required">
      Human readable title of the section to be rendered in HTML.
    </st:attribute>
    <st:attribute name="descriptors" use="required">
      hudson.model.Descriptor collection whose configuration page is rendered.
    </st:attribute>
    <st:attribute name="instance" use="required">
      The currently configured instance used to fill the initial values of the form.
    </st:attribute>
    <st:attribute name="targetType">
      the type for which descriptors will be configured.
      default to ${it.class}
    </st:attribute>
    <st:attribute name="varName" use="required">
      Used as a variable name as well as block name.
    </st:attribute>
  </st:documentation>

  <j:set var="targetType" value="${attrs.targetType?:it.class}"/>
  <f:section title="${attrs.title}">
    <d:invokeBody />
	  <j:forEach var="d" items="${descriptors}" varStatus="loop">
      <f:radioBlock name="${varName}" help="${d.helpFile}" value="${loop.index}"
        title="${d.displayName}" checked="${instance.descriptor==d}">
        <j:set var="descriptor" value="${d}" />
	      <j:set var="instance" value="${instance.descriptor==d?instance:null}" />
        <f:invisibleEntry>
          <input type="hidden" name="stapler-class" value="${descriptor.clazz.name}"/>
        </f:invisibleEntry>
	      <st:include from="${d}" page="${d.configPage}" optional="true" />
	    </f:radioBlock>
	  </j:forEach>
	</f:section>
</j:jelly>

Back to the top