How to show a message at the top of each page [message #480988] |
Thu, 28 October 2010 23:36 |
BBMamun
Messages: 94 Registered: February 2010 Location: Dhaka, Bangladesh
|
Member |
|
|
Hi, I am looking to launch an application developed in APEX 3.2.1 very soon, the testing and tuning is going on. I have nearly 900 users to use my system. I need to introduce a messaging system so that whenever a new message is there, the system admin will insert it into the database and flag it to publish. The flagged messages will scroll horizontally at the top of each page one after another. Is there any solution, please...
Regards
Hasan Al Mamun
Programmer
Bangladesh Bank
Dhaka, Bangladesh
|
|
|
|
Re: How to show a message at the top of each page [message #481191 is a reply to message #481136] |
Mon, 01 November 2010 11:35 |
BBMamun
Messages: 94 Registered: February 2010 Location: Dhaka, Bangladesh
|
Member |
|
|
My requirement is, to convey a new message for example (The site will be temporarily unavailable next dd.mm.yyyy date from hh.mm am to hh.mm pm)to all 900 users it's best if you make a messaging system so that when ever a new message is there it should scroll at the top of all pages.
Hasan Al Mamun
|
|
|
|
Re: How to show a message at the top of each page [message #481455 is a reply to message #481288] |
Wed, 03 November 2010 10:50 |
BBMamun
Messages: 94 Registered: February 2010 Location: Dhaka, Bangladesh
|
Member |
|
|
Hi, I have somehow solved my problem my way, you can check it out and can provide better solutions as well. I have tested with dept table. say dname are our required messages.
1. Take zero page 0,
2. take an HTML region in page 0, somewhere at the top of the page. Name it as MSG.
3. Take a hidden item 'P0_MSG'.
4. Go to the properties of 'P0_MSG'.
5. Set source type to PL/SQL Function Body
6. Write the following code to convert all dnames into a single string.
------------------------
DECLARE
V_MSG VARCHAR2(100);
i int;
BEGIN
FOR R IN (SELECT DNAME FROM DEPT)
LOOP
V_MSG := V_MSG||' '||I||'.'||R.DNAME;
I := I+1;
END LOOP;
RETURN V_MSG;
END;
------------------------
7.
In Region MSG source write <marquee>&P0_MSG.</marquee>
Then run the page.
I have done it this way. if there is some other way, please have a post here.
|
|
|
|
|
Re: How to show a message at the top of each page [message #481564 is a reply to message #481547] |
Thu, 04 November 2010 04:57 |
c_stenersen
Messages: 255 Registered: August 2007
|
Senior Member |
|
|
Well, you could make the regions on page 0 conditional as well (just use the condition in the region properties), so that it won't always show. Why is apex_application.g_notification or apex_application.g_print_success_message better? I've never used these before but what I have read is that apex_application.g_print_success_message will give you the message on the top as in a regular process success message (with that template). So if OP would like a different style for it he would have to add that as well. http://forums.oracle.com/forums/thread.jspa?threadID=686749. But any success messages from other processes would then also be shown in the same region.
Also this thread tells me that you can't set the apex_application.g_notification yourself: http://forums.oracle.com/forums/thread.jspa?threadID=849217&tstart=0
I've tried it, and the results seem to confirm these two oracle forum entries. But please inform me if I'm wrong.
|
|
|
|
|