Portlet Configuration Icon
Adds custom icons to a portlet’s configuration menu (⚙️ wrench icon).
- Extend portlet functionality (e.g., “Export”, “Settings”).
- Add context-specific actions (e.g., “Refresh Data”).
Implementation
Section titled “Implementation”Create the Module
Section titled “Create the Module”blade create -t portlet-configuration-icon export-iconDefine the Icon
Section titled “Define the Icon”@Component( property = { "javax.portlet.name=" + MyPortletKeys.MY_PORTLET, // Target portlet "path=-", // Shows in the main config menu "icon=download" }, service = PortletConfigurationIcon.class)public class ExportIcon implements PortletConfigurationIcon { @Override public String getMessage(Locale locale) { return "Export Data"; }
@Override public String getURL( PortletRequest portletRequest, PortletResponse portletResponse ) { return "/export-data"; // Triggers export logic }}Use Cases
Section titled “Use Cases”- Data Export: CSV/PDF generation.
- Custom Settings: Portlet-specific configurations.