Back Forward Edit Input form
Completing the Java tab

  1. About 
  2. New 
  3. Java 
  4. History 
  5. More... 

Enter the Java code for the edit input rule in this tab. Write the body of a Java class that has two inputs:

The value of itsType corresponds to the Type of the property. It matches one of nine predefined Java constants:
TYPE_TEXT, TYPE_IDENTIFIER, TYPE_PASSWORD, TYPE_DATETIME,
TYPE_DATE, TYPE_TIMEOFDAY, TYPE_TRUEFALSE, TYPE_NUMBER or TYPE_DECIMAL.

In the Java code, convert the initial value to a desired resulting format. If the input value of theValue is already in the correct format, your Java code can return it unchanged.

After you save the Edit Input form, the system appends the statement:

return theValue;

to your source code, and also adds the appropriate class wrapper declarations.

See More about Function rules and Examples — Using inline Java and PublicAPI facilities for additional guidance on Java code you can use here.

Field

Description

Java Source

Enter Java source that converts the value of the string theValue to the desired form, and stores the result in the same variable, theValue.

Your Java source extends the Java class EditInput.

Type your Java directly into the text box, or click
(magnifying glass) to start your workstation Java editor or Notepad. Enter your Java using the editor, then exit completely from the editor to return the edited file to PRPC. See open authoring for instructions on setting up a Java editor.

NoteUse the String.equals() Java method, not the == or != operators, to compare the value of a property to a literal string or to the value of another property.

You can use the normal PRPC syntax to call a function rule:

ruleset_library.FunctionName(arg1, arg2, arg3)

where the RuleSet and library name are in lowercase but the function name is in exact case. For example:

double d_result = pegarules_math.Sqrt("4")

OldIn releases before Version 4.2SP6, a different fully qualified syntax was employed to call function rules; it still executes correctly but is deprecated.

Up About Edit Input rules