propecia medication In a previous post I have explained how you can create a LOV for an input parameter in WebCenter.
You can go a step further by creating a popup to allow the user to select items or do more complex things. The picker for an input parameter is a simple taskflow so you can make it as complex as you want to meet all your requirements.
An example of such a picker is the Start Folder Path of the Document Explorer taskflow:
This popup is more user friendly than when you need to type in the start folder yourself.
The documentation on how to create such a picker can be found here.
I will use the same technique to build a more useful example. Instead of adding a picker for a custom taskflow, I will create a picker for an out of the box taskflow from WebCenter.
In this example I will create a picker for the features Off parameter of the document explorer. This parameter allows you to customize the document explorer by disabling certain features. The problem with this parameter is that you have to know the exact name of the feature which few people actually know.
That's why I have decided to create a picker so you can easily check a checkbox for the features you want to disable.
You can download the example here.
The first thing you need to do is create a taskflow and provide two input parameters:
It is important to use the names outParam and inParamVal because WebCenter expects those names and types.
You also have to create a taskflow return activity:
When you execute the OK action, you also have to populate the outParam with the output value which can be found in the populateReturnValue of my FeaturesOffBean:
As you can see we have to add a value to the map with key outParamVal. It is also important to stick with the names!
The cancel button just looks for a popup and cancels it:
Because WebCenter uses ADF Security by default, you need to configure security for the taskflow. By default, new resources don't have any security which means that nobody can view them so you have to grant access in the resource grants section of the jazn-data file:
The rest of the code is just some logic that you can build.
In this example it populates a list of checkboxes and convert the values into a normal string so we can pass it on to the output value.
The next big thing is registering the taskflow as a picker. This is done in the pe_ext.xml file in the META-INF folder of the Application Sources:
Notice that the task flow definition points to an oracle out of the box taskflow instead of a custom one.
The picker itself is defined by the picker attribute on the enumeration tag.
That's basically it. It's not that difficult to do. The most important part is that you keep the names of the input parameter of the taskflow. Otherwise it will not work.
This is how it looks when you select the picker:
When I press OK the featuresOff field will be populated with the value:
And the explorer will disable those features:
That's about it.
You can make those pickers as complex as you want. Remember that they are normal taskflows so you can create a flow between views, create advanced LOV's and so on.