Custom Control

From ISV Support Wiki

Custom Control
Jump to: navigation, search

Designer > Data > Objects > {object} > Field > New Field > Display Type > Custom Control

A Custom Control is Component or Page that displays in the GUI.

Types of Custom Controls

There are two types of Custom Controls:

Component
Components are created using HTML and JavaScript. Template variables are used to access record data.
Learn more: Components
Page
Pages are built using HTML and Java. The request object is used to get the objectId and recordId, and additional APIs are used to get record data.

Using a Page as a Custom Control

When a JSP Page is launched from a context that is associated with a particular object record, the request object available in the JSP page contains the identifiers needed to obtain additional information from the record, using either the REST record Resource or the Java record handling APIs.

To obtain record identifiers from the request object:

<%
  String object_id = request.getParameter("object_id");
  String record_id = request.getParameter("record_id");
%>

File:notepad.png

Note: Although the object_id is alphanumeric, it can be used in any API that requires an object name.

To list all of the parameters available in the request object and display their values:

<%
  String[] params = request.getParameterValues();
  for (int i=0; i<params.length; i++)
  {
    String paramName = params[i];
    String paramValue = request.getParameter( paramName );
  }
%>
Views
Categories
Personal tools