Showing posts with label Oracle Application Express. Show all posts
Showing posts with label Oracle Application Express. Show all posts

Saturday, February 25, 2012

The Truth About False Actions

When Martin D'Souza was writing his chapter on Dynamic Actions for Expert Oracle Application Express, he sent me a bit of it for a technical review. I did the same with him for my chapter on Plug-ins. At the time, both of these topics were very new and I immediately learned something from a decision tree that he had created to show how Dynamic Actions work from a high level. The tree very clearly showed that false actions will only be executed if two things are true:

  1. The Dynamic Action must have a condition
  2. The condition must evaluate to false
It sounds simple enough but this important fact seems to loose itself on those that are new to Dynamic Actions. Even when this fact is understood, developers may still have trouble getting the false actions to fire because they can't think of a condition that will work for their situation. The key lies in understanding conditions and how flexible they can be.

Let's start by looking at a simple example. Let's say you want to hide/show a region based on the value of an item: 



The When portion of the Dynamic Action may look like:



Obviously the true action in this case is to show the region and the false action would be to hide the region. In this example we were able to make use of one of the declarative condition types: "equal to". Here are all of the options you have for the condition:



Most of the options are declarative, simply changing the way that the Value specified is evaluated. But there are two options which are a little different: "- No Condition -" and "JavaScript expression".

If you select "- No Condition -", guess what, NO FALSE ACTIONS! At that point only the event matters - in our current example that's the change event on the item P1_HIDE_SHOW. The Dynamic Action framework does a good job of making this point obvious by hiding the false actions when there is no condition but I wanted to make sure to remind readers of this fact here.

"JavaScript expression" is the powerhouse option. This is the option that you must learn to use! Like the declarative options, the JavaScript expression condition changes the way that Value is evaluated but it's much more flexible as you can enter any JavaScript expression you like. If you click on the label for the Value item you get the following popup:



Of the three bullets, the one you want to learn first is this.triggeringElement. Using the combination of the JavaScript expression condition type and this.triggeringElement, developers can create conditions that allow false actions to execute when they otherwise wouldn't.

Let's look at another example. Here the show/hide is based on two conditions rather than one:



At first glance it may seem impossible to do this with a Dynamic Action but with the JavaScript expression condition we can do it:



I could have simply hard coded the id for the first element but I wanted to show how one could use this.triggeringElement as it's more flexible - imagine using it in a tabular form where there are many checkboxes with "random" ids.

As you can see, Dynamic Actions are an incredible feature of APEX and with a little knowledge of HTML, CSS, and JavaScript they become even more powerful. Learn to use this feature sooner rather than later and look for the functionality and flexibility of the framework to increase with future releases of APEX. And if you remember nothing else from this post, remember that false actions only fire if there is a condition and it evaluates to false.



Saturday, January 14, 2012

SkillBuilders Save Before Exit 3.0

I've just finished the latest update to the SkillBuilders Save Before Exit plug-in. Here's a summary of the changes in version 3.0:

  • Added setting to highlight items that were modified (thanks to Alex for the idea)
  • Implemented “fix” for IE issue that caused users to be prompted two times rather than just once (this was removed at some point but has been added back in)
  • Added modifiedItems method which returns a jQuery object of the APEX items that were modified 
  • Renamed Ignore Change Selector setting to Ignore Modifications Selector. Also renamed changeDetected method to modificationDetected (similar naming convention now used throughout plug-in)

The new highlighting feature is awesome! Check out a demo here.

Be sure to visit our plug-in page to learn more about the plug-in and to download a copy. Enjoy!


Thursday, January 5, 2012

New Webinar: Introducing SkillBuilders Super LOV 2.0

It's almost time to release SkillBuilders Super LOV 2.0! The release will be next Thursday and we'll be holding a webinar to be sure everyone knows how to best leverage the plug-in.

Abstract

Since its introduction just over one year ago, the SkillBuilders Super LOV (list-of-values) plug-in has been our most popular plug-in by far. In short, Super LOV displays multi-column LOVs. Due to its popularity we are more committed than ever to making this plug-in better.

To celebrate Super LOV's first birthday (a little belated), we are releasing version 2.0 which brings one of the most requested features since day one: enterable!

Of course enterable is only one of the many features offered by Super LOV at this point. In fact, Super LOV is so action-packed with features we thought it would be fun to invite you to a webinar to show you how to use them all. So if you are in need of a multi-column LOV solution, or you'd simply like to learn more about installing and leveraging plug-ins in APEX, do not miss this session.

Click here to register for the webinar.

As usual, it’s free to attend – but it’s real training. I'll show you how the basics of what the plug-in offers and how that differs from what's available out of the box with APEX. Then take you through the steps of installation and configuration so that you can add Super LOV to your applications immediately.

The webinar will run on Thursday, January 12th, at 1pm EST. To see other time zones, click the registration link and then on the “Show in my Time Zone” link at the top of the page.