APEX 4.0 - AJAX not working with Popup LOV field

Hello,
In the application I have built I have three fields which are 'feeded' by selects via a AJAX construction.
All three fields are based on three others, which are PopUp LOV fields. Up to version 3.2 I had no problems: the fields were 'refreshed' as expected when in the 'parent' field a specific value was entered or choosen by the Popup Lov selector.
But since the migration to APEX-4 (lin a test-system) all the three fields are not correctly refreshed anymore: two of them give the value 'undefined', the third, which is a select-list shows values, but at the moment I try to click on the select-list down arrow to pick a value, the list is emptied and stays that way.
More specific about the third field:
item 1 is a popup-lov defined item in which a user can type a value, but can also choose a value from a popup-lov. Item 2 is based on item-1: it does a select based on the value of item-1 and refreshes a select-list. Item-2 is defined as a select list.
I got it all working when making item-1 also a select list, but since the list can become very large, I made a Popup lov of it. Most users do know what code they have to enter and in case somebody is not sure, the lov can be used.
In this forum I came across a problem with AJAX callback, which was answered by Patrick Wolf, saying that in an htmldb_Get ( ... ,0) the last 0 should be replaced by $v('pFlowStepId'), but this did not fix my problem. I have the feeling that the problem is somewhre else, since on first hand, after entering a value in item-1 I see item-2 refreshed with the correct values, but the moment I try to select one item, the list is emptied.....
I hope I made it clear what my problem is and that somebody can help me, else APEX-3.2 was the latest version for this application....
Thanks in advance and best regards,
Jan.
Edited by: user13110728 on 9-aug-2010 8:44

Hi Jan,
the problem is the
onBlur="javascript:f_P21_select_kostenposten(this,'P21_KOSTENPOST');"on P21_GBREKNR. This is getting attached to the HTML input text field but as well the the anchor link which opens the popup. So when you leave the text field the cursor will be put onto the icon to open the Popup LOV. When you press tab another time or leave the anchor link by clicking somewhere the above JavaScript function is fired again. But the problem is that "this" this time points to the anchor and not the text item anymore, so it will return an invalid value when you access this.value in your f_P21_select_kostenposten function which results in an empty result of your on-demand call.
I still have to investigate why the above JavaScript code is now added to the anchor link as well. But as a workaround, just change your code to
onChange="javascript:f_P21_select_kostenposten(this,'P21_KOSTENPOST');"which is better anyway, because it's just firing when the value really got changed. And because the anchor link can't really be changed, the event will never fire when you leave the anchor. BTW you can use the Application Search feature to search for all your onBlur events. onChange is much better than onBlur because it doesn't fire that often unintended.
But if you want to use some of the new APEX 4.0 features, you could use the cascading LOV feature of APEX 4 and avoid all this JavaScript and on-demand code which you have written.
I have changed your application to take use of it.
1) I changed the LOV query for P21_KOSTENPOST from
select '('||replace(lpad(gbreknr, 3, chr(1)),chr(1),' ')||') '|| omschrijving d, kostenpost r
from   kostenposten
where  vervallen is null
  and  bedrijf = :P21_BEDRIJF
order by gbreknr, kostenpostto
select '('||replace(lpad(gbreknr, 3, chr(1)),chr(1),' ')||') '|| omschrijving d, kostenpost r
from   kostenposten
where  vervallen is null
  and  bedrijf = :P21_BEDRIJF
  and  (:P21_GBREKNR is null or gbreknr = :P21_GBREKNR)
order by gbreknr, kostenpostas it was in your on-demand process. The query will return all values if P21_GBREKNR is null but will restrict it if the field is filled out.
2) Set "Cascading LOV Parent Item(s)" to P21_BEDRIJF,P21_GBREKNR Because based on your LOV query I assume "Kostenpost" should be refreshed if one of the two fields gets changed.
3) Set "Optimize Refresh" to No because one of your parent items (P21_GBREKNR) can contain a null value.
4) Removed the onBlur/onChange from P21_GBREKNR
5) Removed the *%null%* from the "Null Return Value" attribute of P21_BEDRIJF, because that will cause a ORA-1722 if someone picks "-- kies: --"
That's it.
Have a look at dynamic actions and the "Set Value" action as well, because I think that could remove your other on-demand calls as well without having to write any JavaScript code.
I will still investigate what's going on with the anchor link in APEX 4.0
Regards
Patrick
My Blog: http://www.inside-oracle-apex.com
APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins

