This content has been marked as final. Show 25 replies
You mean something like what Roel have post ?
Edited by: jarola on Nov 4, 2010 11:44 AM
And one way is do your process stuff in validation.
e.g. create validation "Function Returning Boolean" and code something like
In exception handler you can e.g. also log errors to table
DECLARE l_value VARCHAR2(32700); BEGIN /* do here your stuff what you do in process */ /* sample code */ SELECT ename INTO l_value FROM emp WHERE ename = :Px_YOUR_ITEM ; /* something here with value*/ my_stored_procedure(l_value); RETURN NULL; -- If Px_YOUR_ITEM value is not found from emp return this error EXCEPTION WHEN NO_DATA_FOUND THEN RETURN 'Your Item value ' || :Px_YOUR_ITEM || ' not found from employee table.'; -- When unexpected error WHEN OTHERS THEN RETURN 'Some error has occurred. Contact administrator.' END;
Edited by: jarola on Nov 4, 2010 12:04 PM
Yes, something like that. I have tried that method and it didn't work. Some steps were not described very clear.
Instead of mapping error message from database, I want to show the error message (from process) directly. What I did were:
1) Modify the Error Page Template Control in Page Template using:
3) Add a page process GetErrorMessage:
4) I also have another page process which will raise a no_data_found error with customized error message and will be trigged by a button submit.
DECLARE p_error_title varchar2(32767); p_ora_error varchar2(32767); BEGIN p_ora_error := wwv_flow.g_x01; p_error_title := 'Error'; htp.p( p_error_title ||'#'|| p_ora_error ); END;
declare p_id number; begin select id into p_id from tmp_table where id=1; exception when no_data_found then RAISE_APPLICATION_ERROR(-20100,'This is an error message.'); end;
I have not used Roels method, sorry.
Did you check what I edit to my last post ?
Thanks for the solution. It does work fine and I do get dialog. But I need little help, the error(s) also appear on top of notification area.
What should I need to do just to show only "n errors occurred". I would also like to add color (light pink) & mouse over hint like yours.
Your help would be appreciated.
FYI: I am using Apex 4.0 and IE8/FF3.6.
You control inline notification as normally.
I'm not expert on Apex 4. If your item have attribute "Value Required" Yes,
I do not know where switch off that notification are message.
In apex.oracle.com I did set that attribute to No,
and created normal not null validation where you can control that "Error message display location".
I post later tip how highlight fields having error
Thanks very much for your reply.
I have done as you suggested but now dialog is not appearing, instead I only see errors in Notification area.
# Set the Required Value to No
2 errors have occurred * Dname must have some value. * Loc must have some value.
# Created Item Level Not Null validation for Dname & Loc
# Set the Error Message Display Location to - inline Notification
I want to see - 2 errors have occurred in Notification area & Validation error message in dialog.
Set the Error Message Display Location "Inline with field".
In label template remove all what are in "On Error Before Label" source
And "On Error After Label" source replace with something like
ui-state-erro is class from jQuery UI css. I do not know is that class available by default in Apex 4.
It might you need load some extra css file. I do not know and have not check/test that.
Edited by: jarola on Nov 4, 2010 2:54 PM
Edited by: jarola on Nov 4, 2010 3:11 PM
Just one more tip:
You can create HTML region without template to page zero position "After Header".
That way you do not need add those to every page.
Or alternative you can also include those to page template, if you like.
It's all working fine and my query is answered.
Thanks very much for your all help and also giving tip for application point of view.
Regarding jQuery UI css - ui-state-error class is already available by default in Apex 4.
I would like to implement this cool stuff to my exists apex applications, but i have no much skills with APEX and JQuery.
I tried it several times with another examples but without positive result.
It is possible, thet there is something wrong with JQuery configuration in APEX ?
Sorry for my english, but i am only a novice :D
EDIT: I resolve the problem. It was in wrong declaration of the path to jquery ui library.
I have exact same requirement. Did you get solution ? I need to display exception/error messages from pl/sql process rather than validation process otherwise I have to do logic twice.
If you were able to achive that can you please share the solution
Jari, can you teach me how to customize the dialogue box?
For instance, change the title background, add a html cancel and ok button...
Regards, Leandro Freitas.