How to forward to another page from beginDisplay

I have to forward to Page 2 in beginDisplay method of Page1 based on
some parameters. I am having trouble aborting the current page
(Page1) load.
I tried the following:
if (from.equals("xyz"))
ViewBean targetView = getViewBean(pgPage2ViewBean.class);
targetView.forwardTo(getRequestContext());
throw new CompleteRequestException();
Both Page1 and Page2 are getting loaded. Page2 on top and Page1 at
the bottom.
Thanks,
Ravi

Ravi,
Please see this solution.
Inside the beginDisplay() method of ViewBean :
public void beginDisplay() throws ModelControlException
super.beginDisplay();
// Do your processing here ?.
// You detected not to display this page?and want to display Target.jsp
// implement this method in your super class
setRequestAborted(true);
// forward to TargetPage
ViewBean targetView = getViewBean(TargetViewBean.class);
targetView.forwardTo(getRequestContext());
Add thse two methods in your superclass of the viewBean.
// These two method are used to forward the control from one page to another
page.
public void setRequestAborted(boolean requestAborted)
this.requestAborted = requestAborted;
public boolean isRequestAborted()
return requestAborted ;
- Also, code the following scriplet inside the JSP of this ViewBean so that no
content would be rendered.
--- (BOF) ---
<useViewBean ...>
<%
if(!viewBean.isRequestAborted())
%>
<html>
... all HTML content here ...
</html>
<%
} //End of if(viewBean.isRequesteAborted())
%>
</jato:useViewBean>
--- (EOF) ---
- JATO:Content tag can also be used for this purpose.
Hope this solves your problem.
Thanks,
Subir.
ravi_ponnaganti@y... wrote:
I have to forward to Page 2 in beginDisplay method of Page1 based on
some parameters. I am having trouble aborting the current page
(Page1) load.
I tried the following:
if (from.equals("xyz"))
ViewBean targetView = getViewBean(pgPage2ViewBean.class);
targetView.forwardTo(getRequestContext());
throw new CompleteRequestException();
Both Page1 and Page2 are getting loaded. Page2 on top and Page1 at
the bottom.
Thanks,
Ravi
For more information about JATO, please visit:
http://developer.iplanet.com/tech/appserver/framework/index.jsp
Information transmitted by this E-MAIL is proprietary to Wipro and/or its
Customers and
is intended for use only by the individual or entity to which it is
addressed, and may contain information that is privileged, confidential or
exempt from disclosure under applicable law. If you are not the intended
recipient or it appears that this mail has been forwarded to you without
proper authority, you are notified that any use or dissemination of this
information in any manner is strictly prohibited. In such cases, please
notify us immediately at mailto:mailadmin@w... and delete this mail
from your records.
[Non-text portions of this message have been removed]

