cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Java iView redirecting to another iView

Former Member
0 Kudos

Hi people,

I would like to implement a custom Java iView that will have to calculate some parameters based on user and then display forward those values to an IAC iView, which will do the rest of the work. The values being calculated are actually properties of a regular IAC iView.

Is it possible to make this custom Java iView act like an "dynamic" IAC iView? I mean, the custom java iView will implement ALL properties available in a regular IAC iView, calculate some of them dynamicaly, and finally display the results as it was an IAC iView?

I believe it needs to be done using an AbstractPortalComponent and the doContent() method, but I would like to have some guidance or even a code example.

Thanks in advance

Fernando Urzedo

Accepted Solutions (0)

Answers (1)

Answers (1)

Dan_Wroblewski
Developer Advocate
Developer Advocate
0 Kudos

Hi Fernando,

I am not so familiar with the IAC iView, but you can use the request.redirect() method, which should actually be implemented in the doOnNodeReady() method instead of doContent().

Hope this helps.

Daniel

Former Member
0 Kudos

Hi Daniel,

Thanks for your answer. I have some additional questions and hope you can help me.

The way I understood your suggestion, seems that the "target" iView to be reached using the redirect method should be created in the PCD. This way it is not possible to have the custom Java iView being converted into an IAC iView but calling an already created iView.

Also, if I use the redirect method, are the properties in my custom Java iView transported to the target iView as well?

Finally, could you please provide me with some code sample explaining how to use the request.redirect() method?

Thanks a lot

Fernando Urzedo

Dan_Wroblewski
Developer Advocate
Developer Advocate
0 Kudos

Hi Fernando,

Yes, you create another iView and you redirect to it. There is no relationship between the two iViews, there are no shared properties -- it is as if a new request.

To set properties, you could either set the properties of the iView in the PCD before redirecting to it, or you may be able to add URL parameters.

The code is simply:

request.redirect(URL);, where request is an IPortalComponentRequest, and URL is fully qualified name of portal component. I belive you can substitute a PCD address, but I'm not sure.

You can also simply create a blank page and trigger a navigation. See Triggering Navigation at http://help.sap.com/saphelp_nw04/helpdata/en/43/0029d0e7371aa2e10000000a422035/frameset.htm.

Hope this helps.

Daniel