cancel
Showing results for 
Search instead for 
Did you mean: 

iView to iView communication with EPCF

Former Member
0 Kudos

Hi,

We have a requirement that needs EPCF for iView communication. I'm encountered with the following problems.

(1) The communication between iViews under a single Page is working fine but only with HTML controls. How to make it work for HTMLB controls in a JSP. I'm not getting any type of message/error when I include HTMLB controls.

(2) Is it possible to send a value from an iView1(Event Raiser) of a Page1 to an iView2(Event Registered)) of another Page2? I'm using Client Data Bag.

(3) Need an example for EPCM.doNavigate statement to invoke iView (V1) for the following scenario:

(V1) resides on Portal as follows:

pcd:

Content Administration -> Portal Content -> Folder1-> (V1)

ROLES:

Content Administration -> Portal Content -> Folder2 -> Role1 -> Workset1 -> Page1 -> (V1)

Thanks in advance for any kind of help and tips.

Vijay Kalyan G

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Vijay,

You cannot use EPCF to communicate between iviews on different pages.

You could use the following code to establish communication between iviews on different pages. What you do is create a url to the other component and add the parameters to it.

    //initialize Map parameters with the parameters you want to pass to the other iview

    StringBuffer url = new StringBuffer();
    url.append("/irj/portal?NavigationTarget=");
    
    //add the target from an INavigationNode (which you could determine at runtime)
    //url.append(StringUtils.urlEncode(node.getName()));
    
    //or add it directly if you have the pcd id (and it is always the same)
    url.append(StringUtils.urlEncode("pcd://folder/role/page"));
    
    url.append(pageid);
    
    if(parameters != null) {
        Iterator i = parameters.keySet().iterator(); 
        while (i.hasNext() {
            String key = (String) i.next();
            String value=(String) parameters.get(key);
            url.append("&");
            url.append(StringUtils.urlEncode(key));
            url.append("=");
            url.append(StringUtils.urlEncode(value));
        }
    }

Then redirect to the url you created and in the other component you import the parameters with request.getParameter(String name); for each parameter you want to pass.

Johan

Answers (1)

Answers (1)

former_member394902
Contributor
0 Kudos

Hi Vijay,

#2 - you can use the client data bag

EPCM.storeClientData( nameSpace, name, value ) to store the data and

EPCM.loadClientData( nameSpace, name ) to retrieve the data

#3 - If you know the absolute path of the content that you want to navigate to, then the doNavigate is quite simple. For your case this would be

EPCM.doNavigate( target, [mode, winFeat, winName, history, targetTitle, context])

where the target will be

ROLES:// + PCD location of Content Administration -> Portal Content -> Folder1-> (V1)

Open the iView V1, check for the property PCD location. Replace pcd: with ROLES:// and this will become your navigation target.

Hope this helps.

Akhilesh

Do reward points if helpful.

Former Member
0 Kudos

Hi Akhilesh,

(1) Do you have any comments on my first requirement?

(2) I was successful already with the same statements as you quoted. This was absolutely working fine between iViews in a Page. But between iViews of two different Pages is my problem.

(3) Thank You very much for the EPCM.doNavigate method. It is working perfect.

Looking forward for the solutions of the first two requirements.

Thanks,

Vijay Kalyan G

<b>I rewarded you points, Friend</b>

former_member394902
Contributor
0 Kudos

#1 - this should not be a problem. the last time i did some work on it, i was able to raise events on HTMLB controls in JSP. I have no idea why is it not working for you.

#2 - for communication among iViews in different pages you cannot use the client data bag. In this case you will have to store the parameter in PortalRequest Object or the Session Object. Using client data bag you can achieve communication between iViews that are on a single page.

Former Member
0 Kudos

Hi Akhilesh / Johan,

Thanks once again, for the information.

I shall definitely inform you once the parameter storing in PortalRequest Object / Session Object works.

Thanks,

Vijay Kalyan G.