Page navigation or Auto_incremental php url

I need a page navigation with links to first previous next and last i know that there is an option to add page navigation through dreamweaver from the inset data tab
But the problem is that when ever I add the navigation bar to the page and view it in the browser it gives an error with the number of the line which caused the error and when I view that line I find that the codes which were there are deleted.
the line actually contains some recordset codes which I can't remove as I have worked hard to make them do a specific thing.
So I decided to creat a navigation bar myself the and i made a url parameter to do that here it is
.index.php?categories_id=1&pageNum_Recordset1=1
this link causes the page to show the next set of posts but the problem is it just shows all the posts on the second page as the value of pageNum_Recordset1 on the first page is zero(0)
Now the portion in the red is the problem I want it to be auto_incremental such that the value of pageNum_Recordset1 should change from 1 to 2 to 3 and so on plz help I thins its qute easy but I m not getting it and I have tried my best to explain the problem but if u r not able to then let me know I will explain again.

Several components are action components. You can associate these components with action methods. When a user clicks on the action component the page is submitted to the server and the associated action method (if any) is called and the result of that action method (the return value) determines where to go next.
The hyperlink offers the option of a url or an action handler . If you specify an action handler then the hyperlink works like any action component, as described above.
However, if you specify a url instead, then the page is not submitted. The server simply serves up the page specified by the url.
Because the page is not submitted, no action methods or any other methods get invoked.
Have I explained that clearly?
If not, here is more information: http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/about_components.html#action
Chris

