First integreation of the ApexLib Framework in a public APEX application
Great to see that the ApexLib Framework also works in another application than in my protected environment.
Thanks Dimitri for trying out!
Labels: ApexLib
Saturday, December 30, 2006First integreation of the ApexLib Framework in a public APEX applicationGreat to see that the ApexLib Framework also works in another application than in my protected environment. Thanks Dimitri for trying out! Labels: ApexLib Friday, December 29, 2006An interesting technique to get attention...
Tom Kyte just called my attention to the following posting.
I like the idea. My teachers should have used that technique in my school time, too! I will not start to include lies into my blog postings :-), but I also like the conclusion of the posting. I don't consider me an APEX expert, that's why always crosscheck what you are reading in my blog and if you find some misinformation or doubts about what I write, please let me know! Discussions makes life much more interesting! :-) Wednesday, December 27, 2006Spread of APEX
A year ago Bernhard Fischer-Wasels blogged about how many APEX application pages he found with Google (search for inurl:/pls/htmldb). On the 23-Dec-2005 he found about 19.000 entries.
How many do you thing do we find 1 year later? Guess... Google finds 162.000 entries!!! What an increase! How many do you guess do we have next year? :-) Friday, December 22, 2006ApexLib: Some bugs fixed
Just have uploaded release v0.13 of the ApexLib Framework.
It contains the following bugfixes:
Labels: ApexLib ApexLib Framework - How to Integrate
I thought it's time to put all the steps which are required to integrate the ApexLib Framework from the different postings into one integrated instruction. Makes it much easier when you use the framework for the first time.
Read the newest version of the How To Integrate document in the SVN repository. Note: The above version shows the most current version of the document which may already contain steps for features which have not been released yet. When you integrate the Framework into your application, always use the version of the document which is provided in the zip-file! Labels: ApexLib Thursday, December 21, 2006Hacking and hardening Oracle XE
Just read Pete Finnigan's Oracle security blog where he is pointing to the very interesting presentation Hacking and Hardening Oracle Express Edition done by Red Database Security at the UKOUG 2006.
Everybody who is deploying his APEX application on Oracle XE should read that! Quick overview
The following overview, lists the postings I have done so far. I think it gives a better start what has already been posting, then going through the monthly archive pages of the blog. If you like this blog you may want to subscribe with your RSS reader (eg Google Reader, ...) so that you get informed when there is a new posting. Never heard of RSS? Read my related posting.
Note: Postings which are outdated are not included in the overview. Last update of the list: 27-Jan-2008
Wednesday, December 20, 2006Oracle 11g PL/SQL enhancements
Just read an interesting posting on Igor's Oracle Lab about the planned PL/SQL enhancements in Oracle 11g. I really like some of the planned features. Want to get the full story? Check out the presentation done by Tom Kyte.
Labels: Oracle 11g beta, Other blogs, pl/sql Update: Hacking the APEX error page
Thanks to Andree who found an error in my description for the Hacking the APEX error page.
Seems that I screwed something up when I last updated the posting. <script language="javascript" type="text/javascript"> Should be <script language="javascript" type="text/javascript"> Thanks to Andree who informed me about that! Tuesday, December 19, 2006Hacking the APEX error page - Part 2! Do you want to have highlighting for the tabular form column cells which have an error? Then you should read the rest of the posting!I have enhanced the original Hacking the APEX error page code (the original posting has been updated) and created a new package ApexLib_Error which can be used to "raise" errors in a process or validation process when you process your tabular form values. The advantage of this package is that it allows you to provide the column and row number when you raise an error. When the error message is displayed above the tabular form region, all the column cells which are related to an error are highlighted. Check out the updated Enhanced Tabular Form with column cell highlighting example. This new package enhances the existing Plug & play tabular form handling solution. You have different possibilities to use the new package. It has methods which can be used in validation process of type Function Returning Error Text and PL/SQL error. If you use it in a process you always have to use the raise* interface. Let's do some examples: Create a page validation with the following settings
What does this code do? It puts to errors onto an error stack, the first call identifies the column by the name (works only for updateable tabular forms) and the error text is hard coded, but with placeholders. The second call uses a defined text message (Shared Components/Text Message) and identifies the column with the fxx syntax (in the case if you know to which HTML form item the column is mapped to). At the end of the validation process the error stack is returned to APEX. If no error is on the stack, nothing is returned. So this statement should always be the last statement in your validation process! Let's do another example! Create a page validation or process with the following settings
Same as the above example, the difference is at the end of the code. Instead of returning the error stack we raise it with an RAISE_APPLICATION_ERROR so that APEX can capture it. This method of adding errors to the stack, allows you that you can also have multiple errors. Another example Same as above, but this time with the following code:
This will immediately abort processing and the error is returned to APEX. For a real world example check out the Plug & play tabular form handling posting. The code has been tested with Firefox 2.0 and IE 7.0. Where do I get the source code? I have started a new SourceForge project, get the source code there. Have questions? Don't hesitate to write me a note! Update Fixed an issue with Internet Explorer. Labels: ApexLib, error, tabular form Monday, December 18, 2006Speedup of cascading AJAX lovs
I have implemented a small improvement into my Generic solution for cascading lovs.
If you have a hierarchy of cascading lovs as I have it on my example page, the old version did an AJAX call for all cascading lovs and there cascading lovs, ... each time a value was selected. But normally these calls will always result in an empty select list, because the value of the parent lov hasn't been set yet. The new version will only ask the server for new values if all values which are used by the lov are entered. If there is an empty value, it will just clear the lov values. In the case if you have a more complex lov which does some defaulting and where it's not necessary to fill out the parent value, you can use the $APEXLIB_ALWAYS_REFRESH$ hint in the comment text to enforce that the lov is always populated from the database. Use this hint only if you have for example a similar where clause in your lov. WHERE DEPTNO = NVL(:P4_DEPTNO, 10) Version History: v0.09 18-December-2006
Labels: ApexLib, cascading lov Sunday, December 17, 2006Accessing the row selector of a tabular form
Maybe you already had the "joy" to find out that accessing the "Row Selector" column of an updateable tabular form isn't that straightforward as expected. Because the corresponding g_f01 array isn't indexed by row number as the other column-arrays of the tabular form.
Instead it contains as many values as you have checked rows. The value of the array entry contains the "real" row number for which it has been checked. So you can have the situation that g_f01 has a count of 2, but your g_f02 containing the EMPNO contains 15 rows. In the case if the g_f02 is your "driving" array, because you want to process all the records and only for the checked ones you want to do something special, it can get really challenging for a new APEX programmer (and even for a more experienced one). That's why I have added new functionality to my Plug & play tabular form handling package, to make accessing the row selector as easy and straightforward as possible. The package ApexLib_TabForm now contains the additional methods isRowSelectorChecked, setRowSelector. The hasRowChanged has been enhanced to also check for the row selector column. Let's demonstrate the new functions with an example!
This example demonstrates several features of the ApexLib_TabForm package.
Get the source code from the original posting and try it out! Labels: ApexLib, tabular form Oracle Magazine: Sizing Up Performance
There is a new article about Tips and techniques for optimal Oracle Application Express performance in the new Oracle Magazine Jan/Feb issue.
Labels: performance Friday, December 15, 2006Hacking the APEX error page!![]() Do you like the separate APEX error page which is called when APEX raises an error (eg in the MRU/MRD process for tabular forms)? If yes, you don't have to read further, if your answer is NO you may should read the rest of this posting... Wouldn't it be cool and much user friendlier to have this error message displayed as inline message, as we can do it for validation processes? You thought that's not possible, because when the page is re-rendered, all the changes in the tabular form are lost... It is possible! ![]() Yesterday I had an idea and did a "little" (ok it took a little bit longer, because I'm a newbie in JavaScript :-) ) hacking and finally came up with a solution which you just plug into our application and all error messages which normally displayed in the separate error page are now displayed as inline message, without re-rendering and loosing your entered data. But first try out the following examples. Standard Tabular Form example with old error handling After you have done that, check out my Enhanced Tabular Form example with inline error messages. Isn't that cool? :-) How to integrate it into your application? Follow the steps in my How to integrate posting. Vola, that's it! If an error message is displayed now on the APEX error page, the text will be extracted and pasted into the caller page. See also Hacking APEX error page - part 2 I'm new to JavaScript programming, so if you see "some errors/you don't do that in JavaScript", please let me know. I would appreciate that! Or if you have any other suggestions or problems, don't hesitate to drop me a note. I haven't done a lot of testing yet, but it seems to work fine with FireFox 2.0 and IE 6.0. Don't forget to check out the other ApexLib framework solutions! Labels: APEX hacks, ApexLib, error, tabular form Thursday, December 14, 2006Minor enhancement/bug corrections for ApexLib framework
I have done some minor enhancements and bug corrections for the ApexLib framework. It now supports Multiselect lovs, too. For details see the change log.
BTW, did you know that the Generic solution for cascading lovs, also works if the first item is a text item which restrict another lov? I have updated the example on apex.oracle.com to include a multiselect lov and a lov which depends on a text item. Change log of version v0.06 14-December-2006:
Labels: ApexLib, cascading lov |