Code snippets

Snippets are code objects that are reusable programming objects. Snippets can be a piece of code or a complete programming task. In addition to the default snippets provided in the workbench, you can create your own snippets.

The Snippets view provides access to the snippets available for use. The Snippets view contains several pieces of EGL code, as well as code for many other technologies. The following table lists the snippets that are available in EGL.

Table 1. Snippets available in EGL
Snippet name Description
Set cursor focus (JSP) A JavaScript function that sets the cursor focus to a specified form field on a web page. See Setting the focus to a form field.
Auto redirect (JSP) A JavaScript function that tests for the presence of a session variable. If the session variable is not present, it forwards the browser to a different page. See Testing browsers for a session variable.
Get clicked row value An EGL function that retrieves the hyperlinked value of a clicked row in a data table. See Retrieving the value of a clicked row in a data table.
database update An EGL function that updates a single row of a relational table when passed a record from a JSF Handler. See Updating a row in a relational table.

Feedback