Skip to Content
author's profile photo Former Member
Former Member

Redirect to another iView from an iView on the server side

Hi all,

I added an iView on a PCD Page. I want this iView act as a redirector (that means it depends on different parameter and redirect to different iView). I have tried to do so by client side redirect method. (e.g. window.location, document header..) However, I found that there will have a margin surrounding the redirected page. Do any one have such experience?

Thanks

Sam

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 23, 2005 at 08:58 AM

    Hi sam,

    I never tried your way, but here's the way that worked for me (It's from the memory so some syntax errors may be present):

    Form myForm = this.getForm();

    String url = //the url to redirect to

    myForm.setAction(url);

    myForm.addRawText("<script>");

    myForm.addRawText("window.document.forms[0].submit()");

    myForm.addRawText("</script>");

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 23, 2005 at 01:08 PM

    Hi Sam,

    this sounds like the problem (and solution) given in Iview calls new Page on Content Area

    Or, if you don't want to get to a new navigation target but only want to replace this iView, you better do it by a proxy iView on server side (the easiest way: create an AbstractPortalComponent and implement the redirect within doOnNodeReady method).

    Hope it helps

    Detlev

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.