Issue Type: Bug Bug
Affects Versions: current
Assignee: Unassigned
Components: core
Created: 08/Feb/14 6:45 PM
Description:

I have a Describable called Endpoint, which has the following config.jelly:

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:invisibleEntry title="Protocol" field="protocol">
        <f:textbox value="UDP" />
    </f:invisibleEntry>
    <f:invisibleEntry title="Format" field="format">
        <f:textbox value="JSON" />
    </f:invisibleEntry>
    <f:entry title="URL" description="IP or hostname of the server" field="url">
        <f:textbox/>
    </f:entry>
    <f:entry title="Port" field="port">
        <f:textbox/>
    </f:entry>
    <f:entry>
        <div align="right">
            <f:repeatableDeleteButton />
        </div>
    </f:entry>
</j:jelly>

and a GlobalConfiguration which has a list of Endpoints. The GlobalConfiguration's config.jelly uses repeatableProperty to embed the Endpoint's config.jelly:


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:section>
        <f:entry title="Endpoints" field="endpoints">
            <f:repeatableProperty field="endpoints"/>
        </f:entry>
    </f:section>

</j:jelly>

The resulting JSON which is sent to GlobalConfiguration.configure(..) looks like this:

JSON
{"endpoints":{"endpoints":["UDP","JSON"],"url":"test","port":"3"}}

which obviously isn't correct.

If I change the two invisibleEntry tags to standard Entry tags, then the JSON is correct:

JSON
{"endpoints":{"protocol":"UDP","format":"JSON","url":"test","port":"3"}}
Project: Jenkins
Labels: jelly stapler
Priority: Major Major
Reporter: Ben Fox-Moore
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" 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.

Reply via email to