How to receive the custom event in the listening portlet (No backing file)
I have couple of portlets (JPF based). Portlet A is firing an event
public Forward processAction()
PortletBackingContext context =PortletBackingContext.getPortletBackingContext(this.getRequest());
String message = "XXXXX";
context.fireCustomEvent("customevent", message);
Forward forward = new Forward("success");
return forward;
I have configured the Portlet B's eventhandler to listen for the 'customEvent' and invoke the pageFlowAction 'listenForEvent'
@Jpf.Action(forwards = { @Jpf.Forward(name = "success", path = "test2.jsp") })
public Forward listenForEvent() {
Forward forward = new Forward("success");
return forward;
Portlet B's method listenForEvent is indeed getting invoked, but is there a way I can retrieve the 'Event' object (as fired by Portlet A) inside the listenForEvent. I could have done this via the Backing file, but for some reasons i cann't use the backing file. Is there a way i can get the CustomEvent and the associated payload in my listening JPF portlet, without a backing file?
The WLP version is 10.3
Hello,
I originally said:
All you should need to do is to modify the method signature for your event-receiving method. The method signature should be:
public void listenforEvent(HttpServletRequest request, HttpServletResponse response, Event event)
where Event is a com.bea.netuix.events.Event object. You can then cast this to a CustomEvent object.
But I mis-read your earlier post about catching the custom event and invoking a pageflow action. When you do that, you will lose the custom event's payload (your message), and there is no way to retrieve it from your pageflow action.
The only way you can actually retrieve the event's payload is using a backing file for the portlet, with a method having the signature I mentioned above. You can then set a request attribute with the event's payload and still have it invoke the pageflow action, at which time you could retrieve the request attribute value-- assuming you don't need to run this portlet over WSRP. Over WSRP, the event-handling and pageflow action-invoking lifecycles will happen with independent request objects, so you would need to store the event payload in session to work over WSRP.
Kevin
Edited by: kfrender on Aug 31, 2009 3:34 PM
Similar Messages
-
How to receive the images / binary data t ype
How to receive the images / binary data type in webdynpro....
i have a website that let's the user send email, the email attachment and message are stored in both in images data type....
q1) can i stored the message into binary data type...but the message is very long.....
q2) if i have a textbox ...i surely will need to display the message in string ,right ?
[......... msg here ........]
what is the codes to receive the images / binary data type in webdynpro....As in your previous post if you are storing them as BLOB object.. am sure you are able to get a byte stream or byte array(bytes[]) out of it.
There should be some way to identify if its a image or a message BLOB. If its a image , convert into bytes and use
WDWebResource.getWebResource(bytes,resource type).getAbsoluteURL()
to obtain the url.. assign this image UI element..
In case its the message , use bytes.toString to get the message ..
Regards
Bharathwaj -
How to receive the datas?
Look:
the first I create socket sk:
sk=socket(AF_INET, SOCK_RAW, IPPROTO_RAW);
and I fill data into Ip Head and Icmp Head,
then I sendto the packet,but I don't receive
any datas:
lenrecv=recvfrom(sk,buf,100,0,(struct sockaddr*)&addr,&rlen);
my codes run at the function recvfrom,but it
couldn't return variable lenrecv,and it look like down,
I want to know why?how to receive the data?
(I couldn't creat socket like this:
sk=socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);
I want to know when I creat socket like this
sk=socket(AF_INET, SOCK_RAW, IPPROTO_RAW);
How to receive datas?)Last edited by joseperezc (2012-08-14 18:58:22)
-
How to reset the JSF Portlet session state in weblogic portal 10.3
Hi All,
We are implementing our application with the jsf1.2 with 10.3.0 portal framework.
in a tab i placed my jsf portlet, it will navigate up to 4 pages. We do have some other tabs too in our application. So when i navigate to other tabs and when i comeback to the jsf portlet tab i am resetting the portlet state to first page by onDeactivation portal event.
But the problem when the user within the tab and navigate to pages if he clicks again the tab it is not redirecting to start page.
I know we do have refresh action in our pageflows .. but how to reset the jsf portlet to start page when it is not deactivating. Please do help me..
Thanks in advance...
Edited by: Siddu4u on Oct 10, 2011 8:33 PMHello,
This documentation should help you to use the import tool in the Portal Admin Console:
http://download.oracle.com/docs/cd/E15919_01/wlp.1032/e14245/deployment.htm#i1047336
Kevin -
Okay so I set up my Time Capsule already and is now backing up 2 of my iMacs. Works great. What I want to know is how to use the TC to directly store files? I want to do this to delete some files on iMac 20inch but still have them on the TC for future reference..eg some movies on iTunes. I want to directly save them on the drive so I can delete them from iTunes and gain some storage. (Ps on iMac 20 inch (it's almost full - 320 GB) when I enter time machine, a tab comes up on finder which reads "Time Machine backups" it's able to be ejected like a disc or a connected device. On the iMac 20 inch, I dragged some files onto there as if using it like a hard drive. Is this the correct method? Then I went to my 27inch iMac and saw the "Time Machine Backups" hoping to see the files I dragged from the 20inch iMac. But the files were not there except a folder that said "Backups.backupdb". Can someone help me?
It's not a good idea to use a network disk for both Time Machine backups and other things. By design Time Machine will eventually consume all the space on its output disk, which will then cause problem for your other files. I'd store those other files on an external disk connected to the Time Capsule. The problem with that is that Time Machine will only back up files that are local to your Mac. That means that you'll only have one copy of the files on or attached to your Time Capsule.
By the way, you've been misled by poor field labeling on this forum into typing a large part of your message into the field intended for the subject. In the future just type a short summary of your post into that field and type the whole message into the field below that. -
How to read the content of a text file (by character)?
Guys,
Good day!
I'm back just need again your help. Is there anyone knows how to read the content of a text file not by line but by character.
Please help me. Thank you so much in advance.
Jojohttp://java.sun.com/javase/6/docs/api/index.html
package java.io
InputStream.read(): int
Reads the next byte of data from the input stream.
Implementation:
InputStreamReader
An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes them into characters using a specified charset. The charset that it uses may be specified by name or may be given explicitly, or the platform's default charset may be accepted. -
How to check the resolution of a pdf file using Acrobat 9 pro?
How to check the resolution of a pdf file using Acrobat 9 pro?
PDF files don't have one resolution, but may have none or many different resolutions, one per image. You can check the maximum/minimum resoluion with preflight in Acrobat Pro, but not in Adobe Reader.
-
How to get the content in embed swf file in Swf Loader on run time
How to get the content in embed swf file in Swf Loader on run time
[Bindable]
[Embed(source="assets/index.swf")]
private var SWFSRC:Class;
<mx:SWFLoader id="_swfloader" source="{SWFSRC}" />Hi Flex harUI,
Throw the error.
Access of undefined property content -
How to read the content of ms-word file use pure java???
how to read the content of ms-word file use pure java???
hi,
check this: http://jakarta.apache.org/poi/ -
How to organize the import statements in FXML Files?
Hello,
I'm a user of NetBeans IDE and it can organize the import statements in *.java files. Now, I'm using JavaFX and editing the *.fxml files as well. I want to know how to organize the import statements in *.fxml files?
Thanks a lot.You should use Scene Builder, it will make all these import statements for you.
Moreover, it will greatly simplify the writing of your FXML files, since you only have to Drag&Drop JavaFX objects on the scene. Then, it automatically generates FXML files. -
How to place the images in Indesign xml file by Javascript?
How to place the images in Indesign xml file by Javascript?
We got the Indesign xml file, how to give the image placement link by Indesign javascript? Please help me its urgent.Hi,
You can pass the image url as a href attribute=> file:///Users/me/Documents/my_pic.jpg directly within your xml. It just needs that you pass a local, static and valid url.
If you want to add image later once the xml is flowed and so target specific nodes and inject images, it's a bit more complex. If the node is not part of the layout, you may try to reach the XMLElement objet and such an attribute, then layout the element.
var x = some XMLElement
x.xmlAttributes.add("href","file:///Users/m/Documents/my_pic.jpg" );
If already placed, then you have to get the associated pageItem, then place your file into it.
pagItm.place ( File ( "/Users/m/Documents/my_pic.jpg" ) );
Hope that helps,
Loic
http://www.loicaigon.com -
How to setup the access privilege of flash file in Web Intelligence?
How to setup the access privilege of flash file in Web Intelligence? WEBI can set access privilege for single WEBI report file, but it seem cano not set access privilege for one flash file.
Thank you Maksim,
I did set the "selectionMode" to "Auto". I don't understand where In supply function I have to set lead selection of nested node to first element. Please elaborate on this. Are you talking about the context attribute bound to the second table? OR do I have to change the Importing parameters "Node" and "Parent_Element" of my supply function?
Thanks for your time. -
How to get the absolute path of a file from the local disk given the file n
how to get the absolute path of a file from the local disk given the file name
// will look for the file at the current working directory
// this is wherever you start the Java application (cound be C: and your
// application is located in C:/myapp, but the working dir is C:/
File file = new File("README.txt");
if (file != null && file.exists())
String absolutePath = file.getAbsolutePath(); -
How to Extract the Highlight Text in PDF File
Hi Scripters,
i want know, how to extract the hightlight text in pdf files for text only format for (*.txt) file extension save.
regards
babyHi,
Okay i'll try do best.
thanks for your reply.
Regards
Baby -
How to increase the speed of video (avi file) using labview
How to increase the speed of video (.avi file) using labview? I have tried this by skiping alternate frames. also I have used minimum time delay.Is there any other option for which i can go?
please suggest me...........Are you using NI Vision IMAQ AVI Read Frame or anther method to read the AVI file?
Matthew Fitzsimons
Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
Maybe you are looking for
-
How can I tell when my mac book pro was built?
I have the serial number xxxxxxxxXAH and want to determine if I will be able to load mountain lion. <Edited By Host>
-
In CS5 trial, when one holds the alt-key and runs the lasso around something, it doesn't select.
-
How know if the Business Package of ESS, MSS y E-RC are install
Good Morning, How i know if the Business Package of ESS, MSS y E-RC are install in the system??? In the part of portal and ECC. Kind Regards
-
Will Adobe ever add support for JPEG-XR?
There's been quite a bit of work done on the Flash Player to display and export JPEG-XR files. During the Flash CS6 prerelease, the Flash team talked about additional JPEG-XR support for things like spritesheet creation. I know there's an ancient Pho
-
Can't connect to the ICloud server since upgrading my IPhone 5S to iOS 8.1.
**** please! Since upgrading to iOS 8.1 yesterday I have been unable to connect to the iCloud server. Keep getting a message that need to read the new terms and conditions, which I click the button to view but then get an error message that can't con