Invoking pageflow action from Backing Files
Hi,
I have a requirement to be able to force a pageflow to a particular state by invoking a specific action on the pageflow from the preRender() method of a backing file.
I.e under certain circumstances i want to force the portlet to return to its 'initial' state by running the begin action. It has to be done programitically and not setting refresh-action on the portlet.
Is it possible to do this programatically from a backing file ? Is so any sample code would be appreciated !.
TIA
Martin
What do you mean by state of a page flow?
If you want to set the state of the portlet you can do that easily using the PortletBackingContext.
If you want to clear the instance variables of a pageflow, you can do that by overriding methods in the parent class of PageFlowController.
Kunal
Kunal Mittal
Similar Messages
-
What is the best way to call a pageflow action from JavaScript?
What is the best way to call a pageflow action from JavaScript?
Thanks,
JohnJohn,
How would I do this from a grid??? Unfortunately there are no JavaScript attributes
on any of the grid tags that I can see.
Thanks,
John
"John H" <[email protected]> wrote:
>
Thanks John!
"John Rohrlich" <[email protected]> wrote:
John,
If you want to put up a confirm dialog before calling an action from
an
anchor it is done as follows.
Here is an example from code of mine that deletes a customer order,if
the
user confirms the delete. I pass the order id as a parameter.
- john
Here is the JavaScript -
function confirmDelete() {
if(confirm('Continue with order delete?'))
return true;
else
return false;
Here is a sample anchor tag -
<netui:anchor action="requestToDeleteOrder" onClick="return
confirmDelete(); return false;">
Delete
<netui:parameter name="orderId" value="{container.item.orderId}"/>
</netui:anchor>
"John H" <[email protected]> wrote in message
news:402138f5$[email protected]..
Thanks for the replies. I figured it was going to require buildingmy own
url
to call the action. I had hoped there was an easier way to do it.Rich,
the
reason I want to do this is because I want to call the JavaScript
function
confirm()
when a user clicks on a link (in a repeater/grid) to drop a record,I only
want
to call the drop action if the user confirms the drop. Maybe thereis a
better
way to do what I am trying to do??? I really appreciate any help
you
guys
can
give me on this, I am pretty new to this sort of stuff.
Thanks,
John
"Rich Kucera" <[email protected]> wrote:
"John H" <[email protected]> wrote:
What is the best way to call a pageflow action from JavaScript?
Thanks,
JohnTry figuring out the URL to the pageflow action, create a hidden
form
in the
page, then use JS to submit the form. Why would you want to though,
isn't
the server going to want to send you to the next page? -
Invoking ADF Actions from JS API
Is there a way to invoke an action from a javascript function? Something that would perhaps mimic what this commandLink does:
<af:commandLink text="Lights, Camera, Action!"
id="chuckNorris" action="flyingKick"/>
What I am looking for is the ability to invoke the action "flyingKick" from a javascript function.Thanks, I actually already saw this. What I need though is something that doesn't a serverListener though - a programmatic version of a commandLink with an action if you will.
-
Calling other pageflow action from header
hi
I want to call an action from header bt it throws global app exception and if i give .jsp path in href then the headers nad footers are not coing
plz help me outyou can use <netui:anchor> tag in your header jsp to call an action that is defined in Main Controler.jpf
Since header is not part of any portlet, any actions that you want to call from header should be defined in Controler.jpf file which is under your WebApp.
But when you do this, you might loose portal context. so you can only use this solution to implement 'logout' or similar functionality where you dont care about portal context after the call.
Another solution is to mimic the url that portal generates when we call a pageflow action. this is not a clean solution but it works and you won't loose portal context.
-Subba -
Invoke task flow from backing bean?
Hi,
Is there a way to invoke task flow from a backing bean? If yes, how?
Thanks in advanceThanks Frank. I am not an expert with ADF so please bear with me if my questions doesn't make sense. Basically what I am trying to achieve is this.
I have a taskflow and I am currently in a ui page which displays a page fragment inside this task flow. In this page, on click of a button, I need to call another task flow and show it in a adf popup. Is this the case referred in the pdf document that you pointed out?
Thanks -
Changing current page from backing file
Using WL 8.1 SP4
I have a User Acceptance Policy page in my portal, and I want to ensure that users have viewed this page before I allow them to view any other content.
When users have viewed the UAP, I set a session variable. I then use the session variable in my entitlements, so there's no problem with them viewing content they shouldn't.
The problem I have is that if users try to access a page directly (or their session has expired), they're left with a blank page (as they're not entitled to see anything), rather than being sent to something helpful (i.e. the UAP).
So I need a backing file. It can either be on every page (except the UAP), or I can put it on the book - whatever is recommended.
I've tried this as a page backing file:
public class UAPCheck extends AbstractJspBacking {
public boolean handlePostbackData(HttpServletRequest request, HttpServletResponse response){
PageBackingContext pbc = PageBackingContext.getPageBackingContext(request);
if (pbc.getLabel().equals("uap_page")
|| request.getSession().getAttribute("UAP Accepted") != null){
return true;
} else {
pbc.setupPageChangeEvent("uap_page");
return true;
I've applied this to pages in my book, however nothing happens - the page change request never fires!
So what's happening here? Am I misunderstanding what setupPageChangeEvent is for?
Help is appreciated.
darrenIn the past I have done it as follows:
1. Create a backing file for the book that has these pages.
2. In the preRender of the backing file do the following
BookBackingContext bbc=
BookBackingContext.getBookBackingContext(getRequest());
if( //check to see if page change event is needed)
{PageBackingContext pbc_current =
bbc.getActivePageBackingContext();
pbc_default.setActive(false);
PageBackingContext pbc_pageToBeShown=
bbc.getPageBackingContextByDefinitionLabel("//
def label of page to be shown, in your
case 'uap_page'");
pbc_pageToBeShown.setActive(true);
return true;
else return true;
3. link the backing file to book
Recommendations:
* Don't use backing files for Portal components if they are not needed. (From your post, if I am not wrong, you are using backing files for all pages in the book which is not necessary and can cause unnecessary complications)
* Read this doc to understand life-cycle methods of portal components http://edocs.bea.com/wlp/docs81/pdf/taxonomy.pdf
Peruse the above document to understand what is going wrong with your code.
* Remember that the life cycle methods for components that are not active will not be rendered if treeOptimizationEnable parameter is set to true ( this parameter can be seen in workshop under property editor)
* When calling one of the setupxxevent methods, it must be done on the backing context that the backing file is tied to. If you do not do this the event may not get fired. For more info click http://e-docs.bea.com/wlp/docs81/whitepapers/netix/body.html
Seenu
Seenu. -
How to invoke and receive from csv file
I have an employee.csv file which contains empid and empname deatils,
I want to fetch corresponding empid by giving input as empname from the employee.csv file and write empid into DB
I had created an read file for employee.csv, but for the receive activity only one variable is created
how to give input(empname) to the file and to get the empid from that file.
Please help me from this issueIn receive activity output file will contain the information of the entire list of empid and emp names. Wrive java code in java embedded activity to fetch the details of your desired output then use assign activity to continue your flow.
try {
oracle.xml.parser.v2.XMLText text =(oracle.xml.parser.v2.XMLText)getVariableData("OnMessage_composeAndDistributeMQ_InputVariable","payload","/client:composeAndDistributeRequest/client:ControlInformation/client:SystemID/text()");
String SystemID = text.getNodeValue();
Calendar cal = Calendar.getInstance();
SimpleDateFormat justDateTime = new SimpleDateFormat("yyyyMMddHHmmss");
String DateTimeString = justDateTime.format(cal.getTime());
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");
Date now = new Date();
addAuditTrailEntry("Now = " + df.format(now));
long timeInMilli = now.getTime();
addAuditTrailEntry("Date() - Time in milliseconds: " + now.getTime());
String DRI = SystemID + "003" + DateTimeString + timeInMilli + "0000001";
setVariableData("Invoke_RequestMQ", "body", "/ns2:DocumentRequests/ns2:DocumentRequest/ns2:MailItemInfo/ns2:DocumentRequestId", new String(DRI));
catch (Exception e) {
e.printStackTrace();
} -
Invoking JSF actions from a hyperlink
I suspect I already know the answer to this question based on my experiments and what I've read on the web and in books, but I thought I'd ask here just in case.
The basic problem is that I would like to invoke JSF from a hyperlink. For example: mystore.com/displayProduct.faces?id=1234
But I can't. JSF just seems to be (intentionally) built not to allow access to the JSF lifecycle via GET requests. Which makes it fine for web sites that are composed simply of loads of forms, but seems quite unsuitable for web sites that need to display products and search results via links that are easy to bookmark and easy for search engines to crawl.
Thanks for any words of wisdom anyone might have...Thanks for the reply and the link. I had a look at the linked thread and might be able to use that technique for getting parameters out of a GET request into my action, but I still need to get JSF to call my action method somehow and there is no way that I can see to tell it which method to call.
Also, it seems like manually reading values from the request is sidestepping a lot of JSF and losing out on the value that it adds, i.e. validating and converting the parameters for me. I could manually populate components in the bean and then call the validators and converters myself, but still. -
Invoking binding operation from backing bean -- no data displayed in ADF table ?
Hello experts, I have data control derived from Web Service proxy client. In this data control, I have multi record list derived from web service call.In my ADF page, I have bunch of input components with many drop down lists and radio buttons, check boxes etc.
Finally I want to transfer user input to data control. In my ADF page, I have mapped the result set of data conrol to ADF table.
When I click submit button, the input data from ADF page is passed to data control operation. In the bean method, I am making use of operationBinding.execute() and operationBinding.getParamsMap().put(). I see it is fetching data by checking getResult().
I am invoking partial trigger also on the table. However, table is not getting populated with the data.
please help me. Jdeveloper verion is 11.1.1.6. I have set "Refresh" attribute to "never" for iterator in the bindings tab. But no luck. I see that control coming to data control and calling web service and getting the data and then it comes back to my bean method submit() and I see that getResult() is showing records fetched. But why the table on ADF page is not showing the data ?
thanks a lot in advance.I still not able to get my table updated with data. If I set "Refresh" to "ifNeeded", soon after coming out of submit method of bean, it again tries to execute the web service call in the data control and brings empty result since the search parameters are empty. I do not know why it goes again to data control method. So, when I hit submit button, the bean method calls operationBidnding.execute() and before this I set the parameters also. After execute(), addPartialTarget() gets executed and it comes out of submit. At this time, it is supposed to go to ADF page. But I see that it tries to execute method in data control with empty parameters. This is ridiculous. It neither works with "never", nor with "ifNeeded".
I see many forums on this issue but no solution found...all those forums are not answered. This looks like it is a bug in ADF table not able to refresh from managed bean !!!!
thanks -
Problem while invoking popup from backing bean
I am invoking a popup from backing bean method.
The same backing bean method has the business logic which depends on the data collected from popup(user enters some data on popup).
So I need the business logic to be executed after popup comes up.
The popup is coming after the execution of return statement in backing bean method . How do i make popup trigger at earlier point in the method.
<af:commandToolbarButton text="#{corePostupgradeuiBundle.SIGN_OFF_MIG}"
id="socb52"
partialSubmit="true"
actionListener="#{viewScope.signoffBean.signOffAgents}"
partialTriggers="t3"/>
public void signOffAgents(ActionEvent event) throws SQLException {
DCBindingContainer bc =
(DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
DCIteratorBinding summaryIter =
bc.findIteratorBinding("Signoff1Iterator");
showPopup("credentials"); //will get credential details from user and store in credential Bean
//Following logic uses the data collected from popup
EMCredentialReference credRef= credentialBean.getCredReference();
submitJOb(credRef);
public static void showPopup(String popupId) {
FacesContext context = FacesContext.getCurrentInstance();
StringBuilder script = new StringBuilder();
script.append("AdfPage.PAGE.findComponent(\"").append(popupId).append("\").show();");
ExtendedRenderKitService erks =
Service.getService(context.getRenderKit(),
ExtendedRenderKitService.class);
erks.addScript(context, script.toString());
UIComponent component = context.getViewRoot().findComponent(popupId);
RequestContext.getCurrentInstance().addPartialTarget(component);
}Well, your work flow is wrong.
What you try to accomplish should work out of the box as
1) user hit toolbar button
2) this opens a popup "credentials" which have listeners for ok and cancel
3) use fills in data in popup and hit ok or cancel
4) one of the listeners gets fired
5a) if OK listener you do your business logic
5b) if cancel you do something else
So all you have to do is the use a af:af:showPopupBehavioron the toolbar button, add a popup canel listener (if you need to act on canel) dependign on your popup design (dialog or simple button) add the appropriate listeners and in the listener method so your business logic.
Timo -
How can I have a backing file call a JavaScript function?
I have a Weblogic portal with a JSP portlet. The portlet has a backing file. How can I get the backing file to call a JavaScript function in my portlet?
thanksHi
your questions are not correct because you are mixing up server side operations with client side operations.
First server side code executes then the page is sent to the browser , then any javascript executes on the browser. So asking for javascript to be called from backing file (server side) doesn't make sense or asking for javascript to read a parameter doesnt exactly work either.
However in your server code suppose you have a variable action in the request that you want javascript to know then in your JSP you would add something like
<script type="text/javascript">
var action = '${requestScope.action}';
alert(action);//or whatever you want to do
<c:if test="${requestScope.someOthervariable == ''xyz'}"><%-- this check is done on the server --%>
callSomeJavascript(); <%--this javascript is only executed when the server side value of someOtherVariable is xyz --%>
</c:if>
</script>
i.e. you can output the javascript that has the variables you need or the function calls you want.
Like I said understand whats server side and whats client side. -
Web services and ADF 11g- get Result from backing bean
I'm executing an action from backing bean (call Web service that returns complex data types)
BindingContainer bindings = getBindings();
OperationBinding operationBinding = bindings.getOperationBinding("unesiPonudu");
Object result = operationBinding.execute();
result is instance of oracle.adf.model.adapter.dataformat.XMLHandler$DataCollection but DataCollection is not accessible.
How to get results from method?
Tnx,
AndrejaHi,
there should be a result iterator in the Executables section which cotnains the result. If not, create it from the WS result entry in the DC palette. Once this iterator gets updated, you get the data from this iterator as it would be the case of a table accesses the WS
Frank -
How to invoke commandLink action?
Hi!
On my page i have commandLink defined like this:
<af:commandLink binding="#{regBean.cmdLink}" text="commandLink 1" action="#{regBean.startRegistration}"/>
i need to invoke its action automatically when the page is loaded (it is just "please wait" page") ... i have pagePhaseListener, my own afterPageLoad() method is invoked at right time.
System.out.println("afterPageLoad");
Object retVal = cmdLink.getAction().invoke(FacesContext.getCurrentInstance(),null);
System.out.println("afterPageLoad end- "+retVal);
But when i try invoke commandLink action from this method, it is not invoked, even debugging message after this call is not processed, no exception is thrown..
What am i doing wrong? thanks a lot for any help
Tomasimport javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Test extends JFrame {
public Test() {
setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
Container content = getContentPane();
JButton jb = new JButton("DO NOT PRESS");
jb.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
doFirstThing();
doSecondThing();
content.add(jb, BorderLayout.SOUTH);
setSize(200,200);
show();
private void doFirstThing() { System.out.println("I'm doin mah thing!"); }
private void doSecondThing() { System.out.println("I wanna go first!"); }
public static void main( String args[] ) { new Test(); }
}If you want something different from this, you are going to have to explain more. -
Is it possible to bind backing files to portlets that are in pageflows? (There
doesn't seem to be a "Backing File" property in the property editor for portlets
created from pageflows.) If not, is there another way to manage custom portlet
rendering (hide this, show that, set mode to this, etc.)?
Thanks!you can crack open the .portlet file and add it yourself
<netuix:portlet backingFile="com.somecompany.MyBackingFile" ...>
"Claus Ljunggren" <[email protected]> wrote:
Marc,
Did you ever solve this issue?
/Claus Ljunggren
"Marc N" <[email protected]> wrote in message
news:40439a49$[email protected]..
Is it possible to bind backing files to portlets that are in pageflows?(There
doesn't seem to be a "Backing File" property in the property editorfor
portlets
created from pageflows.) If not, is there another way to manage customportlet
rendering (hide this, show that, set mode to this, etc.)?
Thanks! -
continued...I can't find the MediaDataBase.db3 file in Locales>en_us. So I can't access my actions from Florabella...Help?
That file could be set as a Launch Agent or Daemon in your ~/Library or /Library, You could try to look for it or Safeboot your computer and then empty the trash. Safebooting disables Launch Agents/Daemon and Third Party Kernal extensions. Here's the article to Safeboot OS X: What is Safe Boot, Safe Mode? - Apple Support
Maybe you are looking for
-
hi, In LSMW, when i'm trying to Specify a file, iam getting a error message "No Logical Path Specified". I've given the file name and path correctly( the file will be on the PC Frontend). regards, Krishna
-
Changes in Usergroup not possibule
Hi All, I am getting the short dump in sqo3 when trying to change the usergroups in SQ03 , by selecting standard cross client as query area We had opened the Message with SAP and they respond that some SYSTXXXXXXX usergroups was assigned to more th
-
In my JPA project I'm using these three classes: Cart.java: package com.spinnaker.pedja; import java.sql.Date; import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; import java.util.Set; import javax.persistence.*; @Entit
-
I can upgrade other components of CS5 but not these three. What can I do to get these updates to be processed on my Windows 8.1 64-bit platform?
-
The complete error message reads: Error getting license. License server communication problem E_AUTH_BAD_DEVICE_KEY_OR_PKCS12 I have contacted the company that I got the downloadable file from, and they say it is an Adobe problem. Does anyone know