a few years ago I asked the same question but I got no suitable answer for my problem:
I have to build a dynamic help text for diaplayed items (bubble help or better popup window). When I go to an Item Header there is a ? displayed and when I click on the left mouse button there will be a constant text displayed. Now I have a table with explanation (build on the documentation of the table) for each column on each page. So I want to start a SQL-Statement when I click the button and the text should be displayed in the popup window.
Is there an example anywhere or can anybody help me otherways?
I am not familiar with AJAX and ajax apis.
If I put my mouse over the label of a column like "Name" for column ename and click on this label can I activate a dynamic action? Must I build a dynamic action on the region? And what is there to do? How can I know on which label is the click?
Please help me again
Here's an old post, but still works, https://community.oracle.com/message/1464878#1464878
this solution requires no ajax, but you must create a shadow item for each item to hold the value of the help text, and populate the shadow item with a sql when page loads.
ajax solution will require a few things
1, Create an application item called "dynamic_help_text" for example.
2, Let's say, for a textfield P1_TEXT, set header to have a onclick call to pass in a variable,
e,g, lable -- <span onclick="onclick="getItemHelpText('#CURRENT_ITEM_NAME#');">test</span>
Can also use #CURRENT_ITEM_ID# if you want, the #CURRENT_ITEM_NAME# should be unique in apex app any way and more readable..
var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=getItemHelpText',&APP_PAGE_ID.);
get = null;
4. create on demand process in shared components, named "getItemHelpText" to get the help text for this item and assign the value to application item.
-- replace this query with your real dynamic query put apex_application.g_x01 into where condition
-- e.g -- select help_text from custom_table into :dynamic_help_text where item_name = apex_application.g_x01;
select 'help text: '||apex_application.g_x01 into :dynamic_help_text from dual where 1=1;
5, in help text section of the item put &dynamic_help_text.
6, run the page, make sure the item has an template 'Optional lable with help' or 'Required lable with help', click on the labl after page loaded, the results for this example should be help text in a popup window says "help text: P1_TEXT"
There, you have a dynamic help text for P1_TEXT based on dynamic sql result from step 4.
Modify the Ajax interface and on demand process steps 3&4 to handle more parameters if you need more complex query to work our the help text. hope not, how complex help text has to be ... hahaha..
thank you for your good answer but where should I put
I mad a demo application with your solution without specifying a special help, only to test the result. If you want to have a look on it
start with page 40, select one and use P41_ENAME as test object.
Please help me again!
Thank you very much
in the label field put <span onclick="getItemHelpText('#CURRENT_ITEM_NAME#');">Employ Name</span>
i can't edit it for you as a guest user in your app.
if you are using dynamic help text on lots of items, better put the onclick call in the template, and the function on page0
e,g update Optional Label with Help template before label field to
fixed for you, changes are:
that's all I think, tested worked.
good luck with the rest..