cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Custom Action Block Icon in 12.2

raj44
Participant
0 Likes
226

Hi Everyone,

I am trying to include an Icon for my custom action block. I have included the image in same folder as my class files. Is that right or do I need to include in other folder?

Also, while giving the path of that icon, I'm just providing the file name. Do I need to include the complete path?

For eg:

@Action(name = "ReadData", icon = "icon.png") or @Action(name = "ReadData", icon = "\Folder\Folder\Folder\Folder\icon.png")

Are there any restrictions for  Image types such as jpeg,jpg,fig,png etc regarding image sizes?

Thanks

Rajeev

Accepted Solutions (0)

Answers (2)

Answers (2)

raj44
Participant
0 Likes

Do we have any option to download the jar already deployed as a custom action? I am using MII 12.2 and I don't see any button for that- is there an alternate way?

Former Member
0 Likes

Hi Rajeev,

Both of these ways of including images should work. You should ideally include PNG or GIF files as action icons.

Regards,
Anushree

raj44
Participant
0 Likes

Hi Anushri,

Tried with both- I just get a black square for the action block. Do I need a separate folder as "icons" which will contain the png image?

Regards

Rajeev

Former Member
0 Likes

Hi Rajeev,

Have you tried with '/' instead of '\'?

Regards,

Anushree

raj44
Participant
0 Likes

Hi Anushree,

Yes, I tried with '/' by keeping the icon in "icons" folder and then zipping icons folder with the classes folder and catalog.xml file to generate a single jar, but still the image doesn't load. It just displays a black square as the icon.

Regards

Rajeev

former_member185280
Active Contributor
0 Likes

Try clearing out the java cache on your machine.

raj44
Participant
0 Likes

Doesn't help- is it something to do with the size of image? The image dimensions are 41 pix by 44 pix and the size of the image is 7.25 KB..