using repeatable inside a form

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

using repeatable inside a form

Rene Fiedler
This post has NOT been accepted by the mailing list yet.
Hi,
at first I am new to Hudson ( plugin development ).

I am trying to integrate Robot Framework (and our Bugtracking System,..)  into Hudson  and adjust that to our ( existing ) buildsystem.
Because that involves a couple of modifications, we want to have a central configuration - so I extended ManagementLink ( which sadly is no Describeable).

At first I made a section to configure so called "Tags" as a  repeatable, which works fine.
But when I  embedd everything in a form with a submit-Button( in order to be able to save all) , the "Add"-Button of the repeatable does not seem to work - nothing happens when its clicked.
Without the form, everything works smoothly.

Is there a way to add a Button to that page ?
I also tried a validateButton, but it seems that there has to be a descriptor in order to work:

Stapler processed this HTTP request as follows, but couldn't find the resource to consume the request
-> evaluate(<hudson.model.Hudson@39304e60> :hudson.model.Hudson,"/descriptor/submit")
-> evaluate(((StaplerProxy)<hudson.model.Hudson@39304e60>).getTarget(),"/descriptor/submit")
[...]
No matching rule was found on <hudson.model.Hudson$DescriptorImpl@72e8cc94> for "/submit"
[...]
Like I said, ManagementLink is no Describeable, so I have no Descriptor.

Btw: Is there something to consider when using <j:invokeStatic className=........ method=.... /> ?
  I actually wanted to make the first two lines of the following code invokeStatic instead of invoke. But I always got a ClassnotfoundException, although the Classname is correct ( I have it checked plenty of times) . At first I tried debugging the jelly-code, but debugging something which uses reflect is ***** , after a couple of hours I gave up.
 
With kind regards.

Rene


Here is index.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">
   
    <j:invoke var="tagtypes"   on="${it}"  method="getTagTargets"/>
    <j:invoke var="tagtargets" on="${it}"  method="getTagTypes"/>
   
    <l:layout permission="${app.ADMINISTER}" norefresh="true">
        <st:include it="${app}" page="sidepanel.jelly"/>
        <l:main-panel>
           
            <f:repeatable name="formData" var="tag" items="${it.stgTags}"  add="Add Tag" minimum="1">
                                            <f:entry title="Target">
                            <select class="setting-input" name="target">
                                <j:forEach var="item" items="${tagtargets}" >
                                    <f:option value="${item}" selected="${item == tag.tagTarget}">${item}
                                    </f:option>
                                </j:forEach>
                            </select>
                        </f:entry>
                        <f:entry title="Type">
                            <select class="setting-input" name="type">
                                <j:forEach var="item" items="${tagtypes}">
                                    <f:option value="${item}">${item}
                                    </f:option>
                                </j:forEach>
                            </select>
                        </f:entry>
                        <f:entry title="Label">
                            <f:textbox name="label" value="${tag.label}" />
                        </f:entry> 
               
                    <f:entry title="DefaultValue">
                        <f:textbox name="defaultValue" value="${tag.defaultValue}" />
                    </f:entry>
                <f:entry title="">
                    <div align="right">
                        <f:repeatableDeleteButton value="Delete Tag"/>
                    </div>
                </f:entry>
               
               
           
            </f:repeatable>
           
           
        </l:main-panel>
    </l:layout>
</j:jelly>

 
Reply | Threaded
Open this post in threaded view
|

RE: using repeatable inside a form

martin.loiselle@medrium.com
This post has NOT been accepted by the mailing list yet.
On vacation:
I will be out of the office starting the Dec. 23rd and
will return on January 10.

for any problem related to your email or computer, please send an email to [hidden email].

For any emergency, call at 1-418-264-6911
Reply | Threaded
Open this post in threaded view
|

Re: using repeatable inside a form

Rene Fiedler
In reply to this post by Rene Fiedler
It works....

I honestly donĀ“t why it did not work the last time ( I think a nested the table wrong).

Best regards

Rene

Btw: I think the Wiki-Page "Checking out existing plugins" (http://wiki.hudson-ci.org/display/HUDSON/Checking+out+existing+plugins ) should refer ( only ) to github, because a couple of plugins I did not find in the svn. When I first read this page I thought github is a mirror of the svn.


Reply | Threaded
Open this post in threaded view
|

RE: Re: using repeatable inside a form

martin.loiselle@medrium.com
This post has NOT been accepted by the mailing list yet.
On vacation:
I will be out of the office starting the Dec. 23rd and
will return on January 10.

for any problem related to your email or computer, please send an email to [hidden email].

For any emergency, call at 1-418-264-6911