문제

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?

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top