//Untested but should be like this:
def st = namespace("jelly:stapler")
st.include(page: "id-and-description", class: descriptor.clazz)
f.optionalBlock(name:_("ssl"), title:_("SSL connection"), checked:
instance.isSsl()) {
f.entry(title:_("Trust"), field:"trust") {
f.textbox()
}
}
On Fri, Apr 21, 2017 at 3:49 PM, pallen <[email protected]> wrote:
> Hi Guys,
>
> I was looking to update some of my jelly code to groovy and not sure how
> to do the following:
>
> <st:include page="id-and-description" class="${descriptor.clazz}"/>
>
>
> This imports the ID and Description for credentials, see original jelly
> <https://github.com/jenkinsci/p4-plugin/blob/master/src/main/resources/org/jenkinsci/plugins/p4/credentials/P4PasswordImpl/credentials.jelly>.
>
>
>
> and set a checked boolean ('isSsl()'):
>
>
> <f:optionalBlock name="ssl" title="${%SSL connection}"
> checked="${instance.isSsl()}">
> <f:entry title="${%Trust}" field="trust">
> <f:textbox/>
> </f:entry>
> </f:optionalBlock>
>
>
>
> f.optionalBlock(name:_("ssl"), title:_("SSL connection")) {
> f.entry(title:_("Trust"), field:"trust") {
> f.textbox()
> }
> }
>
>
> Kind regards,
>
> Paul
>
> --
> 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/d946d214-f593-450f-8b86-c782da430858%
> 40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-dev/d946d214-f593-450f-8b86-c782da430858%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
Robert Sandell
*Software Engineer*
*CloudBees Inc.*
--
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/CALzHZS3pjCoKNfLF2Nf-jrchDeSvBACCb1uM%3D6whu6ATE5387w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.