My Oracle Support Banner

Jdapi Changes Name Of A Forms MenuItem When Setting The Label (Doc ID 2932361.1)

Last updated on AUGUST 10, 2023

Applies to:

Oracle Forms - Version and later
Oracle Forms for OCI - Version and later
Information in this document applies to any platform.


Windows 64-bit 2019

Jdapi changes name of a MenuItem when setting the label

The name of the MenuItem changed to "Label" after calling item.setLabel("LABEL").

Test Case:

Step 1: create a java class
import oracle.forms.jdapi.FormModule;
import oracle.forms.jdapi.Menu;
import oracle.forms.jdapi.MenuItem;
public class PopupMenuTest {
  public static void main(String[] args) {
  final FormModule module = new FormModule("TEST");
  final Menu menu = new Menu(module, "MENU");
  final MenuItem item = new MenuItem(menu, "ITEM_NAME");
  if (!item.getName().equals("ITEM_NAME"))
  throw new IllegalStateException("Error name mismatch: " + item.getName());
  if (!item.getName().equals("ITEM_NAME"))
  throw new IllegalStateException("Error name mismatch: " + item.getName());

Step 2: Compile the java code

Step 3 Then run and receive the following message:

Exception in thread "main" java.lang.IllegalStateException: Error name mismatch: LABEL
at de.siv.core.forms.PopupMenuTest.main(




To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.