V4.0 Dynamic Action - Problem with implementing disabling/enabling button

I'm having trouble implementing the following APEX V4.0 dynamic action:
The enabling/disabling of a button when a text field is not-null/null.
I'm following the example in Oracle's Advanced APEX course notes Pgs 5-13 to 5-16. I can get it working with no problems using two text fields. The example states that the "Select Type" for the button is a DOM object and you then have to enter it's name in "DOM Object" attribute. The example uses a "CREATE" button in a region position. Is "CREATE" just the Name attribute of the object? Is that what we are suppose to enter here? Also my FIND button is a "button among the region items" and not a "button in a region position" as in the example. The name of the button is P1_PAT_TBRN_SEARCH but when I use it as the Dom Object, nothing happens. Also I am using the "Key release" event for the text field that must be not-null.
I notice that Demitri Gielis on his blog couldn't get it working either (see last paragraph)
http://dgielis.blogspot.com/2010/01/apex-40-dynamic-actions-part-1.html
Any suggestions?
thanks in advance
Paul P
Edited by: PaulP on Jun 2, 2011 12:01 PM

Hi Paul
Two separate situtations here:
- html buttons
- template based buttons, typically comprising multiple html elements
HTML Buttons
These should be easy to enable/disable using dynamic actions, specifying an appropriate DOM selector.
Typically you would use the ID attribute of the button, so that's straight forward except for one catch..
APEX supports a #BUTTON_ID# template substitution tag , but performs substitutions only for buttons in Region positions and not for button items.
Use button attributes instead to assign a specific ID.
Template Buttons
Since these are made up of multiple elements, you need to treat them as a single object to be able to interact with them easily.
APEX provides the apex.widget.initPageItem method to integrate plugins with the dynamic actions framework:
apex.widget.initPageItem("P1_MY_ITEM", {
enable: function(){},
disable: function(){},
getValue: function(){},
setValue: function(){},
nullValue: "%null%"
});This provides you with a mechanism to over-ride one or all of these built-in methods with your own JS, to use custom code to enable/disable your template buttons.
For an example on how this works, look in the uncompressed apex_widget_4_0.js file, search for the shuttle widget.
You could just add code to initialize your template buttons manually, or better still create a plugin button to add the code automatically.
This is reasonably advanced work to do, but you really have to take your hat of to the APEX team for providing the mechanism to do it.
Regards
Mark
demo: http://apex.oracle.com/pls/otn/f?p=200801 |
blog: http://oracleinsights.blogspot.com |
book: Oracle Application Express 4.0 with Ext JS

