Skip navigation.

Shay Shmeltzer

Syndicate content
Tips and information about Oracle JDeveloper and Oracle ADF
Updated: 15 hours 16 min ago

Dynamcially add components to an Oracle MAF AMX page & show and hide components

Wed, 2014-12-31 14:18

A question I saw a couple of times about Oracle MAF AMX pages is "how can I add a component to the page at runtime?".

In this blog entry I'm going to show you a little trick that will allow you to dynamically "add" components to an AMX page at runtime, even though right now there is no API that allows you to add a component to an AMX page by coding.

Let's suppose you want to add a bunch of buttons to a page at runtime. All you'll need to have is an array that contain entries for every button you want to add to the page.

We are going to use the amx:iterator component that is bounded to the above array and simply goes over the records and renders a component for each one.

Going one step beyond that, I'm going to show how to control which components from that array actually shows up, based on another value in the array.

So this is another thing you get to see in this example and this is how to dynamically show or hide a component in an AMX page with conditional EL. Usually you'll use this EL in the rendered property of a component, but in the iterator situation we need to use another approach using the inlineStyle that you change dynamically.

You can further refine this approach to control which type of component you render - see for example this demo I did for regular ADF Faces apps and apply a similar approach. 

By the way - this demo is done with Eclipse using OEPE - but if you are using JDeveloper it should be just as easy :-) 

<p> </p>

Here is the relevant code from the AMX page:

<amx:iterator value="#{bindings.emps1.collectionModel}" var="row" id="i2">

<amx:commandButton id="c1" text="#{}" inlineStyle="#{row.salary >4000 ? 'display: none;' : 'display: inline;'}">

<amx:setPropertyListener id="s1" from="#{}" to="#{viewScope.title}"/>



Categories: Development

Modifying the Oracle Alta Skin

Wed, 2014-11-19 14:38

In the previous blog entries I showed you how to create an ADF project that uses the new Alta UI and then showed you an example of implementing one of the design patterns for a flip card. In this blog/video I'm going to show you how you can further fine tune the look and feel of your Alta application by modifying and extending your skin with CSS.

At the end of the day, this is going to be done in a similar way to how you skinned previous ADF applications. (If you have never done this before, you might want to watch the videos in these two blog entries).

But since the skinning design time is not completely there for Alta in JDeveloper 12.1.3 there are a couple of tricks. Specifically when you create the new skin, you'll need to change the trinidad-skins.xml file to indicate it is extending the alta-v1 and not skyros-v1  - <extends>alta-v1.desktop</extends>

Then the rest of your tasks would be basically the same (although you won't see the overview tab in your skin editor).

So here we go:

Categories: Development

Card Flip Effect with Oracle Alta UI

Fri, 2014-11-14 17:00

The Oracle Alta UI focuses on reducing clatter in the user interface. So one of the first thing you'll try and do when creating an Alta UI is decide which information is not that important and can be removed from the page.

But what happens if you still have semi-important information that the user would like to see, but you don't want it to overcrowd the initial page UI? You can put it on the other side of the page - or in the Alta UI approach - create a flip card.

Think of a flip card as an area that switches the shown content to reveal more information - and with ADF's support for animation you can make a flip effect.

In the demo below I show you how to create this flip card effect using the new af:deck and af:transition components in ADF Faces. 

A few other minor things you can see here:

  • Use conditional ELs and viewScope variables - specifically the code I use is 
#{ eq 'box2' ? 'box2' : 'box1'} 
  • Add additional field to a collection after you initially drag and dropped it onto a page - using the binding tab
  • Setting up partialSubmit and PartialTriggers for updates to the page without full refresh 

Categories: Development

Developing Your First Oracle Alta UI page with Oracle ADF Faces

Mon, 2014-10-27 11:20

At Oracle OpenWorld this year Oracle announced the new Oracle Alta UI - a set of UI guidelines that will help you create better looking and functioning applications. We use these guidelines to build all our modern cloud based applications and products - and you can use it too today if you are on JDeveloper 12.1.3. 

The Alta UI site is at

Take a look for example at one page from the master details pattern page:


You might be wondering how do I go about starting to create such an Alta page layout?

Below is a quick video that shows you how to build such a page from scratch.

A few things you'll see during the demo:

  • Basic work with the panelGridLayout - for easier page structure
  • Working with the new tablet first page template 
  • Enabling selection on a listView component
  • Working with the circular status meter
  • The new AFAppNavbarButton style class
  •  Hot-swap usage to reduce page re-runs

One point to raise about this video is that it focuses more on getting the layout and look rather then the Alta way of designing an application flow and content. In a more complete Alta mind-set you'll also figure out things like fields that probably don't need to be shown (such as the employee_id), you'll think more about "why is the user on this page and what will he want to do here?" which might mean you'll add things like a way to see all the employees in a department in a hierarchy viewer rather than a form that scroll a record at a time.  There are more things you can do to this page to get even better functionality, but on those in future blog entries... 

Categories: Development