Simulation Panel Entry
Adds custom device profiles to Liferay’s Device Simulation panel (used for responsive testing).
- Test how pages render on custom devices (e.g., kiosks, IoT screens).
- Preview themes for specific screen sizes.
Implementation
Section titled “Implementation”Create the Module
Section titled “Create the Module”blade create -t simulation-panel-entry kiosk-deviceDefine the Device Profile
Section titled “Define the Device Profile”@Component(property = "panel.category.key=simulation")public class KioskSimulationPanelEntry implements SimulationPanelEntry { @Override public String getLabel() { return "Kiosk Mode"; }
@Override public Map<String, Object> getSimulationData() { return Map.of( "screenSize", Map.of("width", 1080, "height", 1920), "touch", false, "os", "kioskOS" ); }}Use Cases
Section titled “Use Cases”- Digital Signage: Test full-screen kiosk layouts.
- Custom Hardware: Preview for unusual resolutions.