Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorakozak2011-11-24 08:43:43 -0500
committerWinston Prakash2011-12-01 20:47:26 -0500
commitcd71b16352e845e62873a075fea145e13c667f3e (patch)
treec32da27e2b9a88db8cca8076769135ec5620cbc2 /hudson-core/src/main/resources
parent77bb9f3ff736edca879f76f4de3567b6ab7fcfc8 (diff)
downloadorg.eclipse.hudson.core-cd71b16352e845e62873a075fea145e13c667f3e.tar.gz
org.eclipse.hudson.core-cd71b16352e845e62873a075fea145e13c667f3e.tar.xz
org.eclipse.hudson.core-cd71b16352e845e62873a075fea145e13c667f3e.zip
Improve cascadingDescriptorList tag. Improve TriggerProjectProperty
Signed-off-by: Winston Prakash <winston.prakash@gmail.com>
Diffstat (limited to 'hudson-core/src/main/resources')
-rw-r--r--hudson-core/src/main/resources/hudson/triggers/SCMTrigger/config.jelly4
-rw-r--r--hudson-core/src/main/resources/hudson/triggers/TimerTrigger/config.jelly4
-rw-r--r--hudson-core/src/main/resources/lib/hudson/cascadingDescriptorList.jelly61
-rw-r--r--hudson-core/src/main/resources/lib/hudson/project/config-trigger.jelly3
4 files changed, 42 insertions, 30 deletions
diff --git a/hudson-core/src/main/resources/hudson/triggers/SCMTrigger/config.jelly b/hudson-core/src/main/resources/hudson/triggers/SCMTrigger/config.jelly
index 21e25056..90e12102 100644
--- a/hudson-core/src/main/resources/hudson/triggers/SCMTrigger/config.jelly
+++ b/hudson-core/src/main/resources/hudson/triggers/SCMTrigger/config.jelly
@@ -9,14 +9,14 @@
#
# Contributors:
#
-# Kohsuke Kawaguchi, Anton Kozak
+# Kohsuke Kawaguchi, Anton Kozak, Nikita Levyankov
#
#
#************************************************************************** -->
<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">
- <j:set var="instanceProperty" value="${cu.getExternalProjectProperty(it, descriptor.jsonSafeClassName)}"/>
+ <j:set var="instanceProperty" value="${cu.getBaseProjectProperty(it, descriptor.jsonSafeClassName)}"/>
<j:set var="instance" value="${instanceProperty.getValue()}"/>
<f:entry title="${%Schedule}" help="/descriptor/hudson.triggers.TimerTrigger/help/spec" isPropertyOverridden="${instanceProperty.isOverridden()}">
diff --git a/hudson-core/src/main/resources/hudson/triggers/TimerTrigger/config.jelly b/hudson-core/src/main/resources/hudson/triggers/TimerTrigger/config.jelly
index bf188862..515e7621 100644
--- a/hudson-core/src/main/resources/hudson/triggers/TimerTrigger/config.jelly
+++ b/hudson-core/src/main/resources/hudson/triggers/TimerTrigger/config.jelly
@@ -9,14 +9,14 @@
#
# Contributors:
#
-# Kohsuke Kawaguchi, InfraDNA, Inc., Anton Kozak
+# Kohsuke Kawaguchi, InfraDNA, Inc., Anton Kozak, Nikita Levyankov
#
#
#************************************************************************** -->
<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">
- <j:set var="instanceProperty" value="${cu.getExternalProjectProperty(it, descriptor.jsonSafeClassName)}"/>
+ <j:set var="instanceProperty" value="${cu.getBaseProjectProperty(it, descriptor.jsonSafeClassName)}"/>
<j:set var="instance" value="${instanceProperty.getValue()}"/>
<f:entry title="${%Schedule}" field="spec" isPropertyOverridden="${instanceProperty.isOverridden()}">
<f:textarea />
diff --git a/hudson-core/src/main/resources/lib/hudson/cascadingDescriptorList.jelly b/hudson-core/src/main/resources/lib/hudson/cascadingDescriptorList.jelly
index b15b8457..3fce5573 100644
--- a/hudson-core/src/main/resources/lib/hudson/cascadingDescriptorList.jelly
+++ b/hudson-core/src/main/resources/lib/hudson/cascadingDescriptorList.jelly
@@ -14,30 +14,41 @@
#
#************************************************************************** -->
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:f="/lib/form">
- <st:documentation>
- Generates config pages from a list of Descriptors into a section. Tag is based on cascading functionality.
- <st:attribute name="title">
- 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:documentation>
+ <st:documentation>
+ Generates config pages from a list of Descriptors into a section. Tag is based on cascading functionality.
+ <st:attribute name="title">
+ 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="projectPropertyClass">
+ ProjectProperty class that will be used for creating project property instance
+ based on hudson.util.CascadingUtil.getProjectProperty method. Default value is
+ org.hudsonci.model.project.property.ExternalProjectProperty.class.
+ </st:attribute>
+ </st:documentation>
- <j:set var="targetType" value="${it.class}"/>
- <j:if test="${!empty(descriptors) or context['org.apache.commons.jelly.body']!=null}">
- <f:section title="${attrs.title}" name="${attrs.name}">
- <d:invokeBody/>
- <j:forEach var="descriptor" items="${descriptors}">
- <j:set var="instanceProperty" value="${cu.getExternalProjectProperty(it, descriptor.jsonSafeClassName)}"/>
- <j:set var="instance" value="${instanceProperty.getValue()}"/>
- <f:optionalBlock name="${descriptor.jsonSafeClassName}" help="${descriptor.helpFile}"
- title="${descriptor.displayName}" checked="${instance!=null}"
- resetUrl="${jobUrl}/resetProjectProperty?propertyName=${descriptor.jsonSafeClassName}"
- isPropertyOverridden="${instanceProperty.isOverridden()}">
- <st:include from="${descriptor}" page="${descriptor.configPage}" optional="true"/>
- </f:optionalBlock>
- </j:forEach>
- </f:section>
- </j:if>
+ <j:set var="targetType" value="${it.class}"/>
+ <j:if test="${attrs.projectPropertyClass==null}">
+ <j:set var="attrs.projectPropertyClass"
+ value="${org.hudsonci.model.project.property.ExternalProjectProperty.class}"/>
+ </j:if>
+ <j:if test="${!empty(descriptors) or context['org.apache.commons.jelly.body']!=null}">
+ <f:section title="${attrs.title}" name="${attrs.name}">
+ <d:invokeBody/>
+ <j:forEach var="descriptor" items="${descriptors}">
+ <j:set var="instanceProperty"
+ value="${cu.getProjectProperty(it, descriptor.jsonSafeClassName, attrs.projectPropertyClass)}"/>
+ <j:set var="instance" value="${instanceProperty.getValue()}"/>
+ <f:optionalBlock name="${descriptor.jsonSafeClassName}" help="${descriptor.helpFile}"
+ title="${descriptor.displayName}" checked="${instance!=null}"
+ resetUrl="${jobUrl}/resetProjectProperty?propertyName=${descriptor.jsonSafeClassName}"
+ isPropertyOverridden="${instanceProperty.isOverridden()}">
+ <st:include from="${descriptor}" page="${descriptor.configPage}" optional="true"/>
+ </f:optionalBlock>
+ </j:forEach>
+ </f:section>
+ </j:if>
</j:jelly>
+
diff --git a/hudson-core/src/main/resources/lib/hudson/project/config-trigger.jelly b/hudson-core/src/main/resources/lib/hudson/project/config-trigger.jelly
index b85885db..25a9565a 100644
--- a/hudson-core/src/main/resources/lib/hudson/project/config-trigger.jelly
+++ b/hudson-core/src/main/resources/lib/hudson/project/config-trigger.jelly
@@ -23,7 +23,8 @@
<j:invokeStatic var="triggers" className="hudson.triggers.Trigger" method="for_">
<j:arg value="${it}" type="hudson.model.Item" />
</j:invokeStatic>
- <t:cascadingDescriptorList title="${%Build Triggers}" descriptors="${triggers}">
+ <t:cascadingDescriptorList title="${%Build Triggers}" descriptors="${triggers}"
+ propertyClass="${org.hudsonci.model.project.property.BaseProjectProperty.class}">
<d:invokeBody />
<!-- pseudo-trigger to configure URL to trigger builds remotely. -->
<st:include page="/hudson/model/BuildAuthorizationToken/config.jelly" />

Back to the top