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 out
you 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
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? -
How to call multiple strus actions froma single jsp
how to call multiple strus actions froma single jsp, and that actions should be automatically called pls help me
Thanks in advancehow to call multiple strus actions froma single jsp, and that actions should be automatically called pls help me
Thanks in advance -
How to call a struts action from a JSF page
I am working on a small POC that has to do with struts-faces. I need to know how to call a struts ".do" action from a JSF page..
Sameer Jafferis it not possible to call a action from the faces submit button and/or the navigation?
This a simple POC using struts-faces exmaples.
Here is my struts-config and faces-config file.
<struts-config>
<data-sources/>
<form-beans>
<form-bean name="GetNameForm" type="demo.GetNameForm"/>
</form-beans>
<global-exceptions/>
<global-forwards>
<forward name="getName" path="/pages/inputname.jsp"/>
</global-forwards>
<action-mappings>
<action name="GetNameForm" path="/greeting" scope="request" type="demo.GreetingAction">
<forward name="sayhello" path="/pages/greeting.jsp"/>
</action>
</action-mappings>
<controller>
<set-property property="inputForward" value="true"/>
<set-property property="processorClass"
value="org.apache.struts.faces.application.FacesRequestProcessor"/>
</controller>
</struts-config>faces-config
<faces-config>
<managed-bean>
<managed-bean-name>calculate</managed-bean-name>
<managed-bean-class>com.jsftest.Calculate</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>GetNameForm</managed-bean-name>
<managed-bean-class>demo.GetNameForm</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<navigation-rule>
<from-view-id>/calculate.jsp</from-view-id>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/success.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>failure</from-outcome>
<to-view-id>/failure.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/inputNameJSF.jsp</from-view-id>
<navigation-case>
<to-view-id>/pages/greeting.jsp</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>in my inputNameJSF.jsp (faces page)
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@ taglib prefix="s" uri="http://struts.apache.org/tags-faces" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Say Hello!!</title>
</head>
<body>
Input Name
<f:view>
<h:form >
<h:inputText value="#{GetNameForm.name}" id = "name" />
<br>
<h:commandButton id="submit" action="/greeting.do" value=" Say Hello! " />
</h:form>
</f:view>
</body>
</html>I want to be able to call the struts action invoking the Action method in the that returns the name
package demo;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
public class GreetingAction extends org.apache.struts.action.Action {
// Global Forwards
public static final String GLOBAL_FORWARD_getName = "getName";
// Local Forwards
private static final String FORWARD_sayhello = "sayhello";
public GreetingAction() {
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
String name = ((demo.GetNameForm)form).getName();
String greeting = "Hello, "+name+"!";
request.setAttribute("greeting", greeting);
return mapping.findForward(FORWARD_sayhello);
}Edited by: sijaffer on Aug 11, 2009 12:03 PM -
Ajax call to pageflow action: how to read action output objects?
I have a pageflow action like:
doSomething()
Customer[] customers = null;
// build the customer array
Forward f = new Forward("success");
f.addActionOutput("customers", customers);
return f;
I am calling this action from my javascript function using AJAX. How do I read the Customer array in my javascript? I am using the DOJO library.
dojo.xhrPost({
url: "/pageflow.doSomething", // I have URL rewrite rules set up whic forwards to the necessary pageflow function
content: {
"key":"value",
"param":"test",
handleAs: "JSON",
handle: function(data,args){
// WHAT GOES HERE?
});This isn't so much pageflow-specific, as AJAX specific. For the xhr call to work, the url (whatever it is) needs to output a valid json object structure so the dojo method can interpret it into a javascript object. So, you would need to make the jsp/servlet which is the forward of the pageflow action output that json structure (instead of HTML). There are many utility libraries out there for creating json from java objects -- just search around the internet; or you could create your own. [http://json.org] is handy starting point.
So, as an example, I could imagine your customer json looking like:
"customers" : [
{ "id": 1, "fname": "John", "lname": "Doe", "addr": "1234 5th St. Anytown, CA" },
{ "id": 2, "fname": "Joe", "lname": "Blow", "addr": "6789 10th St. Anytown, CA" }
Then, in the "// WHAT GOES HERE?" section, you would access that array as any javascript array, e.g:
function (data, args) {
var customers = data.customers;
for (var i = 0; i < customers.length; i++) {
alert('Customer ' + customers.id + ' is ' + customers.fname + ' ' + customers.lname + ' at ' + customers.addr);
(Sorry the formatting is messed up, but this forum doesn't seem to maintain whitespace correctly.)
Maybe in this case, you could populate a dojo list or a table grid, or you could just create an HTML structure in the DOM via javascript. It all depends on what you want your user interface to look like.
Greg
Edited by: gsmith on Feb 11, 2009 9:25 AM -
Call task flow action from dialog
I want to call an action from task flow when i press OK on my dialog
it was work when i was calling it after i press on button,if i drag task flow in page and add button in this page I can select one of the actions in task flow in the property inspector panel, ACTION filed of this button
so when i click on this button the browser will to to the destination of the action
how can i do that if i have dialog instead of button
and sorry for my bad english -
Call SAP GUI actions from Web UI
We have upgraded our CRM system from 4.0 to 7.0. In CRM 4.0 we have some complex actions used in service order. We would really like to be able to reuse those SAP GUI actions from Web UI service order since it would require a lot of work to rewrite them in BSP.. Is it possible to call a SAP GUI action from Web UI? How do we do this?
Regards Andreas
Edited by: Andreas on Jan 17, 2011 1:58 PMThat was very helpful information. I can now see the available actions. The problem now is that one of the SAP GUI actions is using dialog program technique, like CALL SCREEN 9001... Is there a way to handle this also from Web UI or is it impossible?
Thanks and regards
Andreas -
Calling other dll's from extension
Hello, i'm currently in the process of creating a source
control extension. The source control server comes with a set of
.net DLL's already created that allow easy access to check things
in out and out of the server.
How would i go about calling those dll's from a C dll
extension? I've read somewhere about loadlibrary, does that within
C and dreamweaver?
Any help is appreciated!
Thanks,
PaulNo.
-
I'm using testend 3.1 & labview
7.1. For testing my UUT I'm using RS232 comunication. I want to
create a form using labview that will show all traffic via the rs232
port.
The problem is that the form is disappeared when I'm calling other vi from testend.Hi ofer_o,
You could use the "Labview Utility/Run VI Asynchronously" Step to call your RS-232 vi.
See attached.
Charlie Rodway
Test Design Engineer
Rolls-Royce Controls and Data Services Ltd
Attachments:
cpr1.zip 19 KB -
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
MartinWhat 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 -
Call a user action from a plugin
Hello
Is it possible to call an action made by a user, if yes how I can retrieve it (by its name ?) and is it possible to set some arguments of the action ?
Thankshere it is a sample of how PlayActionEvent method could be used:
ASErr
AIArtHandleModifier::Rasterize()
AIErr result = kNoErr;
AIActionParamValueRef valueParameterBlock = NULL;
ActionDialogStatus dialogStatus = kDialogOff;
try
result = sAIActionManager->AINewActionParamValue(&valueParameterBlock);
aisdk::check_ai_error(result);
if (valueParameterBlock)
//set valueParameterBlock values (params) before calling
//PlayActionEvent method.
//It's up to you to set it
result = sAIActionManager->PlayActionEvent("ai_plugin_rasterize", dialogStatus, valueParameterBlock);
aisdk::check_ai_error(result);
result = sAIActionManager->AIDeleteActionParamValue(valueParameterBlock);
aisdk::check_ai_error(result);
catch(ai::Error& ex)
//Do something with this!!!
return result;
Regards,
Thomas. -
In Captivate 7, how can I call another action from within an action?
I have a conditional action called FakeSuccessRewind. Now I need to call another function called ShowGrayBalloons02 from within its Else statement, but I couldn't find something like "Execute Advanced Action." Can anybody share some tips here? Thanks!
Below are screenshots of my two actions:
1) FakeSuccessRewind (if/else). Here I need to call the 2nd action from the Else statement, underneath the statement Go to the next slide.
2) ShowGrayBalloons02. Note this function has five seperate runs when the variable is decrementing from 5-1.
Thanks a lot!
MelissaYou can't, you need to add the other action into the first one.
-
Can commandLink call a strut action?
Hi,
My project have existing code written in JSP and Strut framework. But, I like JSF better and would like to reuse some of the existing JSP/Strut code in JSF.
Does anyone know that whether JSF can call a strut action via commandLink
For example, the snippet below will call xyz.do, which is a strut action.
<h:commandLink id="xyx" action="xyz.do" value="XYZ" immediate="true" />
ThanksYou can indeed call a struts action from a plain form but the action needs to exist and be assigned to the specified url.
-
Can one Action from Jpf call another method/Action in other jpf ?
hi ,
"can one Action from Jpf call another method/Action in different jpf "
we can call other jpf's begin from one jpf , but can we call method of other Jpf from different jpf .
i m getting error when i m trying to do this .
No module configuration registered for /pageFl
dule path /pageFlowControllers/Controller)hi,
write
carmodel(null) in populateCar() action.
means
public void onActionpopulateCar(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
//@@begin onActionpopulateCar(ServerEvent)
onActioncarmodel(null);
//@@end
Regards
Trilochan -
Call Photoshop Action from other APP?
Hi Everyone,
Anybody has any experience to run any Photoshop action using a binary .EXE file?
For example, I want to let Photoshop execute a filter action from my own application?
I know that DROPLET can do this, what I did is that I use System("Droplet.exe somefile") to launch the Photoshop action. However, I got enough trouble doing this with the UAC of Windows7, there're intermittently "Droplet couldn't communicate with Photoshop" error showing up, and UAC always prompt you the warning message. I tried lots of ways "Run as Administrators" etc, but the error shows again even though the previous time it worked!
Finally, I think it's time to give up droplet and thinking of other way of doing this.
I just simply want a ".exe" or something that can let my application tell Photoshop to run a simple action (with no parameters). I'm not sure whether PostMessage/SendMessage can do this or not on Windows. If anybody has any idea, please let me know.
Thanks in advance!
By the way, I also learned that Photoshop API is not thread safe, so that an "inception thread" of a plugin in the Photoshop causes unpridictable crashes, and you cannot do that in a separate thread.Check out the vbs samples (Visual Basic) from here: http://www.adobe.com/devnet/photoshop/scripting.html
Then use "cscript" from the command line.
http://technet.microsoft.com/en-us/library/ff920171.aspx
Maybe you are looking for
-
Mini DisplayPort to VGA Adaptor : Gateway Monitor FPD1760 - Compatible ?
Hi. Is the Apple, Mini DisplayPort to VGA Adaptor compatible with Gateway Monitors?, I own a Gateway FPD1760 (Specs : http://www.dealtime.com/xPF-Gateway-Gateway-Monitor-FPD1760). Just wanted to know if I should be going with Mini DisplayPort to VGA
-
Why can't I load some samples into Logic's EXS24??
Hi everyone, I am having an issue with loading some of my samples into the EXS24. I am using OSX 10.3.9 and Logic 7.1.0. When I try to load a sample, I can see that it recognizes it, yet when I click on it the sample doesn't load. It doesn't even try
-
How in the world can I get clip art I download from the online source to download INTO the Microsoft Office clip art search library!!!!!???? It keeps downloading onto my desktop!!!! Then what do I do with it! With other Macs I have used it just goes
-
Budgeting at the time of material procurement.
Dear friends, Any one can guide me how to handle budgetary control to procure inventory? At the time of inventory procure system has to check for availiablity. If I'm using internal order or project the material will go into consumtion accounts. sto
-
Design question on using PL/SQL table
Hi I am doing some data extract and write it to a file. The main table is over 100 million rows. It is is partition by ID. So I am thinking of paralleling it. We are on 10g so we can not use the dbms_parallel. I would like to use dbms_scheduler or th