Single Article

Nicer APEX Login

Category APEX General Stuff

Everybody thought of a nicer login in APEX web applications. Here is one example on how to make it a bit Nicer. This applies to EPG environment.

If you want to make it working under different environment, please refer to OHS instructions for configuring, or APEX Listener configuration.

You can create procedure like this under some user:

create or replace
PROCEDURE LSPDEMO
AS
BEGIN
f (p=>'lspdemo:login');
APEX_UTIL.SET_SESSION_STATE ('FSP_AFTER_LOGIN_URL');
END;

Give grant to execute this procedure to public and create public synonym for it. Then you can point browser to such url, example: http://actionet.homelinux.net/htmldb/lspdemo.

Do not forget to modify APEX schema wwv_flow_epg_include_mod_local function so that you can execute that procedure in URL:

create or replace
function
wwv_flow_epg_include_mod_local(
procedure_name in varchar2)
return boolean
is
begin
--return false; -- remove this statement when you modify this function
--
-- Administrator note: the procedure_name input parameter may be in
the format:
--
-- procedure
-- schema.procedure
-- package.procedure
-- schema.package.procedure
--
-- If the expected input parameter is a procedure name only, the IN
list code shown below
-- can be modified to itemize the expected procedure names.
Otherwise you must parse the
-- procedure_name parameter and replace the simple code below with
code that will evaluate
-- all of the cases listed above.
--
if upper(procedure_name)
in (
'LSPDEMO'
) then
return TRUE;
else
return FALSE;
end if;
end wwv_flow_epg_include_mod_local;

Now you can also change DAD default page be your procedure (default is apex what points to builder login).

Run this for example under SYS (change accordingly to your DAD name):

BEGIN
dbms_epg.set_dad_attribute('HTMLDB', 'default-page', 'lspdemo');
END;

Now when you point browser to http://actionet.homelinux.net/htmldb/lspdemo your app is opened, instead of APEX builder login page. To list DADs and their paths you can use the following code:

declare
dads dbms_epg.varchar2_table;
paths DBMS_EPG.VARCHAR2_TABLE;
begin
dbms_epg.get_dad_list (
    dads);
for i in 1..dads.count loop
   dbms_output.put_line('DAD: '||dads(i));

   dbms_epg.get_all_dad_mappings (
   dads(i),
   paths);
   for j in 1..paths.count loop
       dbms_output.put_line('path: '||paths(j));
   end loop;
end loop;
end;

Please check MacLochlainns Weblog post Oracle 11g XDB DADs as well.

 

Comment Button

Comments

No comments yet on this article.

Global Right Column

Search

Archives

Subscribe in a Reader