The sidepanel.jelly of a run already contains a <l:side-panel>, so you would 
have this doubled.
Maybe you can try this like this:


<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:l="/lib/layout" xmlns:st="jelly:stapler">
    <l:layout title="Greeting">
        <st:include page="sidepanel.jelly" it="${it.run}" optional="true" />

        <l:main-panel>
            <h1>
                Name: ${it.name}
            </h1>
        </l:main-panel>
    </l:layout>
</j:jelly>


From: jenkinsci-dev@googlegroups.com <jenkinsci-dev@googlegroups.com> On Behalf 
Of Bob Pokorny
Sent: Donnerstag, 10. August 2023 21:54
To: Jenkins Developers <jenkinsci-dev@googlegroups.com>
Subject: Hello-world plugin example; unable to get side menu to appear

You don't often get email from rcpoko...@gmail.com<mailto:rcpoko...@gmail.com>. 
Learn why this is important<https://aka.ms/LearnAboutSenderIdentification>

Hi there -



I am following the 
Hello-World<https://www.jenkins.io/doc/developer/tutorial/extend/> plug-in 
tutorial and attempting to extend it.  I am following the instructions outlined 
in the documentation; however, I am unable to get the side menu to appear.



This is the code for HelloWorldAction:

package
io.jenkins.plugins.sample;



import
hudson.model.Run;

import
jenkins.model.RunAction2;



public
class HelloWorldAction
implements RunAction2 {



    private
String name;

    private
transient Run
run;



    public
HelloWorldAction(String
name) {

        this.name
=
name;

    }



    public
String getName() {

        return
name;

    }



    @Override

    public
String getIconFileName() {

        return
"document.png";

    }



    @Override

    public
String getDisplayName() {

        return
"Greeting";

    }



    @Override

    public
String getUrlName() {

        return
"greeting";

    }



    @Override

    public
void onAttached(Run<?,
?>
r) {

        this.run
=
run;

    }



    @Override

    public
void onLoad(Run<?,
?>
r) {

        this.run
=
run;

    }



    public
Run getRun() {

        return
run;

    }



}


Here is the index.jelly code:

 <?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:l="/lib/layout" xmlns:st="jelly:stapler">
    <l:layout title="Greeting">
        <l:side-panel>
            <st:include page="sidepanel.jelly" it="${it.run}" optional="true" />
        </l:side-panel>

        <l:main-panel>
            <h1>
                Name: ${it.name}
            </h1>
        </l:main-panel>
    </l:layout>
</j:jelly>

I don't see the build menu on the left as the documentation describes.  I 
continue to only see the greeting.

I am brand new to Jenkins and plug-ins.  I know I have a long way to go to 
learn how to build a robust plug-in, therefore I want to make sure I understand 
why this is not working.

I appreciate your time.

 Thanks,

Bob






--
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 
jenkinsci-dev+unsubscr...@googlegroups.com<mailto:jenkinsci-dev+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/c4ba5df6-a474-4afd-9222-f4985c861197n%40googlegroups.com<https://groups.google.com/d/msgid/jenkinsci-dev/c4ba5df6-a474-4afd-9222-f4985c861197n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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 jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/AS1PR02MB784725A6DF65D46FDA6A31E18713A%40AS1PR02MB7847.eurprd02.prod.outlook.com.

Reply via email to