Usages

This is a new feature in Joget DX 8.2.

The Console Page Plugin is used to add a menu to the admin console and render the added menu page.

Common use cases:

Interface Class

org.joget.plugin.base.ConsolePagePlugin

Interface Methods

getName

public java.lang.String getName()

Unique identifier of the page without spaces. 

getPluginIcon

public java.lang.String getPluginIcon()

The icon used for menu rendering.

getLabel

public java.lang.String getLabel()

The label used for menu rendering.

getOrder

public int getOrder()

The order of the menu. The original page menu has an order with position x 100. eg 100, 200, 300.

getLocation

public org.springframework.beans.factory.parsing.Location getLocation()

The location to render the menu. Either DIRECTORY, MONITOR, or SETTINGS.

isAuthorized

public boolean isAuthorized()

Used to decide whether the current user has permission to see this menu.

render

public java.lang.String render(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)

Return the HTML of the page rendering.

Abstract Class

org.joget.apps.app.model.ConsolePagePluginAbstract

Annotations

Here are examples of how to use the annotations:

@Path({"/form", "/form/{id}"}) public String renderForm(ModelMap map, HttpServletRequest request, HttpServletResponse response, @PathParam("id") String id) throws IOException { //your logic here map.addAttribute("content", content); return "console/popupTemplate"; }


@Path("/list") public void renderListJsonData(HttpServletRequest request, HttpServletResponse response) throws IOException { String callback = request.getParameter("callback"); JSONObject jsonObject = new JSONObject(); //your logic here AppUtil.writeJson(response.getWriter(), jsonObject, null); }

Sample Plugins