Similar Messages

  • Issue with Popup LOV field not clearing out "default" value

    I am using APEX 4.0 & Oracle 10g
    I have a form that displays a default value on a "Popup LOV" field (say P1_POPUP) when the Form is initially displayed to the user. The default value is part of the Popup LOV list of values. If the field is "manually cleared" *i.e. I clear the default value by backspacing and don't touch the LOV) and I Refresh (submit) the form (REFRESH button to display the same Form again), the default value is still displayed.  
    In Post Processing, I debugged the value of P1_POPUP to see if holds the default value and yes it does. I was expecting no value in P1_POPUP.
    Is this an APEX standard behavior?
    Any way how I can get rid of this value on an manually clearing action of this Pop Up field?
    Looking forward for your response.
    Thank very much in advance.
    Ed.

    I apologize, the default value was NULL indeed. However, it seems like I may need to manually clear this value so that it will not be displayed.

  • Image cache not working with Firefox and apex

    Hi,
    I'd like to cache all my images to save page rendering time and bandwidth because my images are all static and never change.
    I use the John Scott's caching technique Link: [http://jes.blogs.shellprompt.net/2007/05/18/apex-delivering-pages-in-3-seconds-or-less/], in a few words this technique consists of adding a header line "Expires: date in the future" in the http response.
    It works very well in IE, the images are cached and the same image can be accessed several times (within the same session or in different sessions) without issuing an http request to the server each time.
    with Firefox it does not work, the same image is asked again and again to the server (i'm using FF 3.5 and APEX 3.2).
    - Is it a date format problem? no, because when i type about:cache in FF, i can find my image in the cache with an expire date in the future.
    The weird thing here is that the counter is incremented each time u request the image, so FF knows it is in the cache and even if the expire date is in the future, FF asks it again to the server.
    - Is it a FF bug? If u read the http specs or if u google a little, u can come to the conclusion that FF does not follow the standards,
    but... images.google.com for example manages to get its images cached with FF.
    They use an http response header "cache-control: public, max-age=604800".
    I tried the same and all kinds of combinations but without success.
    When i compare my image with the one from google in the FF cache, they both have the same attributes.
    - It's not an apex issue neither because it works with IE, most probably an incompatibility between apex and FF?
    Maybe the use of cookie? or the http request (not the response) containing "cache-control: max-age=0"?
    I've found so far 2 half solutions:
    1) use ETag and modified date, see the Tyler Muth's note Link: [http://tylermuth.wordpress.com/2008/02/04/image-caching-in-plsql-applications/].
    with this technique FF continues to send request each time but the answer is shorter because it's just a "304 not modified" instead of "200 OK" (200 response is bigger as it contains the image).
    it's better than nothing but you still have 1 request + 1 response for nothing.
    Another problem is that you need SYS access to implement this, which is not possible on an hosted server. (note that for images from the file system it is already foreseen by apex 3.1, Tyler's note is for images from the db)
    2) if you preload the image (using myimage=new Image();myimage.src='...';), then there is max 1 request per browser session.
    There are 2 minor issues here:
    - no caching across sessions
    - if u don't want to preload all the images (example a page with lots of thumbnails, when user clicks it show a bigger image, in that case the thumbnails can be preloaded but overkill for the big images), then you need to load the image, wait until the image has loaded before displaying it, it does not slow down the execution, but requires some extra JS.
    I'm not asking anyone to investigate it, i can live with the 2 workarounds,
    but just in case someone encountered the same problem and already fixed it.
    Let me know if u managed to use the John Scott's technique with Firefox. (U can use Firebug to see the http traffic)
    Thx
    Tim

    Hi Anshul, hope these help. Let me know if you need to see anything else.
    Best,
    Menu Settings:
    Tab Hyperlink:
    Label Text with with hyper link option not available (works as a hyperlink in chrome and IE though):
    Thanks for the help in advance!

  • Interactive Reports not working with APEX listener

    Hi,
    I have posted this question APEX listener forum couple of weeks ago but very few responses.
    If any one from here can help then it would be great.
    Interactive Reports not working with APEX listener
    Best Regards,
    Baig

    Sorry for late response.
    It was a firewall issue

  • External USB HD does not work with HAL:

    External USB HD does not work with HAL:
    From the last 10 days the HAL auto-mount with ntfs-3g file system of my external hard drive  does not woks.
    But the manual mount procedure with the command mount -t ntfs-3g /dev/sdb* /mnt/XYZ works.
    I've followed the instructions in the wiki: http://wiki.archlinux.org/index.php/HAL and the system has worked up to the last kernel or HAL update.
    My fat32 usb-stick works without any problem.
    If I try to open the device with KDE it appears an error popup wit this message:
    TODO: have to rethink extra options
    Error: kio_media_mount_helper
    The log from the kernel.log is
    Nov 6 22:03:16 myhost usb 5-1: new high speed USB device using ehci_hcd and address 4
    Nov 6 22:03:16 myhost usb 5-1: configuration #1 chosen from 1 choice
    Nov 6 22:03:17 myhost Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
    Nov 6 22:03:17 myhost ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
    Nov 6 22:03:17 myhost Initializing USB Mass Storage driver...
    Nov 6 22:03:17 myhost scsi6 : SCSI emulation for USB Mass Storage devices
    Nov 6 22:03:17 myhost usb-storage: device found at 4
    Nov 6 22:03:17 myhost usb-storage: waiting for device to settle before scanning
    Nov 6 22:03:17 myhost usbcore: registered new interface driver usb-storage
    Nov 6 22:03:17 myhost USB Mass Storage support registered.
    Nov 6 22:03:22 myhost scsi 6:0:0:0: Direct-Access WDC WD32 00JB-00KFA0 0811 PQ: 0 ANSI: 0
    Nov 6 22:03:22 myhost sd 6:0:0:0: [sdb] 625142448 512-byte hardware sectors (320073 MB)
    Nov 6 22:03:22 myhost sd 6:0:0:0: [sdb] Test WP failed, assume Write Enabled
    Nov 6 22:03:22 myhost sd 6:0:0:0: [sdb] Assuming drive cache: write through
    Nov 6 22:03:22 myhost sd 6:0:0:0: [sdb] 625142448 512-byte hardware sectors (320073 MB)
    Nov 6 22:03:22 myhost sd 6:0:0:0: [sdb] Test WP failed, assume Write Enabled
    Nov 6 22:03:22 myhost sd 6:0:0:0: [sdb] Assuming drive cache: write through
    Nov 6 22:03:22 myhost sdb: sdb1
    Nov 6 22:03:22 myhost sd 6:0:0:0: [sdb] Attached SCSI disk
    Nov 6 22:03:22 myhost sd 6:0:0:0: Attached scsi generic sg2 type 0
    Nov 6 22:03:22 myhost usb-storage: device scan complete
    and the error.log is
    Nov 6 22:03:22 myhost sd 6:0:0:0: [sdb] Assuming drive cache: write through
    Nov 6 22:03:22 myhost sd 6:0:0:0: [sdb] Assuming drive cache: write through
    Do you have some idea ....
    Bye.

    I have done the following:
    Downloaded the patched hal version.
    used makepkg in /abs/local/trunk/ to create a pkg for pacman
    used sudo pacman -U pkgname to install it.
    used sudo nano /etc/hal/fdi/policy/preferences.fdi to create the fdi file with the following content:
    saved the file and removed my ntfs entryes from fstab and rebooted. and still there is no automount off ntfs partitions.
    have i done something wrong?
    br fjodork
    WARNING: what follows is a guide of what did work for me, I'm still in an early stage of learning linux, so please correct me if anything of what follows is wrong/dangerous/stupid. As I said, this worked for me, it's not pretty, since I was learning each step on the fly and I'm sure there are better ways to do this.
    So fjodork, you seem to have done the the necessary steps, though i couldn't get it to work until i first removed hal without dependencies
    pacman -Rd hal
    it will give you some warning about the dependencies, ignore  it since we are reinstalling hal in a few steps.
    First i tried to follow Raymano's link, obviously it showed me nothing in the browser so I thought it might be a broken link.
    So I downloaded the source tarball from here http://hal.freedesktop.org/releases/hal-0.5.10.tar.gz
    unpacked it changed the /tools/hal-storage-mount.c as per Milfadoodle's instructions.
    at first I tried to compile directly from source, the process would finish without a glitch though after reboot nothing changed, as if hal weren't
    installed, i guess there were issues with paths. anyway read on
    Then repacked the source in tarball, copied it to /var/abs/extra/system/hal and modified the PKGBUILD as follows
    makedepends=('pkgconfig' 'gperf')
    options=('!libtool')
    install=hal.install
    source=(${pkgname}-${pkgver}.tar.gz #removed url so makepkg looks in the current directory for the tarball
        hal
        hal-policy.patch
        cryptsetup_location.patch
        hal-0.5.9-hide-diagnostic.patch
        ntfs3g-valid-options.patch)
    md5sums=('6641c30a27c00485c6accac5110ff911' # replace with md5sum of your package's sourceball (run md5sum filename)
             '882f67668cb14a0a9e4a27ef22278027'
             '5ba8b610aa9763a5f42b9f7cbd7a86ad'
    then makepkg (i had to add --asroot, don't ask why
    and finally pacman -U hal-0.5.10-1-i686.pkg
    another reboot and everything worked without a glitch!:D (yeah i know i still haven't got rid of the reboot mentality )
    I have also put the policy files as per the wiki instructions.
    PS: I know this is a dirty way to getting things done but as i said, I'm just starting
    If anyone could comment/correct/explain this post I'd be more than happy, the automount issue was bothering me for about a month now (you'll say why do I need ntfs in the first place? well, I only recently switched for Linux as my primary OS, these are some relics of the M$ era

  • Window 10 build 10041 does not work with Intel 82579V Gigabit Ethernet on ASUS motherboard

          
    I originally posted this question here:
    answers.microsoft.com/en-us/insider/forum/insider_wintp-insider_update/window-10-build-10041-does-not-work-with-intel/6729892f-83aa-4822-b20a-ea84f4fd06c7
    and was asked to post it on this forum...
    I updated a computer I have which is a quad core i7 that I built and includes an ASUS motherboard with Intel 82579V Gigabit Ethernet built in. Windows 10 preview 9926 worked fine with this network adapter. Window 10 build 10041 does not, and I have tried
    it twice so far. I even went as far as buying a Thunderbolt-Gigabit Ethernet Adapter (Broadcom, sold by Apple)... and while it installed the driver automatically, it did not work either. Each time you try to view the properties of either of them, it locks
    up or give an error. In fact, doing much of anything with the Intel adapter icon assures you of not being able to do a clean reboot... have to kill power.  I have finally gone back the previous version 9926, which has its issues but no where near as bad
    as not having any network connectivity!  Does anyone have this issue and a workaround? 
    Note, there are two images on the windows 10 preview forum that I posted this question on. I could not post the full link as I was getting a message here that links and graphics are not allowed.

    Thanks Roger, I posted the following yesterday in the other thread (thinking it was this thread - confusing after they moved it here)... It may be that the new driver fixes the issue that 10041 has with it, but I have not tried that yet. If I do I will update
    this... Thanks!
    I have more information about this, which basically exonerates any issue with the Intel 82579V Gigabit Ethernet hardware or software. I have 3 computers with Windows 10 preview so I have multiple angles to see issues from. With this I have found a culprit
    (but I suspect not just the only culprit) in this above mentioned problem...
    10041 build combined with installing (or attempting to install) CISCO VPN Windows 7 64bit 5.0.07.0440-k9 client causes the issue mentioned above. I confirmed this on a completely different machine with a totally different Ethernet adapter. First machine
    is an ASUS motherboard in a tower system I built, with the Intel 82579V Gigabit Ethernet hardware built in. Second machine is a Gateway Laptop from 2008 which has a Marvell Yukon 88E8057 PCI-E Gigabit adapter built in. Build 10041 will work fine with my 2008
    laptop, including the MS VPN client (which I have tested). However, if you attempt to install or even uninstall the Cisco client you will have to do a recovery to a restore point (as I have done twice) in order to get your network working again. Installing
    or attempting to install (because it never even does install properly and times out), CISCO VPN client will render your entire network unusable. Going back to a restore point saved me and I am still running 10041 but I can't use CISCO VPN client any longer.
    I could with build 9926, including on all 3 machines. I now have 9926 on two machines and 10041 on only the 2008 laptop. 
    Hopefully this above information helps someone resolve the issue. I will also mention, even though my network is working on the 2008 laptop, I still can't go into the Control Panel\Network and Internet\Network Connections and right mouse click on the Marvell
    Yukon 88E8057 PCI-E Gigabit adapter icon. I get an error when clicking on Properties menu popup : "An unexpected error has occurred". So something is still up with my network adapter driver or windows software, but it could be a side effect of all
    that has happened with the Cisco software install attempts under 10041.
    Another note: CISCO Anyconnect also has the issue.

  • CRTL+ALT+DEL not working with Windows 7

    Hi,
    I just updated to 10.3.3 but found that CTRL+ALT+DEL still not working with
    Windows 7 in remote management session.
    I saw that I can activate UAC but I don't want to do this.
    Another solution to resolve this ?
    Thanks.

    If I activate this, will the user receive a popup when deploying some apps
    (bundles) ?
    "Shaun Pond" a crit dans le message de groupe de discussion :
    [email protected]..
    Normand,
    the one shown in TID 7006211 and the docs
    http://www.novell.com/documentation/...b.html#brybx5o
    Shaun Pond

  • HTMLDB_MAIL.SEND does not work with 11g

    Hi Guys,
    I have a simple application that uses HTMLDB_MAIL.SEND. I am running APEX 3.0 against an 11g database. When run against a 10g DB all is good. But with 11g I get
    ORA-24247: network access denied by access control list (ACL)
    I looked up the error which recommends altering ACL stuff, which I know nothing about. Is there a simple way to get rid of this error.
    O.

    Hi,
    I have the same problem as you.
    Colud you please explain me how did you resolve it.
    Thanks
    HTMLDB_MAIL.SEND does not work with 11g

  • I have recently upgraded my iMac Intel G5 iSight to OS 10.6.8 and now the internal mic does not work with skype or facebook. I can here static when playing back clips. Do I need to update firmware or reload old sys parts

    I have recently upgraded my iMac Intel G5 iSight (iMac5,1) to OS 10.6.8 and now the internal mic does not work with skype or facebook. I can here static when playing back clips. Do I need to update firmware or reload old system parts. I have zapped PRAM. The blue indicator in system audio panel will appear for a second as I slide the bar for internal mic but then it disappears. Is there a fix?

    The sound seems very faint but can here static on playback.

  • My operating system windows XP not working with photoshop cloud, why not?

    I need to add 2 more licences for photoshop cloud and I'm being told my operating system windows XP does not work with Photoshop cloud. We already have 2 pcs using it in our office so why not?
    Please help
    Roy

    Do you have the latest version of iTunes?  If not, get it at:
    http://www.apple.com/itunes

  • Adobe creative cloud eea 1.5 is not working with our asus Eee box , celeron j1900 2.00 ghz, 4gb of ram, 64bit. can settings be changed in adobe?

    adobe creative cloud eea 1.5 is not working with our asus Eee box , celeron j1900 2.00 ghz, 4gb of ram, 64bit. can settings be changed in adobe?

    A chat session where an agent may remotely look inside your computer may help
    Creative Cloud chat support (all Creative Cloud customer service issues)
    http://helpx.adobe.com/x-productkb/global/service-ccm.html

  • Application is not working with mouse

    Dear All,
    We have a strange issue in the our application (Oracle form) in the one of our client machine.
    Some times the forms are not able to work with the mouse but is able to work with the keyboard. After one or two machine restart its again working. When the issue occur we can able to work in other applications using mouse.
    Our Applications server is in Other country and client are accessing from India.
    This occurs for some user and not for all.
    Application server Version          10.1.2.0.2.
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit
    Java Plug-in version 1.6.0_31 .
    Please any info will help us lot.

    Thank you for the quick replies Michael Ferrante and HamidHelal.
    But since its occurring for some users (perticulary indian users) and some times. And also its occurring in production environment not in development environment.
    Even the java control panel is not working with mouse.
    For other country customers everything working fine.
    So its difficult for me to apply the patch with these uncertainties.
    Checking with fresh java installation and let you know the status.
    Thanks.

  • Voice Memo is not working with iOS 8.2

    Voice Memo Records is not working with iOS 8.2. how to fix it?

    Voice Memo Records is not working with iOS 8.2. how to fix it?

  • On updating my iphone it shows no network inspite the sim inserted,now it also not working with itunes.i cant see menu page on display screen

    on updating my iphone it shows no network inspite the sim inserted,now it also not working with itunes.
    i cant see menu page on display screen

    http://support.apple.com/kb/HT1808

  • Caller ID not working with Nokia 6600?

    I have a T-Mobile (US) Nokia 6600, and I can't seem to get address book to display incoming SMS or the caller ID of incoming calls. I've successfully paired the phone via bluetooth, and I can make address book dial the phone and send an sms. I can sync via iSync, use my phone as a modem, etc. etc.
    But regardless of what settings I tweak, I can't seem to get Address Book to show a bezel of any kind on incoming calls - not even an 'Unknown Caller' message! Am I missing something obvious? Third party apps like BluePhoneElite work just fine, so I'm pretty sure it's something wrong with Address Book...
    15" Aluminum Powerbook 1.5 GHz   Mac OS X (10.4.5)  

     
    mdcdsc wrote:
    My caller ID does not work with the new ap either.  I don't like the new ap at all.  The old one was beautiful.  Now my email is very hard to see, so much that I will just use the Apple email that comes with my IPOD.  The caller ID was my favorite thing with the old ap.  and now it doesn't work.  I have followed the instructions and turned everything on, but it just does not work.
    The Caller ID issue was due to an outage. It should be resolved anytime soon. Can yu log out and log back in. Go to app settings and in notifications and turn CAller ID off and on.
    On email - what do you mean 'email is very hard to see' ? I would like to pass on this feedback to the team.

Maybe you are looking for