Monday, March 13, 2017

Fixing Skillbuilders Super LOV (v3) in APEX 5.1

We have already migrated some of the existing applications to a new version of Oracle Application Express - 5.1. After few weeks in production I can just say...do it :). But when doing an upgrade there is always a possibility that you will hit some issues. For me one of the issue was Skillbuilders Super LOV (v3), and it looks like I'm not alone (https://community.oracle.com/thread/4010580)

So what is the issue? 

When you select a value (Super LOV item) and try to save a form then the value is not submitted. Now if you are lucky, then your item is mandatory and you will see the error - end users will tell you right away that something is not working. If your item is not mandatory then you might see this error much later, with complaints that some data is not saved correctly.

Value is selected
After submit, value is cleared and we see an error

After a bit of research I have found a quick fix, that you can use, until the plugin is fixed by original authors. What has to be done is just one small change in plugin's render function. Search in the source for line with disabled="disabled" (should be somewhere in line 157, if you haven't done some changes)

THEN 'disabled="disabled" onfocus="this.blur();"'

and change it to:

THEN 'readonly="readonly" onfocus="this.blur();"'

Notice the change is line 157 and 158

It looks like that something has changed from version 5.0 to 5.1. If you have an item with a property disabled="disabled", then after submitting the page you will not see value for this item.

To test this, I have created an After Submit Process with the code:

apex_debug.error('Value of P2_LOV : %s', :P2_LOV);

I have tried this on version 5.0.4 and 5.1 and after checking the debug there is a clear difference:

Debug in APEX 5.0

Debug in APEX 5.1


Aljaz

8 comments:

  1. Aljaz, thanks for the info.
    Have you informed Skillbuilders about this? I think you should.
    Gary e.a. will implement this asap. I'm sure of that

    ReplyDelete
    Replies
    1. Hi Richard,

      I have sent an email to Gary. But I really think that interesting part here is changed behaviour in APEX 5.1.

      Aljaz

      Delete
  2. This comment has been removed by the author.

    ReplyDelete
  3. I am busy with a migration from 4.2 to 5.1. The super lov (v2) does not work.
    I installed the v3. It's exactly the same. What I see is only a text filed and two little buttons with no icons. Probably a config problem. Any ideas ?

    ReplyDelete
    Replies
    1. I think this could be an issue with static files. Do you use webserver for plug-in's files or are they stored in your plug-in definition?

      Delete
    2. The files are stored in the definition (in the database).
      It was only due to a parameter in the ords config (ords_params.properties):
      db.hostname=localhost (is correct)
      db.hostname=epsvlwl135 (the name of the server; was not correct. Apex works but not the plug-ins)
      Thank you for your fix anyway because once the ords config was solved I then experimented the problem of the "disappearing value".
      By the way do you also have to use "localhost" in the ords_params.properties ? Or does it works correctly with the servername ?

      Delete
  4. Hi,

    Thanks for the fix. Another quick fix is to set the item to enterable and it works as it did before.

    ReplyDelete
  5. Hi,
    This is my second visit to your blog,I feel very good to read your blog and the info you presented is quite good and unique .I can learn lot of things from your blog.
    Thanks and regards,
    Oracle EBS training

    ReplyDelete