Inside Oracle APEX by Patrick Wolf

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:

29 Comments:

  • Hi!
    Attempting to create the Regions on Page 0 to contain the Javascript Libraries causes an error in Apex (version 2.2):
    Expecting p_company or wwv_flow_company cookie to contain security group id of application owner.
    Error ERR-7621 Could not determine workspace for application (:) on application accept.

    Is this because of the size of the Paste operation?

    By Anonymous Niall Young, at 29 January, 2007 19:09  

  • Hi Niall,

    don't think that this message is related to ApexLib or the size of paste operation.

    Try to logout, close the browser and login again. Maybe try to create the region with a short text first - just to try and update it with the real text later.

    Hope that helps
    Patrick
    PS: You can also send me an e-mail (see Profile), makes it easier and faster to communicate.

    By Blogger Patrick Wolf, at 29 January, 2007 19:17  

  • First may I say, you've done some great stuff here, and it's going to save me a lot of time. One thing that I have noticed is that when I integrate the Framework into my application, I have trouble getting my onload processes to run. Any suggestions on why this may be happening?

    Thanks,
    Scott

    By Blogger Scott, at 22 February, 2007 21:58  

  • Hi Scott,

    great that you like it!

    I think your problem is the "fault" of the jQuery framework which I use. The docu says something that onload shouldn't be used. I noticed that the onload attribute works, but if onload is set in JavaScript, it doesn't work because it looks like the jQuery just reads the onload event when the library is initialized.

    Are you dynamically setting the onload event in a JavaScript or are you using the body attribute?

    Try using

    jQuery(document).ready(function(){alert("test");});

    or

    jQuery(document).ready(your_function);

    instead. The advantage of the ready method of jQuery is that it fires as soon as the DOM is finished, but doesn't wait till all images are loaded as the onload event does.

    See jQuery - Events documentation for details.

    If you have further questions, send me a mail.

    Patrick

    By Blogger Patrick Wolf, at 22 February, 2007 22:30  

  • Hi,

    I am very interested on trying iy. However, I cannot access the How to Integrate Link. I do not know why.

    Can I get that by email? ejaimes@gmail.com. Thanks a lot!

    By Anonymous Nera, at 06 March, 2007 16:49  

  • Hi,

    When inspecting with Firebug,
    I get the folowing errors :

    apexlib is not defined
    [Break on this error] apexlib.error.init
    f (line 300)
    apexlib is not defined
    [Break on this error] apexlib.validation.addIgnoreRequest("GET_NEXT_ID");

    A beginner struggeling apex

    By Blogger Jules Verhoeven, at 13 March, 2007 23:20  

  • Hi Jules,

    the best would be if you would send me an e-mail which contains the HTML output of your page. Than I'm able to take a look at your problem.

    You can find the e-mail address in my profile.

    Patrick

    By Blogger Patrick Wolf, at 13 March, 2007 23:35  

  • Hi Patrick,

    Thanks a lot for the tips you gave me!!
    It was my path that was not set correctly :
    He sould be :
    script src="http://servernam:port/i/javascript/apexlib/jquery_Compressed.js" type="text/javascript">script

    and it was
    script src="http://servernam:port/i/apexlib/jquery_Compressed.js" type="text/javascript">script

    Thanks a lot for the good help

    It is working now for the Generic solution for cascading select lists/lovs

    I hope the rest will work to.

    Thanks A LOT !!

    By Blogger Jules Verhoeven, at 16 March, 2007 14:51  

  • Hi Patrick...this is exactly what I have been looking for. thanks.

    I typed everything into page 0 and followed your instructions. I am now noticing that my cache seems to always clear values...is that a byproduct?

    Basically, I have a search field that is populated and a button is pressed. That had always worked, now it does not...it's as if the search value has been cleared even before the query is executed.
    thanks

    By Anonymous Anonymous, at 22 March, 2007 22:15  

  • Hi,

    can you write me an e-mail? This way it's easier to communicate to track down your problem. You can find the e-mail in the HowToInstall.html

    Thanks
    Patrick

    By Blogger Patrick Wolf, at 23 March, 2007 11:37  

  • Hi Patrick,

    Is there a way to make the ApexLib a bit more 'generic', so things like FLOWS_020200 aren't hard-coded?

    I installed a previous version about 2 weeks before 3.0 came out, and then just upgraded to 3.0 last week, and I was chasing down all kinds of strange behaviours ever since.

    Today when I dropped the previous version's schema, my app started generating error messages about one of my functions being in an invalid state, and tracking that down I discovered that it said the v() function was in an invalid state as well. So after a bit of searching, I found the v() function in my schema (I was originally looking in the FLOWS_xxxx schema), and changed the schema name to FLOWS_030000 and things appear to be working now, at least the error messages have gone away.

    Thanks,
    Bill Ferguson

    By Blogger Bill, at 09 April, 2007 22:48  

  • Hi Bill,

    I have already written an answer in the related OTN thread.

    The problem is that because the V/NV replacements (which are an add-on to the ApexLib Framework) have to use the schema names of the FLOWS_XXX schema, because they have the same name and otherwise it would be a recursive call to itself.

    But I'm up to suggestions, maybe someone else knows a solution for that.

    In ApexLib 1.5 I have mentioned this issue when you are going to upgrade to APEX 3.0

    Patrick

    By Blogger Patrick Wolf, at 10 April, 2007 00:03  

  • Hi Patrick,

    To make it a bit more generic, there's the possibility of tit the archaic way, and asking the user what version they're using, and then in the install, execute the sql for whichever version.

    Or, though it would be a pain, have a little loop in the install routine that checks for the:

    max(substr(schema_name,6))
    where schema_name like 'FLOWS_%

    (Not sure of the exact syntax, but it 'seems' like that might work as well).

    Just a couple thoughts, not sure if they'd work or not though.

    Bill Ferguson

    P.S. I'm hoping to get enough time in the next week or two to start experimenting with ApexLib. I really want to try out the diagrammer and the hacking the error message stuff.

    By Blogger Bill, at 10 April, 2007 14:33  

  • Hi,

    This is really a good piece of work. I tried it and it worked for me.

    M using Oracle 10gXE and it works fine.

    Thanks & all the best.
    Keep up the Good Work
    Vineet

    By Anonymous Anonymous, at 11 July, 2007 08:39  

  • Vineet,

    great to hear that you like it!

    Patrick

    By Blogger Patrick Wolf, at 11 July, 2007 09:29  

  • Hi,
    have you tried to use the "Static File" components in APEX to store the .js files? Reason for asking is that if you are hosting the application you usually don't get the filesystem acccess needed to put them in the right place.

    Also, I assume that the scripts work in APEX 3.0.x.x.x.x

    Andy

    By Anonymous Anonymous, at 31 July, 2007 23:34  

  • Hi Andy,

    the framework works with 3.0.x

    About static files, yes you can use the Share Components\Static Files or you can also paste the code of the file into the region as described in the How To Integrate. That's probably faster because it doesn't have to do the additional roundtrip.

    Patrick

    By Blogger Patrick Wolf, at 01 August, 2007 00:28  

  • I have a multi row update form on my application page. I have page level validations on it to validate the required fields and allowed data length.

    I was facing the problem that when user didn't fill a required field, error message was displayed in notification area, but all the data was reset to the previous state.

    To avoid this I am using ApexLib. I followed the instructions in example soultion "Display validation errors without page re-rendering" at:

    http://inside-apex.blogspot.com/2007/01/apexlib-new-release-v016.html

    Following the instructions I have created a page level validation as a last validation sequence wise, with error displaying inline and notification option and validation expression 1:

    ApexLib_Error.addApexValidationErrors;

    My other validations are still there.

    But instead of displaying inline, the error now displays on Error Page. However, a good sign is that the form reserves the state and doesn't reset all the data entered when pressed OK on the error page.

    Please tell me what I'll have to do to show error inline?

    By Blogger Amir, at 03 August, 2007 06:35  

  • I've noticed a small bug in the themes for Apex 3.0. In following your instructions to integrate Apexlib you mention setting txMessages and txNotification to your theme number in your Handle Error Page region on Page 0. What I've found is that for my Theme 6, the correct names are t6messages and t6notification in all lower case. When I later changed to Theme 12 I had to switch back to mixed case as you described.

    By Anonymous Tim, at 14 August, 2007 21:42  

  • Hi Patrick,

    i have a problem in my application. I have created a page with a tabular form. The items in the tabular form have as type the SELECT LISTS. In the query of the list i have to use a data entered in a previous item. when i reference to the item in the same row i always get a null value. What is the syntax to reference the item in the same row.

    exemple: select group_name,id

    from flows_030000.wwv_flow_fnd_user_groups ug, flows_030000.wwv_flow_fnd_group_users gu

    where gu.group_id = ug.id

    and gu.user_id = :P_user_id -- :P_user_id is the value entered in the tabular item in the same row.



    Thank you for your help.

    Rita Tabet

    Unilog Liban.

    By Blogger Ratus, at 13 September, 2007 22:42  

  • Hi,

    I think you are looking for something like described here.

    BTW, you should remove the flows_030000 from your SQL statement, because that will cause problems when you upgrade to a new version and it isn't necessary.

    Patrick

    By Blogger Patrick Wolf, at 13 September, 2007 22:52  

  • patrick , i have managed to install the apexlib framework, apex builder plug in and have the example tabular form working

    just one question !!

    where is the code that does the validation !!

    cheers ... chris bell

    By Blogger Chris, at 07 November, 2007 01:07  

  • For Browser Validation or for the Server Side checks? For Tabular Form or for Page Items? :-)

    The best would be if you write me an e-mail.

    Patrick

    By Blogger Patrick Wolf, at 07 November, 2007 14:42  

  • Hallo Patrick,

    Punkt 5 auf "HowToIntegrate.html" ist ein wenig unklar wo und wie die "Applications Items" erstellt werden sollen.

    Tip? Screenshot?

    Vielen Dank im voraus.

    Viele Grüße
    Cliff

    By Anonymous Anonymous, at 18 December, 2007 11:30  

  • Hallo Patrick,

    mein Kommentar eins oben drüber hat sich erledigt. Kann gelöscht werden.

    Gruß
    Cliff

    By Anonymous Anonymous, at 18 December, 2007 11:58  

  • Hallo Cliff,

    freut mich zu hören, dass Du das Problem bereits gelöst hast.

    Grüsse
    Patrick

    By Blogger Patrick Wolf, at 18 December, 2007 22:18  

  • Hi Patrick,

    You've done a wonderful job on this. I'm just hoping for a clarification. On the Integration Notes, it says to add two shared items: APEXLIB_REFERENCE_TYPE and
    APEXLIB_REFERENCE_ID. Are these generic text fields? Hidden fields? Not sure what type to use...

    Your help would be greatly appreciated, as I am looking forward to trying out the AJAX-enabled drop-downs for a complete rebuild of our data-entry system.

    By Anonymous Anonymous, at 10 January, 2008 23:46  

  • Thanks!

    They are Application Items under the Shared Components.

    Patrick

    By Blogger Patrick Wolf, at 10 January, 2008 23:55  

  • Hi Patrick!

    When will there be cascading LOV support for radiogroups? Is it a problem with the OnChange event being handled differently with radiogroups?

    thanks!
    Kathy

    By Blogger Kathy, at 11 February, 2008 22:44  

Post a Comment

<< Home