Omniportlet is a oracle webcenter suite portlet which takes value from multiple sources and show those data in a format configured by us. Omniportlet can be used as a chart tool in oracle adf application also if you
have webcenter suite application. If you are using webcenter suite in your organization most probably you will use oracle ADF framework to develop your custom applications. In this article I have shown how you can pass some values from ADF application to omniportlet to show a chart in view layer.
have webcenter suite application. If you are using webcenter suite in your organization most probably you will use oracle ADF framework to develop your custom applications. In this article I have shown how you can pass some values from ADF application to omniportlet to show a chart in view layer.
Let’s take one omniportlet which publish data from XML source based on the parameter passed to it. You have configured omniportlet such a way that if you are passing “name” parameter to the omniportlet, it will show the weight of the person in a chart corresponding to that person’s name like the following way ->
Here you have passed the value “Richard” to the omniportlet to see the weight of Richard in a chart.
Now, you have one database table where you are storing Name and phone no. of the person. Now, create one ADF application which will show the name and phone no. in tabular format in one web page like this ->
The JDeveloper view of this page is as follows ->
In the page add one ADF table and your omniportlet.
[ For your reference, here I am showing the structure of business components that I have created for our ADF application ->
]
Until now you have added one ADF table and omniportlet in the page and omniportlet is taking one parameter as input. Now our aim is to configure omniportlet such a way that it will take input from the ADF table.
Right click on the JSF page, and select go to page definition.
See the structure window of the page definition file. Expand the executable node. You can see a set of page variables under the “variables” node. When a portlet is added on a page, JDeveloper checks to see if the portlet has public portlet parameters. If it does JDeveloper automatically adds the corresponding no. of page variables and maps them to the portlet parameters. After expanding “omniportlet1_1”, you can also check the omniportlet variables.
Now, you want to pass value to “Param1”. Right click on it and select go to source. Notice that “Param1” is mapped to page variable “OmniPortlet1_1_Param1”.
Now select the “OmniPortlet1_1_Param1” and then you need to set page parameters default attribute value.
Click on “…” icon beside DefaultValue. A wizard like this will come.
Expand ADF Bindings > bindings. Double click on Address view [Your view object name]. Now, in the expression field give the value of the name of the view object field that you want to pass after a “.”. The expression looks like this ->
Now if you run the page you will get the output like this ->
No comments :
Post a Comment