Hi all,

I have a set of panels with a set of datasources considered as a module. When I open it two or more times using tabpanel, only the lastly opened tabpanel has datasources available. Other panels are available and open but no datasource present. They are empty.

I am trying to manage a single module at design time and open it multiple times with different parameters. For example, I have a single design for JV screen. And at runtime I need to open it as different screens under different menu items like Receipt JV, Payment JV etc. The difference is managed using separate parameters for each screen. The parameter is used for filtering the data, hiding/unhiding of columns etc. During implementation if a company ask for a new type of JV, I do not need to go to the design mode but can simply make it available during runtime by setting up appropriate parameters and menu item. This is the way I used to work with oracle forms. I have a single JV screen designed but more than eight types of runtime JVs for the users with the facility to add more at runtime dynamically.

Hope I have explained the scenario properly. Please try to help. This is very important.


asked 06 Apr '13, 07:17

George's gravatar image

accept rate: 0%

Hi George,

How do you achieve this in Oracle Forms? I guess you have a single form (JV for example) and each time a different menuitem is selected, you use open_form or call_form built-in to run a runtime JV. Is this right? Are multiple types of JVs accessible at the same time or a JV screen must be closed before opening another one?

Can you also please describe your problem in Formspider and what you can't achieve?


(08 Apr '13, 05:12) Ibrahim Sand... ♦♦

Hi Ibrahim,

As you told, we use open_form/call_form built-in. In oracle there is a way to open same form multiple times. The method is to minimize the running form and open a new from from the menu. It is possible because each form is separate module and stored as a separate diskfile. Further, each can run on separate oracle session. Therefor, there is no clash as one is not aware of the existence of the other running forms.

Though this is available we are not using it. We permit the users to open only one form at time. The menu is hidden until the running form is closed.


(09 Apr '13, 14:40) George

But in Formspider I like to use the tabpanel with the facility to open multiple forms. But when same form has to be opened multiple times I see two solutions:

  1. Permit users to open only one type of JV at a time.
  2. Open another JV in a new browser tab page without the main menu etc.

If you can give a little code as to how these can be achived it will be a great help.


(09 Apr '13, 14:41) George

Hi George,

I will try to explain how to implement both solutions:

Permit users to open only one type of JV at a time:
When a JV menu item is selected from the menu, open your JV form by adding a new tab to your tabbed panel. To disallow the opening of another JV, you can disable all JV menu items using the api_menuBar.setMenuItemEnabled API and enable them back when the JV tab is closed by the user(you can use api_tabbedPanel.getClosedTabName API in the preTabClosed event of the tabbedPanel to retrieve the name of the closed tab).

As an alternative solution, you can keep the JV menu items always enabled and check whether a JV tab is already open or not when a JV menu item is selected by the user. If a JV tab is already open, you may warn the user. You can use the following function to check whether a tab with the given name exists in the specified tabbedPanel:

function tabExists(in_tabbedPanelName_tx varchar2, in_tabName_tx varchar2) return varchar2 is
  v_tabOrder_nr number;
  v_tabOrder_nr := api_tabbedPanel.gettaborder(in_tabbedPanelName_tx, in_tabName_tx);
  return 'Y';
  when api_exception.e_invalidTabName then
    return 'N';

Remember that each time you will open the JV tab, you have to reset the JV panel back to the design-time setup (reset all attributes which can be modified by the parameters) before applying the changes brought by the JV type:

procedure openJVForm(in_type_cd varchar2) is
  resetJVPanel; --> reset JV panel back to design-time setup
  applyJVParameters(in_type_cd); --> apply parameters following type of JV 
  api_tabbedPanel.addtab... --> add JV panel to the tabbedPanel

Open another JV in a new browser tab page:
To achive this, you can run your application by adding a token parameter as bookmark to the end of the application URL. You amy generate this random token string dynamically and store it in a db table where you will also store other parameters like JV type, user info.. etc. To open an application in a new browser tab, you should use api_application.run API by setting _blank as in_browserwindowname_tx parameter.

procedure runJVInNewBrowserTab(in_type_cd varchar2) is
  v_token_tx varchar2(4000);
  v_token_tx := createToken(in_type_cd);
  api_application.run(in_weblink_tx => api_application.getbaseurl || 'main.html?name=yourAppName' || '#' || v_token_tx,
                      in_browserwindowname_tx => '_blank');

Remember that while creating a Formspider action for the procedure above, you should check "Allow Popups" checkBox since the api_application.run is used.

You can consume and use the bookmark token in the postOpen event of the application. You can retrieve the bookmark string using the api_application.getBookmark API.

procedure postOpen is
  v_token_tx  varchar2(4000);
  v_type_cd   varchar2(255);
  v_token_tx := api_application.getbookmark;
  if isValidToken(v_token_tx) = 'Y' then
    v_type_cd := consumeToken(v_token_tx); --> retrieve JV type and delete token
    openJVForm(v_type_cd); --> display JV Form
  end if;

Hope this helps,


answered 10 Apr '13, 07:29

Ibrahim%20Sandalli's gravatar image

Ibrahim Sand... ♦♦
accept rate: 25%

Hi Ibrahim,

Thank you for your detailed explanation. I will try both options. I am not using formspider menu. I have designed a menu structure with three types of menus. Tree menu, Favorites menu and Recently opened menu. Therefore disabling the menu is not very easy. I will try the other option.


(11 Apr '13, 01:51) George
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 06 Apr '13, 07:17

Seen: 2,370 times

Last updated: 11 Apr '13, 01:51

© Copyright Gerger 2017