IPC Between Two ADF Portlets on Same Page using Events Failure

Considering that a full page submit is required for the passing of parameters to work properly, I am trying to use IPC Events to pass a parameter from one ADF Portlet to another. There are no good examples out there, but I am trying to use what is out there in many different generic forms to make this happen with no success.
One portlet contains an ADF Table with a select column, I have a BackingBean to process the choosing of a row and that value is being retrieved and I am calling the set event.
public void selectPatient(ActionEvent e) {
FacesCtrlHierNodeBinding node = (FacesCtrlHierNodeBinding) tblPatients.getSelectedRowData();
String username = node.getAttribute(0).toString();
System.out.println("Selected Patient: " + username);
ActionResponse response = (ActionResponse)FacesContext.getCurrentInstance().getExternalContext().getResponse();
response.setEvent("selectPatientResult", username);
I then have a second portlet that is supposed to retrieve the value being passed from within the portlet class and then the second ADF portlet is supposed to display. I will eventually do more work with the value, but I am just trying to get the events to work properly first. Here is the code within the receiving portlet class:
public class drugallergies extends ADFBridgePortlet {
@ProcessEvent(name="selectPatientResult")
public void processSelectPatientEvent(EventRequest request, EventResponse eventresponse) throws PortletException, IOException {
Event event = request.getEvent();
String username = (String)event.getValue();
System.out.println("Selected Patient: " + username);
eventresponse.setRenderParameter("patient", username);
I have also made sure that I have put the following within my web.xml file for the application so that the events are being passed as portlet events and not faces events. I am still fairly new to ADF, but not to portals or portlets, which is why I am going this route.
<context-param>
<description>Allows for fired events to go to the portlet and not to the faces layer</description>
<param-name>javax.portlet.faces.autoDispatchEvents</param-name>
<param-value>false</param-value>
</context-param>
I am never seeing the receiving event get processed, meaning that I never see the println get processed with the receiving value. Please help because there are no examples out in the world for going this route. There are examples, but they require you to create an ADF application first and then convert the application to a portlet. I am using the Portlet Creation wizard within JDeveloper but creating ADF based pages for the Views modes.

Wait... You have to make a distinct difference between portlet events and contextual events in ADF.
Contextual events in ADF can be converted to portlet events.
If the full refresh of a portlet is an issue for you then even contextual events will not solve your problem.
Regardless the use of parameters or events, portlets do not support partial page rendering or ajax. In order for a parameter to pass or an event to be triggered, it need to have a reference to the ActionResponse or RequestResponse. If they don't have the proper reference they will not be able to trigger the event.
In the case you are talking about, the selection of a record, this won't be able to trigger an event because the selectionModel will be triggered by a partial submit.
The only work around for this problem is by adding a "select" button that will do a full submit.
This is not a limitation of ADF, it is a limitation of the portlet standar because the standard itself does not have anything that supports partial page rendering or ajax...

Similar Messages

  • Passing multiple parameters between two report portlets on the same page

    Hi,
    I want to pass multiple parameters between two report portlets on the same page.
    I have been succussful passing a single parameter between two portlets. The
    following are the steps :
    (1) Created first report based on the query
    SELECT htf.anchor('http://192.168.0.84:7778/servlet/page?&_pageid=97&_dad=portal30&_schema=portal30&_mode=3&dept_code='||DEPTNO,DEPTNO) Department, ename FROM EMP;
    (2) Created 2nd report
    select * from EMP where DEPTNO = :dept_code
    (3) Added pl/sql code before display page on the 2nd report
    portal30.wwv_name_value.replace_value(
    l_arg_names, l_arg_values,
    p_reference_path||'.dept_code',portal30.wwv_standard_util.string_to_table2(nvl(g
    et_value('dept_code'),10)));
    (4) Created a page and added these reports as portlets.
    Sofar it works fine for one parameter (deptno) . Now I want to add one more
    parameter say empno to my first report query and would like to pass both the
    parameters deptno and empno to the 2nd report. Please tell me how to pass multiple parameters ?
    Thanks
    Asim

    Hi,
    You will have to do the same thing
    The select will be like this
    SELECT htf.anchor('http://toolsweb.us.oracle.com:2000/servlet/page?_pageid=97&_dad=mb&_schema=mybugs&_mode=3&dept_code='||DEPTNO||'&empno='||empno,DEPTNO) Department,ename
    FROM EMP
    In the additional plsql code do the same for empno like this
    mybugs.wwv_name_value.replace_value(l_arg_names,l_arg_values, p_reference_path||'.dept_code',mybugs.wwv_standard_util.string_to_table2(nvl(get_value('dept_code'),10)));
    mybugs.wwv_name_value.replace_value(l_arg_names,l_arg_values, p_reference_path||'.empno',mybugs.wwv_standard_util.string_to_table2(get_value('empno')));
    Thanks,
    Sharmila

  • Distinguishing between two instances of the same portlet

    Hi Experts,
    Is there a way to distinguish between two instance of the same portlet in different browser windows?
    I'm looking for something like URL parameter passing, but just for portlets.
    The problem is, I want a way to pass a parameter between views in a portlet, but in such a way that if another browser window is opened and navigated to that portlet page, the parameter won't be the same. Perhaps I can explain better with this example:
    Page A has a portlet on it which has a textbox and 2 buttons - the first button stores the value in the textbox in the PortletRequest (or PortletURL) and if you click the second button the portlet navigates to a different view which displays the value. If I navigate with a second browser window to Page A, however, and only click the navigate button, that value which was stored by the first instance of the portlet will still be shown. I want them to be independent, I don't want changes in the one's PortletRequest to reflect in the other one's PortletRequest.
    Any ideas?
    Thanks,
    JP

    Why not use two instances of the same portlet, i.e. create two channels of the same portlet.
    The behave the same, have the same application logic, so all you need is to transfer informations between the two portlets.If you want this within user space use the portlet session, otherwise access the http session context /application context and store the data there.
    The behavior would be controlled by the portlet preferences, so channel a (instance 1) would be configured to run as controller and channel b (instance 2) would be configured as receiver.

  • Printed colour is different between two elements both created in pages with the same colour

    Hi There,
    I have been having some issues getting a text colour to match a logo (imported in pdf format) - While trying to discover what was happening I created a sample colour of (HSB 189 / 89 / 73) in pages and saved it in my colours palette to test.
    Now if I create some text (in pages) and a shape (also in pages) and colour them from the same colour sample/swatch and print it - the colours are clearly very different, Does pages do some kind of text colour correcting or weirdness that I cant find? Its hard to believe this is the desired workflow and its very anoying.
    PS. I have also tried printing from a pdf and I have the same issues - That said the two colours look identical in pages and the pdf on screen.
    I'd be extremely grateful for any help
    NB I have since read
    https://discussions.apple.com/message/9263007#9263007
    Which although is helpful and may explain the behavious of the imported logo pdf vs the text it doesn't (I dont think) explain how two elements both created in pages using the same colour (from pages) would be dfferent?

    They are both coming out at the exact same colour (CMYK 83, 0, 21, 0) which is correct however they are not the same colours when printed, Im begining to think this is less of a pages thing (as the output is correct) but something is going wrong between pdf/pages and print
    Its not the easiest thing to see so you may have to take my word for it - but the two colours are not the same by quite a long way (Theres way more contrast in real life)
    I think Im ready to admit defeat on this but thanks a bunch for your help!
    Brendan

  • HOW TO PUT TWO PANNEL IN THE SAME PAGE

    HI ALL
    I NEED TO KNOW HOW TO PUT TWO PANNEL IN THE SAME PAGE TO FULLY UTILIZE FULL PAGE AREA BECAUSE THE PANNEL WIDTH IS TOO SMALL , SO I WANT TO MAKE THE PAPER CONTAIN TO PANNELS VERTICALLY.
    THANK YOU

    So Barb,
    I like to use multiple desktops and move back and forth between then using gestures. At the moment I have 5 open: Chrome, Firefox, Safari, Photoshop CS 6 and a desktop. I use "gestures" to navigate between them:
    Mac Basics: Multi-Touch gestures - Apple Support
    and I use Mission Control (F3) to move the various desktops around in the order I want them.
    Mac Basics: Mission Control - Apple Support
    So say I'm searching for a photo to open in CS 6, I find it on the open desktop then hit select "open" in CS 6 and go to that folder in the select pane.
    Even right now I'm typing this in Safari and "gesturing" back to Chrome where I did the search about multi touch and mission control. I drag copy the URL there  and gestured back here to paste the URL into this text.
    If you did a lot of photo searches, I set professional clients of mine in Chicago up with dual monitors (In this case you'd have an external monitor on extended desktop.). So all you need to do is just glance over at the second monitor slide your cursor over there open stuff up find your photo and go back to Photoshop and open it up.
    Hope this helps.

  • Managed bean/Data exchange between two ADF Rich Faces based applications

    Hi,
    I have been trying to research what seems to be a small issue. My requirements are as follows.
    1. I need to be able to pass managed bean information from one ADF Rich Faces based application to another (in two separate ears) at runtime (e.g. from Ear1: SenderApp/Sender.jspx -> Ear2: ReceiverApp/Receiver.jspx).
    2. I do not want to use the database as my applications need to be performant.
    3. Serialization/de-serialization would fall pretty much under the database category. In other words, I like to avoid Serialization/de-serialization of the managed bean.
    4. I cannot use query string due to security issues.
    My question is as follows:
    1. Is there any standard/architecture/best practices for data exchange of backing beans or other forms between two ADF Rich Faces based apps (in two separate ears)?
    2. Has someone found anything similar to an applicationScope that works across applications?
    I would appreciate any ideas.
    Thanks very much,
    Edited by: user11219846 on Jul 23, 2009 2:38 PM
    Edited by: user11219846 on Jul 23, 2009 2:42 PM

    Hi,
    its not an ADF Faces problem, but not possible in Java EE. You can however fallback to vendor specific implementations like in WLS. From the WebLogic documentation : http://e-docs.bea.com/wls/docs103/webapp/sessions.html
    Enabling Web applications to share the same session*
    By default, Web applications do not share the same session. If you would like Web applications to share the same session, you can configure the session descriptor at the application level in the weblogic-application.xml deployment descriptor. To enable Web applications to share the same session, set the sharing-enabled attribute in the session descriptor to true in the weblogic-application.xml deployment descriptor. See “sharing-enabled” in session-descriptor.
    The session descriptor configuration that you specify at the application level overrides any session descriptor configuration that you specify at the Web application level for all of the Web applications in the application. If you set the sharing-enabled attribute to true at the Web application level, it will be ignored.
    All Web applications in an application are automatically started using the same session instance if you specify the session descriptor in the weblogic-application.xml deployment descriptor and set the sharing-enabled attribute to true as in the following example:
    +<?xml version="1.0" encoding="ISO-8859-1"?>+
    +<weblogic-application xmlns="http://www.bea.com/ns/weblogic/90";;>+
    +...+
    <session-descriptor>     
    +<persistent-store-type>memory</persistent-store-type>+
    +<sharing-enabled>true</sharing-enabled>+
    +...+
    +</session-descriptor>+
    +...+
    +</weblogic-application>+
    Frank

  • How do I share one itunes account between two users on the same computer

    How do I share one itunes account between two users on the same computer without taking up twice as much space on my hard drive?

    You would need to move the itunes folder to a location that both users have permissions to access such as the Shared folder or any folder on the root level of the macintosh HD.
    You can find instructions here http://support.apple.com/kb/HT1203 This method allows you to share the content without sharing the same library.

  • Hello there - how can I share my iTunes library between two users on the same computer? I put the library in a shared folder between both and have selected this library on both as well, but when I update iTunes with music etc it only appears on one?

    Hello there - how can I share my iTunes library between two users on the same computer? I put the library in a shared folder between both and have selected this library on both as well, but when I update iTunes with music etc it only appears on one?

    Thank you Joe - I tried this but it's only showing a teensy amount of music - the stuff on the second users account as opposed to the giagntic library on the 'main' account. I actually went to a Genius Bar and they said that apple doesn't really want you to share music between accounts - parents don't want to hear their kids music etc. Which seemed strange, but it might be the case sadly   Thanks anyway!

  • Share a library between two users on the same mac?

    It is possible to share a library between two users on the same mac?

    It's doable. As it's been pointed out Aperture has no provisions for file locking so you can't have two users accessing the library at the same time. This includes having one user having the library open only for browsing. Aperture doesn't have a +Read Only+ mode, when it opens the library, even if you make no changes to any images, the library will be written to.
    This also means you can't have one user open the library and then stop using Aperture but still have the library open and then have another copy of Aperture open on the library.
    Of course if you have two copies of Aperture running even they are on different libraries you'll be in violation of the license and you'll have bigger problems to worry about then a toasted library.

  • Can i share music and photos between two users on the same machine?

    How can I share my music and photos between two users on the same machine?

    Thank you Joe - I tried this but it's only showing a teensy amount of music - the stuff on the second users account as opposed to the giagntic library on the 'main' account. I actually went to a Genius Bar and they said that apple doesn't really want you to share music between accounts - parents don't want to hear their kids music etc. Which seemed strange, but it might be the case sadly   Thanks anyway!

  • TS2972 is it possible to use home sharing between two users on the same computer?

    My wife and I have itunes accounts and want to be able to share music we have each bought on our accounts. We have tried setting up the home sharing on our PC but it doesn't show up on the screen. Can anyone please help?

    "Is it possible to use home sharing between two users on the same computer?"
    No. Home sharing is used to connect two running instances of iTunes across a network. When you switch users on the computer all applications running on the other profile are suspended.
    You can however share your respective media folders so that they are visible in either profile and then copy over any content that you want, or you could create a single joint library which you use when either user is logged in.
    tt2

  • Sync a folder between two users on the same computer.

    I would like to sync a folder between two users on the same computer so that they are always the same when I access them from either user.

    then place this folder somewhere where both users have access to like in /Users/Shared. then there is only one folder to deal with and you don't need to sync anything.

  • How do I share music between two accounts on the same i-mac

    How do I share music between two accounts on the same i-mac

    iTunes: How to share music between different accounts on a single computer - http://support.apple.com/kb/HT1203 - relocating iTunes' media folder to a shared area but leaving separate library files - extra tip at https://discussions.apple.com/message/17331189

  • How do I put two galleries on the same page?

    What's the "trick" to putting two galleries on the same page?
    I've been experimenting, but it's not working out well. I have one working, but when I put the seond one on, all sorts of unexpected things happen. The first gallery goes up "over" the banner (it covers it??) and even though the sizes are spec'd the same, the second one shows up a lot larger as well.
    It's very weird.
    Any insight would be appreciated!
    Thanks!
    Michelle

    Juan,
    When Application Express finds a validation error, the page rendering step is executed again in the same database process used for the validations. So the procedure wwv_flow.accept, which is doing your validations, calls wwv_flow.show (a PL/SQL call) and passes information about the validation errors to the show procedure so that error text can be merged into the page rendering process.
    If you want to simulate this you might need to save validation info in collections and build the "show" part of the page so that it knows how to run in "validation-display" mode, i.e., to be able to use the collections.
    Scott

  • Two tables on the same page. Is it possible?

    Hi all,
    I followed the multi-slect sample in Winston's blog and everything is working. However, when I tried to put two tables on the same page, the selections are all messed up. When I looked at the code again I realized the line
    RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
    in the setSelected(Object object) method.
    In the case that there are more than one tables on one page, how does the code which table it is refering to? Or how the code should be different so we can have multi tables with selectable rows on the same page? Thnx.

    Thanks. But how do you tie the TableSelectPhaseListeners to their respected tables.
    This is Winston's code for row select (1 table)
    private TableSelectPhaseListener tablePhaseListener = new TableSelectPhaseListener();
    public void setSelected(Object object) {
    RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
    if (rowKey != null) {
    tablePhaseListener.setSelected(rowKey, object);
    public Object getSelected(){
    RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
    return tablePhaseListener.getSelected(rowKey);
    public Object getSelectedValue() {
    RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
    return (rowKey != null) ? rowKey.getRowId() : null;
    public boolean getSelectedState() {
    RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
    return tablePhaseListener.isSelected(rowKey);
    For two tables. Do I just repeat the code like this?
    private TableSelectPhaseListener tablePhaseListener1 = new TableSelectPhaseListener();
    public void setSelected1(Object object) {
    RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
    if (rowKey != null) {
    tablePhaseListener1.setSelected(rowKey, object);
    public Object getSelected1(){
    RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
    return tablePhaseListener1.getSelected(rowKey);
    public Object getSelectedValue1() {
    RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
    return (rowKey != null) ? rowKey.getRowId() : null;
    public boolean getSelectedState1() {
    RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
    return tablePhaseListener1.isSelected(rowKey);
    private TableSelectPhaseListener tablePhaseListener2 = new TableSelectPhaseListener();
    public void setSelected2(Object object) {
    RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
    if (rowKey != null) {
    tablePhaseListener2.setSelected(rowKey, object);
    public Object getSelected()2{
    RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
    return tablePhaseListener2.getSelected(rowKey);
    public Object getSelectedValue2() {
    RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
    return (rowKey != null) ? rowKey.getRowId() : null;
    public boolean getSelectedState2() {
    RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
    return tablePhaseListener2.isSelected(rowKey);
    Edited by: Thomas5 on Jan 18, 2008 5:28 AM

Maybe you are looking for