Share this page

# nca_java_delete_name

Java Object Functions

Deletes the saved property name in the Java object.

    int nca_java_delete_name( LPCSTR name, LPCSTR property_name );

name | The name of the java object
property_name | The name of the property field within the java object

Use nca_java_delete_name to delete the memory used to store properties saved by VuGen when recording Java objects. VuGen only saves Java objects when the JAVA_SAVE_PROP option in nca_java_set_option is enabled.

This and other nca_java functions can be sent to the server as a single packet by wrapping the set of nca_java calls with nca_step_begin and nca_step_end functions.

## Return Values

Oracle NCA Error Codes

## Parameterization

Parameterization is not available for this function.

## Example

In the following example, a Java object appears and its fields are filled after the button press CONTROL_B_OK_COURT_0. The name of the Java object is CONTROL_BN_SESSION_VALIDATION_0 and its properties and their values (taken from the recording log) are as follows:

    Server Message Properties: action=2 handlerClassId=0x10F handlerId=84
    property=402 type=0xE008 value=Message
    Sub Message Properties: action=2 handlerClassId=0x10F handlerId=84
    property=403 type=0x4000 value="sessionId"
    property=404 type=0x4000 value="381"
    property=403 type=0x4000 value="sessionType"
    property=404 type=0x4000 value="A"
    property=403 type=0x4000 value="traceMask"
    property=404 type=0x4000 value="0"

The handlerClassId field identifies it as a Java object. The first property is sessionId and its value is "381". The example retrieves the sessionId value from the object.

At the end of the session nca_java_delete_name deletes the property and value from the Java object.

Copy code

    char *java_value;

    nca_java_set_option(JAVA_SAVE_PROP, 1);
    nca_java_set_option(JAVA_SEPARATOR, '#');
    nca_set_window("Libra");

    /* The Java object is created after the call to nca_menu_select_item */
    nca_menu_select_item("Libra", "Results;Confirm Sessions");
    nca_button_set("CONTROL_LIST_TYPE_R_ADMIN_0",1);
    nca_button_press("CONTROL_BUT_FROM_DATE_0");
    nca_set_window("Calendar");
    nca_button_press("CALENDAR_OK_0");
    nca_set_window("Session Confirmation");

    /* The Java object's fields are created after this operation */
    nca_button_press("CONTROL_B_OK_COURT_0");

    /* Get one the Java object's properties - the session id */
    nca_java_get_value_ex("CONTROL_BN_SESSION_VALIDATION_0", "sessionId", java_value);

    lr_output_message("value=%s", java_value);
    nca_java_delete_name("CONTROL_BN_SESSION_VALIDATION_0", "sessionId");

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: