cancel
Showing results for 
Search instead for 
Did you mean: 

how to pass values from one view to another view in PDK

srinivas_sistu
Active Contributor
0 Kudos

Hi, all I am using APC to develop an application. I my APC i am having two views. one is <b>home page view</b> and the other is <b>details view</b>. now i declared a parameter in portalapps.xml, say <b>Entity</b>. this value will be coming from the corrrosponding iView in the portal. this portalapps.xml is having two components namely, homepagecomponent and details page component. when the user clicks on homepage link, he should be navigated to details page. i am not having any problem in navigation.

problem is ... this <b>Entity</b> can take values as "School, College, Office" so if the value selected in the iView is School, this should be passed to my 2nd view.

I am geting this value in the first view, i.e., Home page view. I am trying to pass this value through "session", but i am getting portal runtime error..

Any body please tell me how to pass this value through session or by any other means...

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

To pass parameters from one iView to another iView you have to use EPCF.

Here is the sample code

<hbj:button

id="Send_Button"

text="Send"

onClientClick="sendEvent()"

tooltip="Submit"

width=""

design="EMPHASIZED" >

function sendEvent()

{

EPCM.raiseEvent("urn:com.infotech.practice" , "sendEvent" , "Hello");

}

function eventHandler(event)

{

alert (event.dataObject);

}

EPCM.subscribeEvent("urn:com.infotech.practice" , "sendEvent", eventHandler);

</SCRIPT>

Former Member
0 Kudos

Hi Srinivas,

To pass info between two iViews , you can opt for Bean bags.

But the problem here is that both the iViews among whom the data to be passed should be on the same page.

Can you place these two on the same page ..is that possible?

Regards,

Arun

srinivas_sistu
Active Contributor
0 Kudos

Hi arun

actually i am not passing values between two iviews, i am passing values between two views to be clear two java classes in PDK . I am using AbstractPortalComponent.

0 Kudos

Hi,

There are different ways to pass values between two IViews.

Check this:

http://help.sap.com/saphelp_nw2004s/helpdata/en/a0/3b7f41009d020de10000000a1550b0/frameset.htm

You can also pass the values as parameters while navigating to other IView.

If you have Portal Runtime Errors, then check the logfile and post the detailed exception trace.

Greetings,

Praveen Gudapati

[Points are always welcome for helpful answers]