Similar Messages

  • Problem with users disabling ARD client service

    I've got a problem and i'm not quite sure of the work around. I'm a PC guy by nature and can't quite figure this out.
    I'm having a problem with users disabling the ARD service from the sharing menu. Unfortunately users need to have admin privleges to do their work so I can't simply give them a standard account.
    I've hidden the ARD user account i created from the login window through Netinfo, but I need to find a way to stop users from shutting the ard service down.
    They don't seem to understand that the company requires that it be on the computer. Now, I'm the one who is set as the admin for ARD in the building, however we really just use it to rollout drivers, install packages, and its a lifesaver for remotely fixing problems with programs. The company didn't really buy it to spy on the employee's.
    Is there any way to hide the service from an admin level account? Or keep them from shutting it down?
    BTW, this would have to be done on multiple machines running both panther and tiger.
    Any help would be appreciated as I'm not quite sure where to start.

    First, as a matter of policy, let them know this service is active, and needs to remain active. If they disobey this instruction and turn it off, you have a human resources issue, not a technical issue.
    Second, there are very few enterprise users that need admin access to their machines. Oh, they ALL think they do, and there will be howling when non-admin status is first imposed, but we have 350 users in a publishing environment with less that 20 setup as admins. Those users are almost all superusers who assist others in a technical role.
    We have far fewer software problems like this and with ARD, IT can install/ authorize installation of software remotely should a user need that. It simply does not dramatically impact our users to have non-admin access. On the other hand, we recognize that a FEW users will need more access, and grant that on a case-by-case basis.

  • Problem with the "mail me" button

    Since I installed both Iweb 09 and Snow Leopard, there is a problem with the "mail me" buttons on my websites. Nothing happens when i click on it even if i see my web adress when my cursor is on the button.
    Do somebody had the same problem and do you know how to avoid it.
    Thanks a lot

    I checked your site and found that the mail me button was not overlapping or touching any other object and positioned entirely in the footer of the page. All looks good and it works for me. You might try moving the button, logo and counter to the bottom of the page content section, publish and see if that makes a difference for those computers that can't.
    Try the following on your Macbook, open Safari, clear the cache (CommandOptionE), load your site and try again. If that makes it work for your MB tell your friends to clear their caches and try again. Might be something as simple as that.

  • Who else has a problem with parental controls enabled not being able to run Firefox on the Mac?

    Who else has a problem with parental controls enabled not being able to run Firefox on the Mac? (Any solutions?) (BTW. Chrome doesn't work either)

    Although FF4 is so nice I'm almost ready to ditch iGoogle!
    Please fix what appears to be an RSS/iGoogle issue with FF4...
    Gmail is fine, but titles dont show in most RSS feed gadgets and no stories, strangely, apart from this one:
    http://www.google.com.au/ig/directory?hl=en&url=www.google.com/ig/modules/builtin_news_technology.xml
    Which if you enter the last part of the url reports that
    "<Content type="html">
    This is a builtin module, so the UserPrefs and Content are ignored."
    Any ideas?

  • I bought an iPhone 5 around fifteen days back and it has already started to give problem with the on/off button. I have to press it five six times to switch it on or off. I am so frustrated by the fact that if I bring it to the service centre, I am going

    I bought an iPhone 5 around fifteen days back and it has already started to give problem with the on/off button. I have to press it five six times to switch it on or off. I am so frustrated by the fact that if I bring it to the service centre, I am going to get a refurbished phone in place of my brand new phone which I just bought. The idea of a used phone repulses me. Any solutions ?

    sumeshdua wrote:
    The idea of a used phone repulses me.
    Why?  Your current phone is used... it has been since the instant it was removed from the shrink wrap and turned on.
    sumeshdua wrote:
    Any solutions ?
    Live with the phone as is.
    Take the device to Apple for evaluation... it may not need replacement.
    Even if it does, neither you or the Apple tech should be able to tell if the replacement is new or refurbished.

  • I anyone having problems with the Sleep/Wake Button?? it doesn't do anything

    I anyone having problems with the Sleep/Wake Button??
    It doesn't do anything

    if you press it and it does nothing, it may be broken. did you drop it?
    try pressing and holding the top power button and round home button on the front for 6-8 seconds and you should see an apple appear.. if you do see the apple, the power button worked.

  • I have a 7th generation ipod, i have a problem with the pause/play button, it no longer works.

    I have a 7th generation ipod, i have a problem with the pause/play button, it no longer works.
    What does it take to make sure it works ????
    Thanks

    If you successfullt restore to factory defaults/new iPod and still have the problem then it is likely a hardware problem and an appointment at the Genius Bar of an Apple store is in order.

  • Dynamic Streaming - problems with MP4 (h.264)

    Hey Flash Guru's
    Im wondering if anyone have had any similar problems with the MP4 (H.264) format when implementing Dynamic Streaming using a FMS server?
    Basicly we developed a player that detects the users bandwidth and plays the appropiate VOD stream (500, 1000 or 1500 kb/sec). Its tested with NetLimiter and works perfectly switching bitrates/files during the movie with both MP4 (h.264) and FLV (On2Vp6).
    The problem occurs when you seek (jumps in the progressbar). When playing the MP4 files the player often uses 2-10 seconds to start the stream again. But when using FLV files the seeking is seamless and starts the stream within 2 seconds everytime.
    So my question is if the FMS servers, Flash or the Dynamic Streaming got an issue with MP4 files?
    Any help would be appreciated.
    Best regards
    Bo
    Denmark

    H264 content does take quite a few images to get rolling before playback starts.  That's normal but it shouldn't take 10 seconds - it sounds like your buffer length might be overly long and it's taking a while to fill up after the seek.  Consider keeping a short buffer like as small as 0.1 seconds for playback starts.  Once you get your Play.Start or your Buffer.Full message then you can adjust the buffer length on the fly to something longer to handle the bumps.
    It's also possible that you're getting the high bandwidth stream again when you seek by mistake.  Check your server logs to see that you're getting the play that you're expecting there.
    Asa
    FMS

  • Static/Dynamic PDF problem with Forms 7.0

    Hi all
    I wonder if anyone has an answer to this?
    I'm having problems with getting the instance manager to work correct in a couple of forms. It works great if I preview in Designer (8.1) or render through ES 8.2, but since we haven't upgraded our production environments yet, I'm stuck with Forms 7.0 there. And when I try to render with that, the form is simply not working as it should...
    My guess is that Forms 7.0 chooses to make the form static instead of dynamic, but how to change this behaviour from the xdp? I've checked all the options of making it a dynamic xdp via Forms->Properties and checked just about everything I can come up with, but it's simply not working right now... anyone with ideas?
    What I'm trying to do is to hide subforms depending on what the user has chosen in a different form (html), so that the user won't see irrelevant data. It's been done before but now it seems like Forms 7.0 wants to run the forms static always.
    I've contacted Adobe support for a week ago but still haven't got anything from them leading me the right way. That's the reason I'm now asking here if anyone has any good idea...
    A bit more information about what I've tried:
    When I set min instances to 1, they are all visible but then they don't hide.
    If I don't set minimum instances to 1, they don't display at all in forms 7.0 when choice Repeat subform for each item is set.
    Using initialCount set to 1 do no good.
    Doesn't matter if I use setInstances, addInstance or removeInstance as far as I've been able to see. I have also tried using presence = "hidden"; but with no luck.
    If the prefill xml file is using appropriate xml syntax, it shows correct number of subforms but since I also wants to hide irrelevant subforms, it's not an acceptable solution.
    Thanks in advance for any tips.

    Yes. I could add an "Of course" but it has happened before that it's something that simple. Been scratching my head for at least 4 hours just today and at least the same amount of hours before so I think I've narrowed out all the simple stuff but I might have missed one..
    Any more tips? One strange issue is the fact that the form behaves different if the prefill xml file is structured in different ways. Nothing to do with prefilling, just how the PDF itself behaves.

  • Folder Action Problems with Leopard 10.5.8

    My company recently upgraded from 10.4.11 to 10.5.8 and our folder actions have been stopping mid-process or not working at all. Sometimes a few files will process and then everything stops completely.
    Our workflow involves the use of several different hot folders that use folder actions (converting InDesign CS4 documents to various quality of PDFs). All of the actions are single stream, meaning each folder does the action it's assigned and the original file is trashed and the new file remains in the folder. There are no subsequent folder actions that pull from the newly processed files. We also only run one folder action (with several files dropped in it) at a time.
    I have also tried running a pre-made generic folder action script from Apple and it, too will stop mid-process, process a few files then stop, or not work at all.
    Does anyone know what might be causing this problem with either the new Applescript or Folder Actions with Leopard 10.5.8?

    I have several scripts that all work different ways. One script I have opens the InDesign document, exports a PDF to a different folder located elsewhere on the hard drive (where a different script searches for PDFs). After this the original document is sent to the trash. Nothing new is created in the original Folder Action Scripted folder.
    What's more, even Apple's stock Folder Actions don't work properly and stop mid-process. I've seen vague reports of 10.5.8 having issues with Applescript or Leopard in general. The fact this script works perfectly in 10.4.11 makes me think that something has changed with the way Leopard handles the FA's.

  • Problems with implementing LV shared vars for executable standalone applications

    In order to implement shared variables, it appears that all networked computers must have LV compiler installed and running the code that will have the shared variables so that an association may be made thru explicit binding. The problem with this is that I want to build my applications on my development computers to use shared variables and then I want to make executables to distribute to locations that do not have LV compilers.  If shared variables are only good on a machine that is currently running he source code, then this whole shared variable idea seems very unusable.  Any ideas?

    What you need to do is build an executable from your code using the
    Application Builder, then you'll be able to run it on machines that do
    not have LabVIEW installed. These machines will need to have the LabVIEW Runtime engine (needs to be the same version as your version of LabVIEW) and any needed driver packages (NI-DAQ, VISA, ect.) installed, but these are a free download.
    Let us know if you have more questions.
    Ed
    Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
    Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.

  • PS CS4 problems with OpenGL drawing enabled

    I've just upgraded from PS CS3 to PS CS4 (default 32 and 64 versions) and I'm having problems with seeing image files above a certain size (even moderate size) with OpenGL Drawing enabled. Disabling OpenGL Drawing results in very slow image display (very easy to see the blocks being drawn one at a time), much slower than with PS CS3.
    I'm running Vista 64 with latest updates. I'm trying to get PS CS4 32 running properly first, but PS CS4 64 seems to be having similar problems.
    GeForce 9600 GT video card with latest driver 178.24 (updated yesterday and rebooted many times since then). That card is in Adobe's list of tested cards.
    Main monitor (where I display Photoshop images) selected as primary in the driver dialog.
    I put palettes/panes on my 2nd monitor.
    I use Ultramon for 2nd monitor taskbar functionality. Turning Ultramon off doesn't seem to help, although I may need to disable Ultramon from launching on reboot.
    No plugins installed yet in PS CS4 (32), as per Adobe kb advice.
    4GB of RAM with Memory Usage set within Photoshop's Ideal Range.
    For testing, I've been opening a few different size (px and bytes) RGB image files in Photoshop by dragging them from an Explorer window into the Photoshop window, then clickin in the Photoshop window to make Photoshop active and show its palettes.
    First with OpenGL Drawing enabled in Performance, default Advanced Settings.
    JPEG, 3600 x 2600 px, 4.5MB
    - opens and displays ok (short delay before palettes appear)
    - zooms and rotates smoothly
    TIFF, 2 layers, 800 x 600 px, 16 bits, 2.5MB
    - opens and displays ok (short delay before palettes appear)
    - zooms and rotates smoothly
    TIFF, 1 layer, 3600 x 2600 px, 16 bits, 54MB
    - doesn't open properly, shows checkerboard instead of image, with checkerboard in navigator and layer icon in layers pane
    - histogram is fine
    - zooming and rotation are not smooth (jumps to new position/size)
    - duplicate layer caused PS CS4 to stop working, with a close program dialog
    - open PS CS4 32 again, no OpenGL message today, and OpenGL Drawing is still enabled (although I got the OpenGL Drawing message more than once yesterday)
    TIFF, several layers, 3600 x 2600 px, 16 bits, 306 MB
    - doesn't open properly, shows checkerboard instead of main image
    - icons in layers pane look fine, same as navigator image
    - checkerboard zooms and rotates smoothly
    - duplicate layer is still checkerboard, back one history state stopped working / close program dialog
    - started PS again, opened 1 layer TIFF, closed and tried to open multi layer TIFF again, but stopped working / close program dialog again
    I then tried the same images with OpenGL Drawing disabled in Performance.
    3600 x 2600 px JPEG
    - ok, but slow, blocky redraw
    2 layer 800 x 600 px TIFF
    - ok, but slight delay in redraw (smallest of all the files, both in px and bytes)
    1 layer 3600 x 2600 px TIFF
    - opened ok, but slow, blocky redraw
    multi layer 3600 x 2600 px TIFF
    - opened ok, but slow, blocky redraw
    From what I've read in various Adobe kb notes, it sounds like there's some kind of conflict with my video driver, but I haven't been able to figure it out. I even tried the registry plugin from the Adobe kb to disallow OpenGL Windows, but that didn't seem to make any difference. It didn't even stop me being able to select and use OpenGL Drawing in PS CS4.
    Any help would be much appreciated. I'm tearing my hair out here and I'm feeling a bit like I've blown my money on the upgrade so far.

    I had another look at PS CS4 64 and those smaller (by file size) images that I can see with OpenGL Drawing on rotate and resize in a jumpy way, not smoothly like in PS CS4 32.
    The multi layer TIFF that showed the images in at least the layers pane and navigator when using PS CS4 32 only shows the checkerboard in the layers pane and navigator in PS CS4 64.
    Either way, neither version is anywhere near working properly.
    Oh yeah, and I made a typo on the RAM. It's 6GB and not 4GB, not that I think that would make any difference.

  • Had problem with bookmarks, history, back button and google links not working.

    For the last five days i've had problems with firefox. First, i noticed that it was running incredibly slowly and then that all the links in the google search were not working. Then i noticed that neither was the history, bookmarks or back button. I went on to facebook chat to ask for help. First, I was told to reinstall firefox, which didn't work. Then i was told to do a "clean" install where you rename the old firefox folder in the programs folder so that it makes sure when it's installed that everything is new and nothing is corrupted. That didn't work either. I then disabled my antivirus software and firewall to see if that was causing the problem. It was not. Then I installed an anti-malware program to remove any adware or spywar,e which it did remove from my computer, but it didn't solve the problem. The chat person was at a loss and I don't blame him/her because so was I.
    The reason I'm writing this is in case anyone else has the same problem. The only way I solved it was first by uninstalling and making sure to check the little box asking if you want all personal data and such associated with firefox also removed (which removes cookies as well) and then I finally thought to delete all the cookies from the rest of my computer also. Once all the cookies were gone and i had fully uninstalled firefox and personal data, I reinstalled it with a newly downloaded file and it is once again functioning properly. Hope this is helpful to anyone who's been ripping their hair out. :)

    '''I have the same problem!!
    But in my case, not just Google links.
    The problem happens with all the websites links.
    Please...
    Help us!!
    Thnx'''

  • Problem with "Submit to SAP" button in Adobe Form

    Hello All,
    I have a problem with my Adobe form. The "Submit to SAP" button for some reason does not seems to work in the newer forms. Whenever I click on the button, no action is being triggered. However, when I load older version of the same form, the button will respond.
    Has anyone come across similar situation before ? Any suggestions/feedback will be greatly appreciated. Thank you.
    fromKwok Wei

    Hi Bhavik,
      I created different version of the forms (Eg: added new logo, additional table rows etc...) by using the save a copy function in adobe designer. Seems that the original one works but the later ones will no longer respond to the button.
      The submit action is also correctly specified in the property of the UI Element. Otherwise it will not work on any forms... is my understanding correct ?
    Thnaks
    from
    Kwok Wei

  • Anyone had a problem with the on/off button or sleep/awake button becoming difficult to push

    the button has become stiff or maybe its broke...if you push hard enough it still works but you have to take the protective cover on an off which is a hassle

    I have the same problem with my iPad 1. Have you found a fix?

Maybe you are looking for

  • Sales Order creation with Ship to not assigned to Sold to

    Hi There, I have an issue that I am able to create an order with a Ship to which is not assigned to Sold to. i.e, The sold to accepts any ship to and not giving any error. I am giving both Sold to and Ship to together while order creation. Is it beca

  • Can I add columns to the new iTunes 11 simple view?

    More details in this picture: (http://www.qpic.ws/images/playounitunes.png)

  • IPhoto crashes and com.apple.iPhoto.plist MISSING

    I imported a rather large jpeg file into iPhoto and during the import, the application crashed.  Now the program will open momentarily, but continuously shuts down after a few seconds.  I have already tried every one of the 4 repair options when you

  • XI integration

    Hello every one....           As doing web log scenario..BW-XI integration( how to send XML data to BW from XI ). I configured all the steps in that web log..but final step is not woking eventhough i created html file nad xml file as per the web log

  • Location of Apex 4.0 themes.css file

    Hi, I want to change/manipulate the size of the fonts, text wrap for the Interactive reports in APEX 4.0. I have read that it is possible by editing the themes .CSS file. Please advice me how can I do it.What is the location of themes.CSS file , how