Similar Messages

  • In a jsp page how can i include another page from differenct web context

    Hi,
    i want to include a page from another web content to my page. How is it possible. For example in a jsp page i want to include "http://www.google.com". How is it possible. can i use <jsp:include tage for this purpose? any idea?
    Edited by: JavaHeroPrince on Apr 2, 2009 12:05 AM

    I'm afraid you cannot do that using <jsp:include/> tag.
    However, you can achive this using <c:import/> tag which comes with JSTL core tags.
    Please find the below example of how to go about.
    <%@ taglib uri = "http://java.sun.com/jstl/core" prefix = "c"%>
    <c:import url = "http://www.google.com/search">
      <c:param name="q" value="c%3Aimport+jstl"/>
      <c:param name="rls" value="com.microsoft:en-us"/>
      <c:param name="ie" value="UTF-8"/>
      <c:param name="oe" value="UTF-8"/>
      <c:param name="startIndex" value=""/>
      <c:param name="startPage" value="1"/>
    </c:import>
    -------------------------------------------------------------------------for more info
    [http://java.sun.com/developer/technicalArticles/javaserverpages/faster/]
    Hope that helps :)
    REGARDS,
    RaHuL

  • How to forward to another page when checking session managed bean in jsf 2

    When I do it in jsp page I write:
    <c:if test="${sessionScope.role != 'user'}">
        <jsp:forward page="login.jsp" />
    </c:if>And in jsf 2.0 I use ManagedBean as session and I want to check session in per page. But I cannot do it in jsf 2.0 (.xhtml). Please help me. Thanks
    Edited by: tuanbs on May 12, 2010 1:19 AM

    I included this code in the PartnerManagementBean.java:
         public class PartnerManagementBean {
         protected List<SelectItem> partners;
    //other properties....
    public String addPartner() {
    // code to insert new partner into db
    // Add the newly added partner to the partner list
              addToPartnerList(partnerBO);
              FacesContext.getCurrentInstance().getExternalContext().getSessionMap().remove("PartnerManagementBean");
              FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put("PartnerManagementBean");
    Still, the new partner added is not reflecting in the session variable and hence it is not reflecting when I look for the new partner in "Modify Partner" page.
    What could be the solution ?

  • How can I extract certain pages from my document and save as another file?

    How can I extract certain pages from my document and save as another file?

    You would need Adobe Acrobat to do that, not Adobe Reader.

  • How do I copy a page from one pdf  document to another?

    I am a newbe!

    That was easy.Thank you.
         Re: How do I copy a page from one pdf document to another?
    created by George Johnson in Creating, Editing & Exporting PDFs - View the full discussion
    If you open both documents, you can drag a page from the Pages panel (on the left of the window) of one document and drop it into the Pages panel of another.
    You can also extract one or more pages from a document to create a new document, and then insert the pages from this new document into another. In Acrobat 11 you 'd do this by doing:
    Tools > Pages > Extract
    and then:
    Tools > Pages > Insert from File
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/6163925#6163925
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/6163925#6163925
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/6163925#6163925. In the Actions box on the right, click the Stop Email Notifications link .
    Start a new discussion in Creating, Editing & Exporting PDFs at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0 .

  • How to call a JSP page from Applications menu?

    Hi partners,
    I am still looking for "how to call a JSP page from Applications menu?", I mean instead of calling a form, I want to call a JSP page which is staying in a OC4J repository which is located in another server.
    Any idea will be really appreciated.
    Thanks in advance.
    Frank Mtz.

    Hi Frank,
    if u know the solution please share it with me. i'm looking for the same scenario.
    thanks in advance,
    anish

  • How do I include a page from web search into an Email?

    I have a HP TouchSmart 610-1147c Desktop computer. running Windows 7 64 bit.  I should have known the answer to this question years ago, but I don't....terrible huh?  Anyway, how do I include a page from a web search that I did into an Email?  Believe it or not, I've never had to do this before, so don't have the faintest idea how to do this.  I have a feeling that it would be sent as an attachment, but how don't know how to do that!!
    I would appreciate any help that anyone would take the time to give me.  I thank you beforehand for having patience with me and my silly question.
    Auntie CC
    This question was solved.
    View Solution.

    Well, the way I would do it is to copy and paste the web address in the email, so the recipient can click on the link and get right to the Web page.
    For example, I just googled "horses," and here is the result of that search:
    http://www.google.com/#hl=en&output=search&sclient=psy-ab&q=horses&oq=horses&aq=f&aqi=g4&aql=&gs_l=h...
    I highlighted the Web address, copied it, and then pasted it in the response.  Same thing can be done into an emial.
    Does that make sense?  Or were you looking for something else?
    GeorgeFN
    GeorgeFN
    I work on behalf of HP.

  • How do I print 2 pages from a pdf file and enlarge it

    how do i print 2 pages from a file and enlarge it  to email

    Hi stevebulldog,
    Do I understand correctly that you'd like to extract two pages from a PDF, and then send them via email?
    To extract pages from a PDF, you need to use Acrobat. If you don't have Acrobat, you can try it for free for 30 days. Please see http://www.adobe.com/products/acrobat.html.
    I'm not sure what you mean by "enlarge" it. When your recipient views the PDF, they can enlarge the view (zoom in on the PDF) by choosing options from the View menu in Acrobat or Reader.
    Best,
    Sara

  • How do I print selected pages from a multi page document

    How do I print selected pages from a multi page document?
    This question was solved.
    View Solution.

    Hi,
    It depends on the software you are using, what is it ? In general you can select a range or just a number of pages.
    Regards
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • How do I delete some pages from an existing pdf file?

    I have an existing pdf file that is too large to send to some people. How can I delete some pages from this existing pdf file, and break it up into two files?

    Acrobat
    You can download a 30 day trial at that link.
    You may also be able to do it with CreatePDF, but I'm not sure.

  • How to open NEW PORTAL PAGE from current portal page ?

    I'm very confuse with my problem.
    I have 2 portal page.
    portal page I has 2 portlet : portlet A & portlet C.
    portal page II has 2 portlet : portlet B & portlet C.
    Now my customer want : start with portal page I, when i submit portlet A, program will open portal page II.
    I don't know the way to call new portal page from current portal page. Help me, please.
    Thanks.
    Edited by: young_hero on Oct 30, 2008 1:12 AM

    Could you please help me how to call a .html page
    from a Pl/Sql procedure or trigger ?
    Thanks & Regards
    Kalyani KothaKalyani,
    Could you explain a little more exactly what you're trying to acheive? I'm not quite sure what it is you're asking for. Are you asking: "how would you/can you open a browser and direct it to a URL with PL/SQL?"
    Earl

  • How to open a JSP page from a form ??? plz help

    hi ..
    i want to know how to open a jsp page from a oracle apps form using a button .
    the requirement is that whenever we click on the button created on the form, it opens a jsp page.
    plz help me ..its urgent !! :-(

    In portlet project, to navigate between pages, you should not use the URL property to link to a page. Instead, portlets use navigation via action handling. You use the Page Navigation editor to set up links to pages; that is, the navigation editor sets the action property.
    Here is an example to hyperlink ans button to open a new page:
    # From within the IDE, create a new portlet project. This action creates the project and one page, PortletPage1.jsp.
    # Create a second portlet page, called PortletPage2.jsp, for the project.
    # Drop a Hyperlink component onto the first portlet page, PortletPage1. (You can drop the Hyperlink on the page in the Design window or on the PortletPage1 node in the Outline window.) Change the Hyperlink's text property to Next Page.
    # Drop a Button component (found in the Basic section of the Palette) onto the second portlet page, PortletPage2.
    # Open the Page Navigation Editor. It displays the two pages (PortletPage1.jsp and PortletPage2.jsp) of the application.
    # Click the PortletPage1.jsp icon in the Navigation window to expand it, and then drag a connector from hyperlink1 to PortletPage2.jsp. Change the name of the connector from case1 to Page2.
    # Click the PortletPage2.jsp icon in the Navigation window to expand it, and then drag a connector from button1 to PortletPage1.jsp. Change the name of the connector from case1 to Page1.
    # Run and deploy the portlet. The browser displays PortletPage1 and you should see the Next Page hyperlink. When you click the Next Page hyperlink, the Apache Pluto Portal server displays PortletPage2. Click the Page2 button to return to PortletPage1.
    Sherry
    Creator Team

  • How do I add multiple pages from my scanner to the adobe app?

    How do I add multiple pages from my scanner to the adobe app?

    You can't do this in Reader. It must be done in Acrobat on Windows or Macintosh.

  • How can I remove one page from adobe file

    How can I remove one page from adobe file, when I try to remove the page a dialgue box say "some pages are being used, so they can not be ereased"?

    Tools>Pages>Delete pages

  • How to call a jsp page from oaf and run in jDeveloper

    Hi all,
    I created sample jsp and then tried.
    String temp = "sample.jsp?";
    pageContext.setForwardURL(temp,
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    null,
    true,
    OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
    OAWebBeanConstants.IGNORE_MESSAGES);
    It worked.
    But when i tried with one of the custom page that i downloaded from server it is giving error.
    But now i need to call that page.
    Its Code is given on below link:
    Re: how to call a jsp page from oaf
    Please help me to do this.
    Thanks in advance.
    Regards,
    Raj

    Raj,
    1. Hope you have placed the custom jsp page (which you have downloaded from server) under "jdevhome\jdev\myhtml\OA_HTML" directory ?
    2. Try to run the custom jsp page from Jdeveloper directly and check whether its working properly or not ?
    (i.e. add jsp page to any project in Jdeveloper then right click on jsp page and select Run xxx.jsp)
    3. If page errors out then custom jsp page seems require few parameters to run it successfully. Pass all requied parameters and test.
    4. There is no problem in the way you are calling jsp page from OAF page.
    regards,
    Anand

Maybe you are looking for

  • Why & FIX after acrobat XI in creative Cloud update

    After  upgrading to 11.0.03 for Acrobat XI, the PDF to Word (also rtf, text) conversion doesn't work right.  The new doc is all garbled, gibberish.  Anybody else have this problem? And what's the fix.  I am an Adobe Partner and my client is having pr

  • Reciever file adapter problem

    hi Gurus We have 5 msgs stuck in 'delivering' status . I have checked http://<server>:<port>/MessagingSystem/monitor/systemStatus.jsp link and found that these 5 are holding up the queue. Below is the statistics. File_http://sap.com/xi/XI/SystemRecv 

  • Preview won't open JPEG's anymore after Leopard upgrade

    Has anyone else had this problem? Now Leopard's Preview program will only open very few of my picture files. Cover-view has the same issue. Example: Pictures taken from my phone downloaded to my hard drive. Double-click on them to open, and all I get

  • ContainerException: Failed to initialize BeanMetaData. NullPointerException

    Hello all, New as I am to these EJB's I have run into problems. The interfaces and bean classes are writted, deploy code is generated, everything is packed in a jar and the project is added and published to the server. When I start the server it thro

  • Problems Reagrding NOKIA 6212 Classic phones

     Hi Everyone,  In this board I want to discuss about Nokia 6212 Classic. I am finding some problems with this phone, as the phone is restarted, with Memory card(2GB)  inserted and contains close to full of data. If I stay on the main screen ( 1st scr