Similar Messages

  • Page navigation vs url

    What is different between page navigation and URL ?
    For example ,there are 2 pages , page1.jsp and page2.jsp .
    User can go from page1 to page2 ?
    I can use page naigation method to return to page2 or I put a image Hyperlink on page1 , the user click the hyperlink to go to page2.
    I would like to know what is the different between two method ?
    Thanks

    Several components are action components. You can associate these components with action methods. When a user clicks on the action component the page is submitted to the server and the associated action method (if any) is called and the result of that action method (the return value) determines where to go next.
    The hyperlink offers the option of a url or an action handler . If you specify an action handler then the hyperlink works like any action component, as described above.
    However, if you specify a url instead, then the page is not submitted. The server simply serves up the page specified by the url.
    Because the page is not submitted, no action methods or any other methods get invoked.
    Have I explained that clearly?
    If not, here is more information: http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/about_components.html#action
    Chris

  • JSF 2.0 page navigation vs direct page access

    I've been experimenting with JSF for some time now and I still don't understand the page navigation part. I know that in JSF, if you aren't using the redirect option in navigation that the URL is one page behind the page you are on.
    I've seen articles where people say you should put your pages in a directory under WEB-INF to protect against directly accessing the page. I don't understand how you can create an application that is multiple pages using that option, because won't you run into the problem of having a form with an action URL of WEB-INF/somepage.xhtml?
    I've also read articles that say the way to fix this is to add security-constraints to web.xml that prevent "direct access" to pages, when you want your user to follow a page flow, such as start on page1.xhtml, then page2.xthml, then end on page2.xhtml. If page3.xhtml depends on page2.xhtml, the articles I've read say that a security constraint prevents users from simply requesting page3.xhtml out of sequence.
    And what happens if the page you are on encounters an error or the session times out, which page handles that? The one you're on, or the one from before that forwarded you to the page you're on?
    In this example, should page2.xhtml and page3.xhtml go in the root of the webapps directory, or in a directory under WEB-INF?
    Webapps
      index.xhtml
      page1.xhtml
      page2.xhtml
      page3.xhtml
      WEB-INF
        faces-config.xml
        web.xml
        page-directory
          page2.xhtml
          page3.xhtml

    A session timeout should actually net a view expiry exception.
    You do know that JSF 2.0 made page navigation that bit easier by not requiring you to do the XML configuration? There is now a convention built in plus some new components to add GET enabled requests to the JSF lifecycle (notably h:button and h:link). If you have an action method that returns the following:
    public String doSomething(){
      return "something";
    }then JSF will by default want to render a view 'something.xhtml' when you don't define any navigation rules. If you want to make that a redirect you can do this:
    public String doSomething(){
      return "something?faces-redirect";
    }(of course this is a prime target to turn into a utility method on a backing bean base class).
    Navigation rules are still necessary when you want to put views in a subdirectory, but at least this way you can greatly simplify general cases. Other than that I can only say: research research research because this material is vital to understand if you want to be productive using the framework; navigation and the 6 JSF lifecycle phases are two items you should put on the top of your list to hammer out until you really get it. A good JSF book will help you immensely there. Balusc's blog is also a good source of deeper understanding:
    http://balusc.blogspot.com/
    Most of his articles are on JSF 1.2 but most of the information still applies.
    Oh and its no surprise that you're a bit confused - this framework is not easy to pick up especially when you don't know any other web frameworks. If you keep running into a wall you should consider checking out something else like Wicket or Play framework. It might just be that JSF simply isn't the tool for the job you're trying to do.

  • Need help with page navigation

    I've got a database where records are retrieved and displayed in a repeating region.  I've added page navigation to it because I'm getting enough records in the database that scrolling through them all on a single page is getting to be a very big page.  The page navigation works as far as the first page goes.  I get the correct records on the first page based on my selection critiera.  However, when a result set spans multiple pages, when I hit 'next page', instead of going to the second page based on the search critiera, the records displaying on the second page are the records that would be on the section page if I selected every record in the database.
    My search critiera is pretty complex, so I have not found a way to develop it inside of the recordset definition panel in DW, but I have attempted to recreate the page from scratch and I'm getting the same result each time.
    Does anyone have a snippet of code to make the pagination work correctly?
    This is the code that DW put in there:
    maxRows_rs_results = 10;
    $pageNum_rs_results = 0;
    if (isset($_GET['pageNum_rs_results'])) {
      $pageNum_rs_results = $_GET['pageNum_rs_results'];
    $startRow_rs_results = $pageNum_rs_results * $maxRows_rs_results;
    $queryString_rs_results = "";
    if (!empty($_SERVER['QUERY_STRING'])) {
      $params = explode("&", $_SERVER['QUERY_STRING']);
      $newParams = array();
      foreach ($params as $param) {
        if (stristr($param, "pageNum_rs_results") == false &&
            stristr($param, "totalRows_rs_results") == false) {
          array_push($newParams, $param);
      if (count($newParams) != 0) {
        $queryString_rs_results = "&" . htmlentities(implode("&", $newParams));
    $query_limit_rs_results = sprintf("%s LIMIT %d, %d", $query_rs_results, $startRow_rs_results, $maxRows_rs_results);
    $rs_results = mysql_query($query_limit_rs_results, $dqdb) or die(mysql_error());
    $row_rs_results = mysql_fetch_assoc($rs_results);
    if (isset($_GET['totalRows_rs_results'])) {
      $totalRows_rs_results = $_GET['totalRows_rs_results'];
    } else {
      $all_rs_results = mysql_query($query_rs_results);
      $totalRows_rs_results = mysql_num_rows($all_rs_results);
    $totalPages_rs_results = ceil($totalRows_rs_results/$maxRows_rs_results)-1;
    TIA!

    I've put some echo statements into my code to figure out what it is doing and I can see why I'm getting the results I'm getting, but I don't know how to fix it.
    Here's a description of my site.  A user has a select form where they can select records matching their critiera.  There are over 30 attributes that can be selected.  None of them can be selected and that results in every record in the database being displayed.  Any combination of the attributes can be selected and that results in the set of records that match that criteria.
    There is one caveat.  One of the attributes has multiple possible values.  Any given record will only have one value for that attribute, but the selection critiera may include multiple values of that attribute.  So in the middle of the string of "<value = > and <value = >",  I have  "and (<value = > OR <value = > OR....) and <value=>". You can see the actual select statement I have built in a previous discussion I started.
    I'm not a sophisticated php programmer or DW user for that matter, so I don't know how to build an array to capture my record data and then read the array to display the page.  It would be simpler if the selection critiera wasn't so complex - I have found several snippets of code that work well with simple select statements, but I have not been able to adjust them to work with this kind of selection possibility.
    So what I see happening is that after the first mysql statement correctly retrieves the results set, the code to set the select statement is executed again.  But at this second time through, the $_POST values from my form are no longer set to correctly build the select statement.  I thought I might save the select statement and use some if/else logic to circumvent this, but all variables seem to be getting reset when the logic goes back up to the top of the code.
    I hope I'm describing this clearly enough to generate some helpful responses.
    TIA!

  • Output_link and Page Navigation

    Is it possible to use output_link with JSP Page Navigation Model? At first sight, the answer is no. The value attribute is mandatory and rendered into href attribute. So, I have to point to the next page directly, bypassing the Page Navigation Definition in faces-config.xml . It is not good, because it broken the concept of JSP Navigation mechanism. In other works, the Page Flow created based on faces-config.xml navigation rules will be uncompleted potentially. In turn, it reduces the value of modeling (in GUI tools) drastically.
    If I am right, JSF misses the substitute for <h:command_link action="foo" immediate="false"> that works outside the form. I.e. something, that allows to involve Page Navigation, instead of avoiding it. (Something like <h:output_link action="foo">)

    I guess, redefining nested place for command_link may be a critical changes in the current JSF RI implementation. Probably, it might be easier to do the following:
    1. Add action attribute to the output_link
    2. Make both value and action attributes optional
    3. In case developer defines only value, the tag works as it works now (href=value)
    4. In case developer defines only action, href = current_page_url + '?actionId='+action
    in this way, the link works similar to command_link action="foo" immediate="true"
    5. If developer defines both attributes then href=value + '?actionId=' + action
    In this case, Navigation Model finds the defined page by URL and than makes a transfer according the defined action. BTW, such feature makes it possible to organize common starting points for Website menus which will be clearly presented in the application faces-config.

  • Page navigation problems

    Hi all,
    I am new to JSF, and I am trying to implement a simple page navigation which displays some values that the user entered. The values are stored in a managed bean. It's a simple login form. I am using NetBeans as my IDE. My page navigation is set up as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
    <navigation-rule>
    <from-view-id>/index.jsp</from-view-id>
    <navigation-case>
    <from-outcome>login</from-outcome>
    <to-view-id>/login.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    </faces-config>
    And my JSF page is setup as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:webuijsf="http://www.sun.com/webui/webuijsf">
    <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
    <f:view>
    <webuijsf:page binding="#{index.page1}" id="page1">
    <webuijsf:html binding="#{index.html1}" id="html1">
    <webuijsf:head binding="#{index.head1}" id="head1">
    <webuijsf:link binding="#{index.link1}" id="link1" url="/resources/stylesheet.css"/>
    </webuijsf:head>
    <webuijsf:body binding="#{index.body1}" id="body1" style="-rave-layout: grid">
    <webuijsf:form binding="#{index.form1}" id="form1">
    <webuijsf:staticText binding="#{index.staticText1}" id="staticText1" style="position: absolute; left: 144px; top: 72px" text="Enter user name:"/>
    <webuijsf:staticText binding="#{index.staticText2}" id="staticText2" text="Enter password:" />
    <h:inputText binding="#{user.name}" id="txtUsername" />
    <h:inputText binding="#{user.password}" id="txtPass" />
    <h:commandButton action="login" binding="#{index.btnLogin}" id="btnLogin" value="Log in"/>
    <h:inputText binding="#{index.txtUsername}" id="txtUsername"/>
    <h:inputText binding="#{index.txtPass}" id="txtPass"/>
    </webuijsf:form>
    </webuijsf:body>
    </webuijsf:html>
    </webuijsf:page>
    </f:view>
    </jsp:root>
    The web application compiles and deploys with no problem. However, when I click the btnSubmit button, it does not redirect me to the page specified in the faces-config.xml file. Can anyone tell me what I'm doing wrong? Thanks for any help you can provide.

    I'm not sure what you are trying to do here.
    Are you trying to map the commandButton's action="login" to your rule <from-outcome>login</from-outcome>?
    I think you want the commandButton to map to a method in your backing bean. E.g. action="#{bean.goToLogin}" .
    The method goToLogin() should then return the string, "login" . This will be caught by your navigation rule <from-outcome>.
    <from-outcome> maps to a specific string returned from a method called in that page.
    But in this case if you just want redirection, it should be easier just an outputLink pointing to login.jsp.
    Hope this helps!

  • Page Navigation Portlet issue

    I am having an issue with a page navigation portlet. I am using adaptive tags and we have actually implemented one custom tag that outputs the current page id.
    I will paste the code here. The issue is that in our portal the pages don't show up in the order we have set in community editor. They are showing up ordered by page id.
    This is being done on 6.0 sp1.
    Here is the code I am using.
    <link type="text/css" href="pt://images/plumtree/common/custom/CIENA/PageNavStandard/MenuStyle.css" rel="StyleSheet" lang="en" />
    <div id="PageNavStandard" xmlns:pt="http://www.plumtree.com/xmlschemas/ptui/">
    <div id="PageNavStandardTitle">Navigation</div>
    <pt:ptdata.currcommunitypagesdata pt:id="compages" />
         <ul id="MenuNav">
         <pt:logic.foreach pt:data="compages" pt:var="commpg">
                   <li>
                   <script>
                        var linkstr = "<pt:logic.value pt:value="$commpg.url" />";
                        var PageReg = new RegExp(/PageID=(\d*)\D/);
                        if(PageReg.exec("<pt:logic.value pt:value="$commpg.url" />")[1] == <pt:ciena.currpageid/>) {
                             document.write('<a href=" + linkstr +  id="ActivePage" ">');
                        } else {
                             document.write('<a href=" + linkstr +  ">');
                        document.write('<pt:logic.value pt:value="$commpg.title"/>');
                        document.write('</a>');
                        //document.write(PageReg.exec("<pt:logic.value pt:value="$commpg.url" />")[1]);
                   </script> <!--
                   <pt:core.html pt:tag="a" href="$commpg.url">
                        <pt:logic.value pt:value="$commpg.title"/>
                   </pt:core.html>
                                  -->
         </pt:logic.foreach>
         </ul>
    </div></a>

    That is most peculiar because we are doing a nearly identical page navigation portlet and we have the ability to shuffle the pages via the community object.
    Are you using your code in publisher or in a custom portlet?
    Perhaps you could try using this code in publisher and see if the results are returned appropriately:
    <span xmlns:pt='http://www.plumtree.com/xmlschemas/ptui/'>
    <!-- TOKEN NAMESPACE -->
    <pt:namespace pt:token="$$TOKEN$$"/>
    <style type="text/css">
            #pt-portlet-$$TOKEN$$ {
                    background-color: #3366CC;
                    font: verdana,arial,helvetica,"sans-serif";
                    font-size: 10px;
              margin-bottom: 10px;
            #portlet_navigation$$TOKEN$$ td {
              font: verdana,arial,helvetica,"sans-serif";
              font-size: 10px;
              color: #8CB5DE;
         #portlet_navigation$$TOKEN$$ a {
              text-decoration: none;
              color: #FFFFFF;
            #portlet_navigation$$TOKEN$$ a:hover {
              text-decoration: underline;
       #portlet_parent$$TOKEN$$ td {
          color: #8CB5DE;
          text-decoration: none;
          font: bold 10px verdana,arial,helvetica,"sans-serif";
       #portlet_parent$$TOKEN$$ a {
          color: #8CB5DE;
          text-decoration: none;
          font: bold 10px verdana,arial,helvetica,"sans-serif";
       #portlet_parent$$TOKEN$$ a:hover {
         text-decoration: underline;
    </style>
    <!-- get the portal data -->
    <pt:ptdata.currcommunitypagesdata pt:id="commmenu"/>
    <pt:ptdata.editcommunitydata pt:id="commactions"/>
    <pt:ptdata.currparentcommunitydata pt:id="parent"/>
    <pt:ptdata.currentcommunitypageiddata pt:id="currpage" />
    <table id="portlet_parent$$TOKEN$$" width="100%">
       <tr>
          <td colspan="2"> </td>
       </tr>
       <tr>
          <td class="platportletwideheader">
          <pt:logic.foreach pt:data="parent" pt:var="curr">
             <pt:core.html pt:tag="a" href="$curr.url"><pt:logic.value pt:value="$curr.title"/></pt:core.html>/
          </pt:logic.foreach><pt:standard.realmname/>
          </td>
       </tr>
    </table>
    <table cellpadding="0" cellspacing="0" border="0" width="100%" id="portlet_navigation$$TOKEN$$">
       <tr>
          <td>
          <table cellpadding="0" cellspacing="0" border="0" width="100%">
                  <pt:logic.foreach pt:data="commmenu" pt:var="commpg">
                  <!-- currpage will be set to null if it's not the current page -->
             <pt:standard.choose>
             <pt:standard.when pt:test="intsequal" pt:int1="$currpage.PageID" pt:int2="$commpg.PageID">
              <tr bgcolor="#338AF0" width="100%" style="padding-top:2px; padding-bottom:2px;">
                   <td width="15px" align="right"><img src="images/bullet_white_highlight.gif" /></td>
                          <td>
                               <pt:core.html pt:tag="a" href="$commpg.url">
                             <pt:logic.value pt:value="$commpg.title"/>
                        </pt:core.html>
                   </td>
                   <td valign="middle" align="right" style="padding-bottom:5px;"><img src="images/leftnav_arrow.gif" border="0" /></td>
              </tr>
         </pt:standard.when>
         <pt:standard.otherwise>
              <tr width="100%" style="padding-top:2px; padding-bottom:2px;">
                   <td width="15px" align="right"><img src="images/bullet_white.gif" /></td>
                   <td colspan="2">
                        <pt:core.html pt:tag="a" href="$commpg.url">
                             <pt:logic.value pt:value="$commpg.title"/>
                        </pt:core.html>
                   </td>
              </tr>
         </pt:standard:otherwise>
         </pt:standard.choose>
             </pt:logic.foreach>
             <tr>
                <td colspan="3"> </td>
             </tr>
             <!-- RETRIEVE RELATED COMMUNITY LIST AND SUBCOMMUNITY LIST -->
             <pt:ptdata.currrelatedcommunitiesdata pt:id="relcomms" />
             <pt:ptdata.currsubcommunitiesdata pt:id="relcomms" />
         <pt:ptdata.sortcollectiondata pt:id="sortedsubcomms" pt:data="relcomms" pt:sortby="title" pt:sorttype="string"></pt:ptdata.sortcollectiondata>
         <pt:standard.choose>
              <pt:standard.when pt:test="isEmpty" pt:col="relcomms">
              </pt:standard.when>
              <pt:standard.otherwise>
                   <tr><!--dotted line-->
                        <td colspan="3" background="images/dotted_line_leftnav.gif"><img src="images/spc.gif" width="180" height="1" alt="" border="0"></td>
                            </tr>
                   <tr>
                                 <td colspan="3" class="platportletwideheader">Associated Communities</td>
                                                    </tr>
                   <pt:logic.foreach pt:data="sortedsubcomms" pt:var="commpg" >
                                 <tr width="100%" style="padding-top:2px; padding-bottom:2px;">
                             <td height="16"> </td>
                                    <td colspan="2">
                                         <pt:core.html pt:tag="a" href="$commpg.url">
                                              <pt:logic.value pt:value="$commpg.title"/>
                                         </pt:core.html>
                                    </td>
                        </tr>
                            </pt:logic.foreach>
              </pt:standard.otherwise>
         </pt:standard.choose>
         <pt:standard.choose>
              <pt:standard.when pt:test="stringToACLGroup('group=1,771;').isMember($currentuser)" >
                   <tr><!--dotted line-->
                        <td colspan="3" background="images/dotted_line_leftnav.gif"><img src="images/spc.gif" width="180" height="1" alt="" border="0"></td>
                            </tr>
                   <!-- PORTAL TOOLS -->
                   <tr>
                               <td colspan="3" class="platportletwideheader">Portal Tools</td>
                            </tr>
                            <pt:logic.foreach pt:data="commactions" pt:var="element">
                            <tr width="100%" style="padding-top:2px; padding-bottom:2px;">
                        <td height="16"> </td>
                               <td colspan="2">
                                    <pt:core.html pt:tag="a" href="$element.url">
                                         <pt:logic.value pt:value="$element.title"/>
                                    </pt:core.html>
                               </td>
                   </tr>
                            </pt:logic.foreach>
                    </pt:standard.when>
         </pt:standard.choose>
          </table>
          </td>
       </tr>
       <tr>
          <td> </td>
       </tr>
    </table>
    </span>

  • Page Navigation portlet - 3.0.9

    I want to create a page navigation portlet in 3.0.9, similar to that in 9.0.2.
    How can this be done? I want the portlet to navigate between pages and sub pages and I do not want to use the nasty default navigation link that appears on sub-pages in 3.0.9.
    I've looked at the wwpob_page$ table directly. This contains the hierarchy. WWSEC_SYS_PRIV$ contain the privilege info.
    However, I need to be able to define the current page so that the SQL can identify what to display in the portlet.
    How can you do this?
    Cheers,
    John

    Hi,
    You can get the page url in the additional plsql code section. You can just try printing htp.p(p_page_url) after publishing the component on a page.
    Thanks,
    Sharmila

  • Previous page navigation after on click of cancel button of a form in adf

    Hi,
    Can any one tell how previous page navigation works in adf?
    I am working on a portal page which is having a common footer for all jspx pages.This footer contains a golink for feedback form.
    so the problem is when I Navigate to any page (# page 1)and then Navigate to some other page (#page 2) and on click of Feedback link displayed on footer of page 2 Feedback form is displayed. and on Click of Cancel button of the form.
    Expected Result:
    User should be navigated to the page that they were on. (i.e., Page 2)
    Actual Result:
    User is navigated to page 1 instead of page 2
    i.e it is taking browser previous url.
    I am using the following code for the cancel button
    <af:commandLink text="Cancel" id="cl5">
    <af:clientListener method="goBack" type="click"/>
    </af:commandLink>
    java script....
    function goBack()
    window.history.back()
    Edited by: 993530 on Apr 23, 2013 3:35 AM

    Hi,
    Immediate = true is already been set for cancel button
    The problem is when i come back to the 1st page vo is getting executed again and is taking lot of time.. i need to see that vo does not get executed again
    in the vo for view criteria -- query execution mode , i have made as in memory and now it has become fast on click of cancel button. But i am getting the following error when i perform search in the first page
    Missing FROM in a SELECT statement
    An unexpected expression token is found.
    Thanks,
    .

  • CrystalReportViewer page navigation re-hash

    Hi Everyone,
    I've been searching for a solution to the widely discussed page navigation problem when you place all your report binding code in Page_Load().  Lots of references are to older versions of VS and CR so they don't quite fit.  I am running VS2008 and CR2008.  Here's what I've done so far.
    Added an OnInit parameter to point to my initialization routine:
    <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="true" DisplayGroupTree="False" EnableDatabaseLogonPrompt="False" EnableParameterPrompt="False"
    OnInit="InitMyReport"/>
    Moved my report binding code from Page_Load to InitMyReport().  The issue I am having is that the paramaters that are being passed via the URL (and fetched via request.querystring("id1")) are not available during the initialization phase so I can't set them.
    Where did I run astray?
    Dave

    OK - I figured this out. 
    First I took all of the report setup code (parameter and selection formula assignment) and put it into its own subroutine called ReportSetup().  This is called only once from page_load as I am checking for postback.
    Next I added a new subroutine called ReportNavigate() to fire when the viewer navigate event is triggered.  This simply calles ReportSetup() which rebinds the report correctly.
    Simple solution.
    Dave

  • Page navigation same portal different portlet applications

    Hello OTN,
    I have a question regarding the best way to perform page navigation using the ActionResponse.sendRedirect method.
    There is one Webcenter Portal, and in it are multiple pages. Each page has portlets from different 286 PortletProducer applications.
    I can copy the url out of the browser and remove the params, and use that string in my controller to redirect me successfully to the home page of the portal.
    However that URL does not reference a non-home page, i.e. one not hooked up to Root.
    I tried constructing the page url by appending the path from pages.xml to the portal context, but got no love from that either.
    If i want to redirect to a different page, what is the best way to specify the page so I can use the sendRedirect method?
    Thanks,
    PowerUser 862605

    if you use sendRedirect method ,then make sure the following conditions are satisfied.
    This method only accepts an absolute URL (e.g. http://my.co/myportal/mywebap/myfolder/myresource.gif) or a full path URI (e.g. /myportal/mywebap/myfolder/myresource.gif). If required, the portlet container may encode the given URL before the redirection is issued to the client.
    some good examples are her -http://www.javadocexamples.com/javax/portlet/ActionResponse/sendRedirect%28String%20location%29.html
    Personally , I haven't checked it .so try this and see what's the results is .

  • Page navigation - current page loss

    Hi All,
    I have a page navigation logic block atm.
    I'm outputting a maximum of 6 records per page (videos). I have set up startrow and endrow. When the user clicks next page and selects a video to play it reverts back to the first page (does play the right video though).
    Heres the page:
    http://www.ukagriculture.com/multimedia/farming_pictures.cfm?strVidSubCategory=Forage%20cr ops&strClient_Name_UKA=&strVidCategory=Videos&multimedia=no
    query code:
    <CFQUERY NAME="GetVids" DATASOURCE="">
    SELECT * FROM videos_table WHERE strVidSubCategory = '#URL.strVidSubCategory#'
    ORDER BY strOrder_id
    </CFQUERY>
    <CFIF #ParameterExists(StartRow)# IS "No">
      <CFSET StartRow = 1>
      <CFELSE>
      <CFSET StartRow = (StartRow + 6)>
    </CFIF>
    <CFSet EndRow = StartRow + 5>
    <CFIf EndRow GT GetVids.RecordCount>
        <CFSet EndRow = GetVids.RecordCount>
    </CFIf>
    output navigation code:
    <cfoutput query="GetVids" STARTROW=#StartRow# MAXROWS=6>
    <CFIF LEN(strDescription) gt 40>
      <CFSET desctrunc = LEFT(strDescription,40)>
      <cfelse>
      <CFSET desctrunc = strDescription>
    </CFIF>
    <div id="vidthumb1">
    <a href="farming_pictures.cfm?strVidSubCategory=#URLEncodedFormat(strVidSubCategory)#&strCli ent_Name_UKA=#URLEncodedFormat(strClient_Name_UKA)#&strVidCategory=#strVidCategory#&multim edia=no&strFlashVideo=#strFlashVideo#"><img src="mm_videos/#strImage#" alt="" width="100" height="90" class="handcursor" border="0">
    </a>
    <br />
      <span class="thumbtext">#desctrunc#</span></div>
    </cfoutput>
    <cfoutput>
    <p align="center">Displaying video<cfif GetVids.RecordCount EQ '1'><cfelse>s</cfif> #StartRow# to #EndRow# <cfif (StartRow + 5) LT GetVids.RecordCount><a href="farming_pictures.cfm?StartRow=#StartRow#&strVidSubCategory=#URLEncodedFormat(strVid SubCategory)#&strClient_Name_UKA=#URLEncodedFormat(strClient_Name_UKA)#&strVidCategory=#st rVidCategory#&multimedia=no">next page>></a></p></cfif>
    </cfoutput>
    I would like to retain the current page the user is on when they select a video from the 2nd/3rd/4th pages etc..
    TIA
    Trevor

    Trevor,
    Would incorporating the URL key/value pair for StartRow=#StartRow#& to the first link in your output do the trick?

  • Page navigation is not working on standalone weblogic server.

    Hi,
    the page navigation is working perfectly of my application when i am deploying in integrated weblogic server but it fails wen i am deploying it in standalone weblogic.can anybody suggest?
    thanks in advance

    my url is this
    http://10.0.7.11:7001/Test-ViewController-context-root/faces/login.jspx?_afrLoop=593067363330965&_afrWindowMode=0&_adf.ctrl-state=1l7il465p_4

  • Page navigation in Acrobat does not match page numbers in the document

    I have a document in both Framemaker format (server.book) and PDF (server.pdf).  When I view the pdf file in Adobe Acrobat, the page numbers appear correctly on the document itself, but up in the Page Navigation window within Acrobat the pages number doesn't match.
    In the beginning of the book I have Title page, a Table of Contents, and a Preface that all use lower-case roman numerals.  However, when viewing this document via Acrobat, the Title pages show up as i, and ii, but then the Table of Contents and Preface show up as pages 1 - 8 instead of iii - x in the page navigation window.
    I can't figure where this discrepancy is originating. 
    Please help.

    Acrobat has no way to know which bit of character string on each page is the page number.
    The visible page number has never formed any part of Reader nav. as you point out, it couldn't.
    Acrobat knows the Numbering Properties of the pages as created in Frame. It just doesn't display or honor them consistently, depending on Reader version.
    I also use i, ii, iii, iv for pre-narrative material. The romans are displayed in the page number box of Acroread (this is AR7 on Unix). I can enter "ii" in the box, and go to that page. But the Print dialog is Ordinal only. Printing page ranges in AR7 is always off by 2 or 4 relative to the actual page numbers.
    Acrobat Pro 9 (9.4.5, Win7-64) seems to be more consistent, and does show and accept real page numbers for Print.

  • Print, Export and Page Navigation Buttons in the Report

    When I view a report through CR4E, the generated report has 3 buttons namely Print, Export and Page Navigation buttons. But when I click on either of the buttons I get a &#39;null pointer exception&#39;. This is a critical error as I am unable to navigate past the first page. Do I have to add code to these buttons? If not, why am I getting an error? Kindly solve my problem as soon as possible.

    <p>Looking at your code it appears that you are storing the ReportSource in session prior to passing in the ResultSet. This will create a problem when a postback is made on  the viewer page (which all of the viewer actions do). If you look at the sample code which is generated when you use the JSP Page Wizard you will notice that the ResultSet is passed to the ReportClientDocument object prior to it being stored in session. Then, when the page is called again this object is retrieved and the ReportSource is used by the viewer. You can quickly run the test using one of our sample reports to see what I am talking about. The code below was generated using the Consolidated Balance Sheet.rpt and did not experience any problems doing any of the viewer actions.</p><%@page import="com.businessobjects.samples.JRCHelperSample,<br />com.crystaldecisions.report.web.viewer.CrystalReportViewer,<br />com.crystaldecisions.reports.sdk.ReportClientDocument,<br />com.crystaldecisions.sdk.occa.report.application.OpenReportOptions,<br />com.crystaldecisions.sdk.occa.report.lib.ReportSDKExceptionBase,<br />com.crystaldecisions.sdk.occa.report.reportsource.IReportSource,<br />java.sql.Connection,<br />java.sql.DriverManager,<br />java.sql.ResultSet,<br />java.sql.SQLException,<br />java.sql.Statement"%><%<br /><br /><br />    try {<br /><br />        String reportName = "Sample Reports/Consolidated Balance Sheet.rpt";<br />        ReportClientDocument clientDoc = (ReportClientDocument) session.getAttribute(reportName);<br /><br />        if (clientDoc == null) {<br /><br />            clientDoc = new ReportClientDocument();<br />            <br />            // Open report<br />            clientDoc.open(reportName, OpenReportOptions._openAsReadOnly);<br /><br />  <br />            {<br />                // **** POPULATE MAIN REPORT ****<br />                {<br />                     // Connection Info for fetching the resultSet<br />                    String connectStr = "jdbc:derby:classpath:/Xtreme";<br />                    String driverName = "org.apache.derby.jdbc.EmbeddedDriver";<br />                    String userName = "dbuser";        // TODO: Fill in database user<br />                    String password = "dbpassword";    // TODO: Fill in valid password<br /><br />                    String query = "SELECT CUSTOMER_NAME FROM APP.CUSTOMER WHERE COUNTRY = &#39;Australia&#39;";<br /><br />                    <br />                    String tableAlias = "FINANCIALS";        // TODO: Change to correct table alias<br /><br />                     <br />                    JRCHelperSample.passResultSet(clientDoc, fetchResultSet(driverName, connectStr, userName, password, query),<br />                        tableAlias, "");<br />                }<br /><br /><br />            }<br />        <br />            // Store the report document in session<br />            session.setAttribute(reportName, clientDoc);<br /><br />        }<br /><br /><br />            {<br />                // Create the CrystalReportViewer object<br />                CrystalReportViewer crystalReportPageViewer = new CrystalReportViewer();<br /><br />                //    set the reportsource property of the viewer<br />                IReportSource reportSource = clientDoc.getReportSource();                <br />                crystalReportPageViewer.setReportSource(reportSource);<br /><br />                // set viewer attributes<br />                crystalReportPageViewer.setOwnPage(true);<br />                crystalReportPageViewer.setOwnForm(true);<br /><br />                // Process the report<br />                crystalReportPageViewer.processHttpRequest(request, response, application, null); <br /><br />            }<br />            <br /><br />    } catch (ReportSDKExceptionBase e) {<br />        out.println(e);<br />    } <br />    <br />%><%!<br />// Simple utility function for obtaining result sets that will be pushed into the report.  <br />// This is just standard querying of a Java result set and does NOT involve any <br />// Crystal JRC SDK functions. <br /><br />    private static ResultSet fetchResultSet(String driverName,<br />            String connectStr, String userName, String password, String query) throws SQLException, ClassNotFoundException {<br /><br />        //Load JDBC driver for the database that will be queried    <br />        Class.forName(driverName);<br /><br />        Connection connection = DriverManager.getConnection(connectStr, userName, password);<br />        Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);<br /><br />        //Execute query and return result sets<br />        return statement.executeQuery(query);<br /><br />}%><p>Try using the code generated from the wizard to see if it works for you as well. </p><p>Regards,<br />Sean Johnson (CR4E Product Manager) </p>

Maybe you are looking for