Question

I am creating Java Control for XPage using this tutorial. I have successfully created the control but I am unable to set icon for which would show up in the Control palette.

My xsp-config file has the following snippet for icon

<faces-config>
    <...>
    <component>
        <...>
        <icon>
            <small-icon>/icons/icon16.gif</small-icon>
            <large-icon>/icons/icon32.gif</large-icon>
        </icon>
    </component>
</faces-config>

I stored my icons in folder WebContent > WEB-INF > icons. But it did not work. So I created a created icon folder inside src folder (which is where my Java class files are stored and it is added to Java build path) and stored icons there. But that didn't work either. In both cases I get a red square as icon for my control in the palette.

How can I show icons for my Java Control and where the icons be stored for the same?

Était-ce utile?

La solution

Store your icons in folder icons at top level of your project in package explorer. Then, your xsp config file will work and control's icon will show up.

enter image description here

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top