hi,
I want to read value forom job configuration page and display it on main
project page (jobMain.jelly). On jenkins mailing list i found something
like that to read value from config page:
public class ApplicationLinkJobProperty extends
> JobProperty<AbstractProject<?,?>> {
>
> public final String applicationLink;
>
> @DataBoundConstructor
> public ApplicationLinkJobProperty(String applicationLink) {
> this.applicationLink = applicationLink;
> }
>
> @Extension
> public static class DescriptorImpl extends JobPropertyDescriptor
> {
> @Override
> public String getDisplayName() {
> return "Application Link";
> }
>
> @Override
> public boolean isApplicable(java.lang.Class<? extends Job>
> jobType) {
> return AbstractProject.class.isAssignableFrom(jobType);
> }
> }
> }
>
And config.jelly:
<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">
<f:entry title="Application Link" field="applicationLink">
<f:textbox />
</f:entry>
</j:jelly>
i was trying to display it in my jobMain.jelly on different way, for
example:
<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">
> There:
> ${instance.applicationLink}
> ${it.applicationLink}
> ${it.getApplicationLink(job)}
> </j:jelly>
>
I have appropriate class that implements Action for jobMain.jelly. Of
course I have those two jelly file in different folders.
Any help will be greatly appreciated.
--
You received this message because you are subscribed to the Google Groups
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-dev/edca5db3-f5f6-4baa-8bd0-1483338d684d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.