on 05-16-2005 5:45 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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>
#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.
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.