Share this page

# nca_java_get_value_ex

Java Object Functions

Retrieves the value of a property of a Java object.

    int nca_java_get_value_ex( LPCSTR name, LPCSTR property_name, LPSTR property_value );

name | The name of the Java object
property_name | The name of the property within Java object name
property_value | The OUT parameter to store the value of the property property_name

nca_java_get_value_ex retrieves the value of the specified property property_name within a Java object.

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:

    Example: 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 following example uses the JAVA_SAVE_PROP option of nca_java_set_option to enable VuGen to save all the values. It then uses nca_java_get_value_ex to retrieve the sessionId value from the object.

    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 Function Reference 26.1 All View Local Help Center View Online Help Center Version: