Hi,
Im not sure, I tried that example and I get the error:
<st:include> No page found 'action.jelly' for class
hudson.model.FreeStyleProject
The <st:include> tag looks like: <st:include page="action.jelly"
optional="false" it="${it.action}" />I wonder if it has something to do with
the class that I return from ${it.action}. The class that I return is the class
defined in the other plugin that extended my extention.
Den tisdagen den 12:e november 2013 kl. 15:10:26 UTC+1 skrev Vivekanand S V:
>
> does
> this<https://groups.google.com/forum/#!searchin/jenkinsci-dev/jelly/jenkinsci-dev/dAkTpUNQOy8/Cvp6O-IbrHkJ>help
> you ?
>
>
> On Tue, Nov 12, 2013 at 7:34 PM, Thomas Åkerlund
> <[email protected]<javascript:>
> > wrote:
>
>> For some reason the call to getActions() does'nt even happen. Is there
>> any concrete examples which are not just an abstract class but an actual
>> implementation of the "load jelly file from another plugin"?
>>
>> Den tisdagen den 12:e november 2013 kl. 14:42:44 UTC+1 skrev slide:
>>>
>>> Try turning optional to false and seeing what error is generated, it can
>>> help determine what you are missing.
>>>
>>>
>>> On Tue, Nov 12, 2013 at 6:34 AM, Thomas Åkerlund
>>> <[email protected]>wrote:
>>>
>>>> I cant seem to get it to work.
>>>> The extension I have, have implemented Action. All overrided methods
>>>> from the Action implementation returns null but the sub-plugin that
>>>> implements my extention has a jelly file named action.jelly. According to
>>>> https://wiki.jenkins-ci.org/display/JENKINS/Action+
>>>> and+its+family+of+subtypes (last section) the action.jelly file should
>>>> be prioritized so the null values should not be a problem.
>>>>
>>>> My config.jelly for my Builder class in my core-plugin looks like:
>>>>
>>>> <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:forEach var="a" items="${it.actions}">
>>>> <st:include page="test.jelly" from="${a}" optional="true" it="${a}" />
>>>> </j:forEach>
>>>> </j:jelly>
>>>>
>>>> I am sorry if I am a bit slow but I cant seem to figure this one out.
>>>>
>>>> Den tisdagen den 12:e november 2013 kl. 09:56:32 UTC+1 skrev Daniel
>>>> Beck:
>>>>>
>>>>> There are numerous examples of this in the Jenkins source code.
>>>>>
>>>>> One is in AbstractBuild's index.jelly, including actions'
>>>>> summary.jelly to the main page of the build:
>>>>>
>>>>> <j:forEach var="a" items="${it.actions}">
>>>>> <st:include page="summary.jelly" from="${a}" optional="true"
>>>>> it="${a}" />
>>>>> </j:forEach>
>>>>>
>>>>> https://github.com/jenkinsci/jenkins/blob/stable/core/src/ma
>>>>> in/resources/hudson/model/AbstractBuild/index.jelly
>>>>>
>>>>> On 12.11.2013, at 09:47, Thomas Åkerlund <[email protected]>
>>>>> wrote:
>>>>>
>>>>> > Hi!
>>>>> >
>>>>> > I have written a plugin that extends Builder. I have then created an
>>>>> extention point for other plugins to use. I want to reference those
>>>>> sub-plugins specific jelly file from the "main-plugins" jelly file. I
>>>>> know
>>>>> how to do a forEach and get the data etc. What I don't know is how to get
>>>>> the path to the specific jelly file in one of the sub-plugins. If I just
>>>>> had the installation path to the plugin I could probably solve it that
>>>>> way.
>>>>> >
>>>>> > So for example, if the AnsiColor plugin was a sub-plugin to my
>>>>> plugin I would want there to be a method in the AnsiColor plugin that
>>>>> would
>>>>> return the file path:
>>>>> > D:\Software\Jenkins\Jenkins Home\plugins\ansicolor\WEB-INF
>>>>> \lib\classes.jar\hudson\plugins\ansicolor\AnsiColorBuildWrapper\sublayout.jelly
>>>>>
>>>>>
>>>>> >
>>>>> > Any suggestions or solutions are 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].
>>>>> > For more options, visit https://groups.google.com/groups/opt_out.
>>>>>
>>>>> --
>>>> 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].
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>
>>>
>>>
>>>
>>> --
>>> Website: http://earl-of-code.com
>>>
>> --
>> 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] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
--
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].
For more options, visit https://groups.google.com/groups/opt_out.