Home » Developer & Programmer » Application Express, ORDS & MOD_PLSQL » How to show a message at the top of each page (Apex 3.2.1 )
How to show a message at the top of each page [message #480988] Thu, 28 October 2010 23:36 Go to next message
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 #481136 is a reply to message #480988] Mon, 01 November 2010 00:58 Go to previous messageGo to next message
Its_me_ved
Messages: 979
Registered: October 2009
Location: India
Senior Member
Search for apex_application.g_notification or apex_application.g_print_success_message

Is this what you are looking for?

Regards
Ved
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 Go to previous messageGo to next message
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 #481288 is a reply to message #481191] Tue, 02 November 2010 05:53 Go to previous messageGo to next message
c_stenersen
Messages: 255
Registered: August 2007
Senior Member
If you want something to occur at all pages you can create a page 0. Whatever is put there will be shown on all pages.
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 Go to previous messageGo to next message
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 #481546 is a reply to message #481455] Thu, 04 November 2010 02:15 Go to previous messageGo to next message
delna.sexy
Messages: 941
Registered: December 2008
Location: Surat, The Diamond City
Senior Member
But this way, it will always show the string of departments on the top.

We can make it conditional whether or not we want to show it.

regards,
Delna
Re: How to show a message at the top of each page [message #481547 is a reply to message #481455] Thu, 04 November 2010 02:22 Go to previous messageGo to next message
delna.sexy
Messages: 941
Registered: December 2008
Location: Surat, The Diamond City
Senior Member
I think, apex_application.g_notification or apex_application.g_print_success_message is the better option in your case as said by Ved.

regards,
Delna
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 Go to previous messageGo to next message
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.
Re: How to show a message at the top of each page [message #481621 is a reply to message #481564] Thu, 04 November 2010 12:50 Go to previous messageGo to next message
BBMamun
Messages: 94
Registered: February 2010
Location: Dhaka, Bangladesh
Member
Hi, Thanks for your suggestions, I think I should try with apex_application.g_notification or apex_application.g_print_success_message. I did not try it before, may be it's worth trying.

Regards

Hasan Al Mamun
Re: How to show a message at the top of each page [message #482887 is a reply to message #481621] Tue, 16 November 2010 11:28 Go to previous message
Its_me_ved
Messages: 979
Registered: October 2009
Location: India
Senior Member
Also, you can do some research to satisfy your needs.

Here is the example:
http://apex.oracle.com/pls/apex/f?p=654321:401:4368973957482806:::::


Regards
Ved
Previous Topic: APEX and BI Publisher
Next Topic: Translate report layouts in APEX
Goto Forum:
  


Current Time: Fri Mar 29 04:33:12 CDT 2024