I have a task flow that has one managed pageflow scope bean and one .jsf. The .jsf does have a pageDef. I am confused as to what getCurrentBindingsEntry() is doing. I could have multiple .jsf in my task flow; some with pageDef files and some without. Which .jsf pageDef is it trying to hook to?
Also, what is the correct way to import the ADFUtils and JSFutils into my application? I have the .java files. I tried to include them by creating a package under ViewController/Application Sources. In the package I created two .java files and cut and paste the ADFUtils and JSFUtils files into the new .java files. Clearly this is NOT the way to do it. it gave me a load of compile errors, permanently locked the .lok file and created some files/directories with names that were a mile long. I could not even make a copy of my application directory because some file names were too long. Fortunately, I keep backup copies of my application; I restored the latest good copy and I am good to go.
I believe that the reason getCurrentBindingsEntry() returned null is that I was calling it in a page flow scope managed bean. The JavaDoc for getCurrentBindingsEntry() indicates that it must be in request scope. This makes sinse because the page flow managed bean would not necessarilyl be associaged with a particular page or its bindings.
Hi Steve, I am not sure if the issue is related to the scope of the bean because I am using the same method in pageFlowScope beans without a problem. However, I just ran into the same problem you are experiencing today. The problem in my case was that my BTF's default activity was a method call which was attempting to call getCurrentBindingsEntry. I changed the default activity to a view and then called getCurrentBindingsEntry in the constructor of the bean. This resolved the issue. Could it be that you have a similar situation?
I get the same results as you. It does not work if called from the method set as default activity. It also does not if called from the method set as the btf initializer. It only seems to work if called from the btf constructor.
What would this code return if the btf has multiple pages. Which page binding would this return?
BindingContext bc = BindingContext.getCurrent();
DCBindingContainer binding = (DCB indingContainer)bc.getCurrentBindingEntry();