on 10-18-2005 7:54 PM
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>
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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");
}
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.