Skip to main content

Posts

Showing posts from 2011

InvalidOperException : JBO-25221

It could be due to many reasons but the one that caused this error in my case was pretty simple. I had generated data control and dragged on my page. At this point the method signature was:

myMethod(int a, int b)

Later on I changed method to:

myMethod(int a, int b, int c)

and regenerated the data control. But I forgot to update the definition in the pageDef of the page. And when I tried to execute the method I got this error.

So I just updated the method definition in my pageDef and everything worked fine :)

ADF: How to pass parameters between taskflows?

Simple stuff actually for most ADF users but this post is for the absolute beginners.
Here is the sample Taskflow design and we need to pass parameters from Caller TF to Callee TF.

Go to the definition of Callee TF and goto Parameters tab and define the Input Parameter Definitions.
Now go to the taskflow design and click on the Callee TF and go to the properties tab. In the 'Parameters' section you will see the parameters that you defined earlier. Here you should fill in the values that you want to pass.


On the event of which the Callee TF is called, you should set the values in the pageFlowScope.param1 and param2.
<af:commandToolbarButton id="ctbCreate" action="dialog:showWizard" > <af:setPropertyListener from="0" to="#{pageFlowScope.dpDimensionId}" type="action" /> …

[Deployer:149164]The domain edit lock is owned by another session in exclusive mode - hence this deployment operation cannot proceed.

If ever you see this error while starting an application in Jdev, you can perform following steps:

1. Go to admin console of the integrated weblogic: http://127.0.0.1:7101/console
2. Login to server console by using default username/password which would be weblogic/weblogic1.
3. On successful login just click the button on the upper left corner where you can activate pending changes or discard pending changes. This would resolve the issue.

If however you are not able to logon to the weblogic console do either of these steps:
a) Go to Jdeveloper installation directory. Search for *.lok files and delete them.
b) If you find nothing in the above directory goto C:\Documents and Settings\\Application Data\JDeveloper directory and delete edit.lok file.

This will definitely resolve your issue.

How to create ADF components on runtime?

Quite easy actually! There are two methods by which we can do it. Either we can create the component in the managed bean and add it to the children of an existing component, or we can create it in our .jspx or .jsff page directly.

1) Creating component in the Managed Bean.

In the below code we are creating a new ShowDetailItem which we will add to an existing panelTabbed item.

private UIComponent createComponent() {
UIComponent componentToAdd = null;

//Create new object of ShowDetailItem and set its properties.
RichShowDetailItem item = new RichShowDetailItem();
item.setDisclosed(true);
item.setText("new tab");
componentToAdd = item;

//Now that we are at it, I am creating a new iFrame which will be set inside the ShowDetailItem
RichInlineFrame frame = new RichInlineFrame();
frame.setSource("http://oracle.com");

//add the iFrame to the children of the ShowDetailItem
componentToAdd.getChildren().add(frame);