cancel
Showing results for 
Search instead for 
Did you mean: 

Pass parameter from iView to AbstractPortalComponent

Former Member
0 Kudos
39

Dear All,

I have an iView (PAR iView) which invokes an AbstractPortalComponent. Is there any way by which I can

pass parameters to the AbstractPortalComponent?

Kind regards,

Sreejesh.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

There is one simple solution , if you would like to go with the option of cookies.You can set the parameter values in the cookie(the value will be in the client browser) in the first page.In the AbstractPortalComponent,this cookie can be obtained,and the values retrieved.A simple message can be shown to the client ,not to disable the cookies.

Regards,

Harish

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

When ever you are invoking the Abstract Portal Component ,you would be passing the url.

The url can be appended with parameters as follows.

url?p1=v1&p2=v2,,where p1 and p2 are the parameters.

If you are directly calling the component from the Iview ,let us say in a new window, then you would write

this in a javascript function

<b>window.open('par.componentname')</b>

or you can use EPCM.doNavigate('target')

where target is the pcd path for the iview.I am not sure if the parameters can be appended in the same manner to the target,as shown above for url.

In the code of your abstract portal component,

you can write

IPortalComponentRequest request = (Iportal ComponentRequest) this.getRequest();
String parameter = request.getParameter("p1");

Regards,

Harish

(Please award points for helpful answers)

Former Member
0 Kudos

Dear Harish,

Actually I am calling some PCD Page which contains the above iView. The iView then calls the AbstractPortalComponent. I need to pass some values to the AbstractPortalComponent (either as parameter or as iView property - which I am not sure as to choose which approach).

The other thing is that I am not direstly calling the URL of the PCD Page. The EP automatically renders the navigation tree if it is added to the Workset. In such a case, I cannot append parameters in the URL.

Any suggestions?

Kind regards,

Sreejesh.

Former Member
0 Kudos

I have usually tried calling the component directly as url?parameter1=v1&parmeter2=v2

In the component, I retrieved the value as

request.getParameter("parameter1")

You may try specifying the url as the navigation target of the Iview and pass parameter and let us know if it works.

It should I believe.(I am however not sure if the parameter must be retrived in the component in the same way)

And you would also probably have to do some changes in the Iview properties,

Try and let us know.

Regards,

Harish

(Please award points for helpful answers)

Message was edited by: HARISH SUBRAMANIAN

Former Member
0 Kudos

Dear Harish,

May thanks for the answer! But can you explain me a bit more detail as to how to do this..

Kind regards,

Sreejesh.

Former Member
0 Kudos

you could get the context as

this.getPageContext();

and then use it to fetch individual values ... for ex

context.getDataforComponentId....

Former Member
0 Kudos

Dear Devina,

But the method this.getPageContext() is not available in AbstractPortalComponent..

Any solution for this?

Kind regards,

Sreejesh.

Former Member
0 Kudos

Dear All,

I have seen the post

.

Basically I need to configure at iView level, maybe, through the wizard(The option of modifying URL or midifying portal-app.xml is ruled out).

Please share any ideas if you have.

Kind regards,

Sreejesh.