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

Okay a simplified version

I have created a new Portal application with two JSPDynpages.

The first page is PageOne.jsp with JSPDynPage PageOne.java

The second page is PageTwo.jsp with JSPDynPage PageTwo.java

Please see the code:

PageOne.jsp

<%@ taglib uri="tagLib" prefix="hbj" %>

<jsp:useBean id="myBean" scope="request" class="com.capgemini.clx.pdm.vg.PageOneBean" />

<hbj:content id="myContext" >

<hbj:page title="PageTitle">

<hbj:form id="myFormId" >

<h3>This is page one</h3>

<hbj:button

id="GoBut"

text="Go to Next"

onClick="go_Next"

disabled="false"

design="STANDARD"

/>

</hbj:form>

</hbj:page>

</hbj:content>

PageTwo.jsp

<jsp:useBean id="myBean" scope="request" class="com.capgemini.clx.pdm.vg.PageTwoBean" />

<hbj:content id="myContext" >

<hbj:page title="PageTitle">

<hbj:form id="myFormId" >

<h3>This is page two</h3>

</hbj:form>

</hbj:page>

</hbj:content>

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 18, 2005 at 07:01 PM

    The corresponding JSPDynpages

    PageOne.java

    package com.capgemini.clx.pdm.vg;

    import com.capgemini.clx.pdm.vg.PageOneBean;

    import com.sapportals.htmlb.*;

    import com.sapportals.htmlb.enum.*;

    import com.sapportals.htmlb.event.*;

    import com.sapportals.htmlb.page.*;

    import com.sapportals.portal.htmlb.page.*;

    import com.sapportals.portal.prt.component.*;

    public class PageOne extends PageProcessorComponent {

    public DynPage getPage(){

    return new PageOneDynPage();

    }

    public static class PageOneDynPage extends JSPDynPage{

    String targetPage="PageOne.jsp";

    public void doInitialization(){

    }

    public void doProcessAfterInput() throws PageException {

    }

    public void onGo_Next(Event event)

    {

    targetPage="ROLES://portal_content/com.capgemini.clx.pdm.vg.PDTRID/com.capgemini.clx.pdm.vg.CUSIVID/com.capgemini.clx.pdm.vg.PTID";

    }

    public void doProcessBeforeOutput() throws PageException {

    PageOneBean myBean = new PageOneBean();

    ((IPortalComponentRequest)getRequest()).getServletRequest().setAttribute("myBean", myBean);

    // fill your bean with data here...

    this.setJspName(targetPage);

    }

    }

    }

    =========================================================

    PageTwo.java

    package com.capgemini.clx.pdm.vg;

    import com.capgemini.clx.pdm.vg.PageTwoBean;

    import com.sapportals.htmlb.*;

    import com.sapportals.htmlb.enum.*;

    import com.sapportals.htmlb.event.*;

    import com.sapportals.htmlb.page.*;

    import com.sapportals.portal.htmlb.page.*;

    import com.sapportals.portal.prt.component.*;

    public class PageTwo extends PageProcessorComponent {

    public DynPage getPage(){

    return new PageTwoDynPage();

    }

    public static class PageTwoDynPage extends JSPDynPage{

    public void doInitialization(){

    }

    public void doProcessAfterInput() throws PageException {

    }

    public void doProcessBeforeOutput() throws PageException {

    PageTwoBean myBean = new PageTwoBean();

    ((IPortalComponentRequest)getRequest()).getServletRequest().setAttribute("myBean", myBean);

    // fill your bean with data here...

    this.setJspName("PageTwo.jsp");

    }

    }

    }

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 18, 2005 at 08:03 PM

    Now in the portal I have created a workset and added these two iViews in that workset as iViews from the par files.

    But now wehen i click the button Go To Next on first iView(PageOne.jsp) the control doesn't pass to the second iView PageTwo.jsp. Please suggest where the problem could be? Could it be realted to specifying the iView ID that i specified in the portal int the targetpage.

    Thanks,

    Vaibhav Gupta

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      instead of

      <code>

      public void onGo_Next(Event event)

      { targetPage="ROLES://portal_content/com.capgemini.clx.pdm.vg.PDTRID/com.capgemini.clx.pdm.vg.CUSIVID/com.capgemini.clx.pdm.vg.PTID";

      }

      </code>

      you'd write

      targetPage="PageTwo.jsp"

      but this won't let you 'portal navigate' to there, it will stay on the same iView. For Navigation to the other iView, you'd have an additional PageProcessorComponent delegating rendering to page two. And page one would have a direct link to page two (also manageable with the button element), or the button would call epcf.doNavigate(..) in Javascript.

      Regards,

      Armin

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.