How to get next and previous page  in a Train Flow .

Hi,
For creating record I am using multi-step flow (train).
I have three page and I want to navigate the page via multi-step flow (train).
I followed the steps given in the Toolbox Tutorial of create purchase order and
Locator Element: Page/Record Navigation in developer's guide.
page1=/uttara/oracle/apps/uttaraimc/createcitizen/webui/PropertyCreatePG
page2=/uttara/oracle/apps/uttaraimc/createcitizen/webui/HouseDetailsCreatePG"
page3=/uttara/oracle/apps/uttaraimc/createcitizen/webui/EducationCreatePG"
The page1 is navigated via 'Create' button in CitizenSearchPG
Now on this Page1, when I clicks on the 'Next' button (to navigate to the next page in the same multi-step flow) I am getting following exception and its not navigating to page2.
Error: Cannot Display Page
You cannot complete this task because one of the following events caused a loss of page data:
* You accessed this page using the browser's navigation buttons (the browser Back button, for example).
* Your login session has expired.
* A system failure has occurred.
To proceed, please select the Home link at the top of the application page to return to the main menu. Then, access this page again using the application's navigation controls (menu, links, and so on) instead of using the browser's navigation controls like Back and Forward.
Here is the code for CreateFooterCO,
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
super.processRequest(pageContext, webBean);
OANavigationBarBean navBean =
(OANavigationBarBean)webBean.findChildRecursive("NavBar");
if (navBean == null)
MessageToken[] tokens = { new MessageToken("OBJECT_NAME", "NavBar") };
throw new OAException("AK", "FWK_TBX_OBJECT_NOT_FOUND", tokens);
// Determine which page we're on so we can set the selected value. Each
// time we navigate to and within the flow, the URL includes a parameter
// telling us what page we're on.
int step = Integer.parseInt(pageContext.getParameter("ccStep"));
navBean.setValue(step);
// Figure out whether the "Submit" button should be rendered or not;
// this should appear only on the final page (Step 3).
OASubmitButtonBean submitButton =
(OASubmitButtonBean)webBean.findIndexedChildRecursive("Submit");
if (submitButton == null)
MessageToken[] tokens = { new MessageToken("OBJECT_NAME", "Submit") };
throw new OAException("AK", "FWK_TBX_OBJECT_NOT_FOUND", tokens);
if (step != 3)
submitButton.setRendered(false);
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
super.processFormRequest(pageContext, webBean);
OAApplicationModule am = pageContext.getApplicationModule(webBean);
int currentStep = Integer.parseInt(pageContext.getParameter("ccStep"));
// This button should only be displayed on the final page...
if (pageContext.getParameter("Submit") != null)
// Simply telling the transaction to commit will cause all the Entity Object validation
     // to fire.
// Note that you must commit before asking WF for the next page, because
// asking for the next page at this point will transition the WF to a
// completed state, which means you won't be able to navigate back
// if there are errors during the commit processing.
am.invokeMethod("apply");
TransactionUnitHelper.endTransactionUnit(pageContext, "citizenCreateTxn");
// Don't forget to call this even on the last page so the activity associated with
// this page completes and the Workflow transitions appropriately.
String nextPage = OANavigation.getNextPage(pageContext);
// For the final page, Workflow should be returning null -- and the user
// can select the "Submit" button only on the last page. Something's
// wrong.
if (nextPage != null)
throw new OAException("AK", "FWK_TBX_T_WF_UNEXPECTED_TRANS");
else // we've just completed the flow
// Assuming the "commit" succeeds, we'll display a Confirmation dialog that takes
     // the user back to the main "Purchase Orders".
/* String poNumber = (String)pageContext.getTransactionValue("PO_NUMBER");
MessageToken[] tokens = { new MessageToken("PO_NUMBER", poNumber),
new MessageToken("PO_APPROVER", pageContext.getUserName()) };
OAException confirmMessage = new OAException("AK", "FWK_TBX_T_PO_CREATE_CONFIRM", tokens);
OADialogPage dialogPage = new OADialogPage(OAException.CONFIRMATION,
confirmMessage,
null,
pageContext.getApplicationJSP() + "?OAFunc=FWK_TOOLBOX_PO_SUMMARY_CR&retainAM=Y",
null);
pageContext.redirectToDialogPage(dialogPage);
else if ("goto".equals(pageContext.getParameter(EVENT_PARAM)) &&
"NavBar".equals(pageContext.getParameter(SOURCE_PARAM)))
// Note that the OANavigationBean publishes a "goto" event paremeter when
// either the Back or Next button is pressed. You need to determine which way to
// go based on the related "value" parameter.
// Also note the check of "source" above to ensure we're dealing with the
// page-level navigation here and not table-level navigation which is
// implemented with the same Bean configured differently.
int target = Integer.parseInt(pageContext.getParameter("value"));
String workflowResult;
if (target < currentStep)
workflowResult = "PREVIOUS";
else
workflowResult = "NEXT";
String nextPage = OANavigation.getNextPage(pageContext, workflowResult);
if (nextPage != null)
HashMap params = new HashMap(1);
params.put("ccStep", IntegerUtils.getInteger(target));
pageContext.setForwardURL(pageContext.getApplicationJSP() + "?" + nextPage, // target page
null,
KEEP_MENU_CONTEXT,
"", // No need to specify since we're keeping menu context
params, // Page parameters
true, // Be sure to retain the AM!
ADD_BREAD_CRUMB_NO, // Do not display breadcrumbs
OAException.ERROR); // Do not forward w/ errors
else
throw new OAException("AK", "FWK_TBX_T_WF_NO_NEXT_PAGE");
else if (pageContext.getParameter("Cancel") != null)
am.invokeMethod("rollbackCitizenInfo");
// Remove the "in transaction" indicator
TransactionUnitHelper.endTransactionUnit(pageContext, "citizenCreateTxn");
pageContext.forwardImmediately("OA.jsp?page=/uttara/oracle/apps/uttaraimc/createcitizen/webui/CreateCitizenSearchPG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true, // retain AM
OAWebBeanConstants.ADD_BREAD_CRUMB_NO);
How to resolve this issue?
please suggest.
Thanks & Regards,
Sagarika

Sagarika,
Please go thru the dev guide which explains the train flow in the multistep update exercise. Compare the steps with ur implementation.
- Senthil

Similar Messages

  • X6 : how to get next and previous controls working...

    Hi,
    May be i am missing how to do the same...but i can't get the the next video by pressing the next icon on the real player...i am viewing the video files from the gallery..Or the next and prev controls won't work..

    Hi,
    In that case it's too bad..

  • How to make next and previous button function

    Hello
    Can anybody help me with how to achieve next and previous button function such as the one at www.bestbuy.com?
    I would appreciate any help or suggestion.
    Thank you!

    if you're not familiar with flash it might be easiest to place your initial "page" in frame 1, the 2nd (or next) page in frame 2, the 3rd/next page in frame 3 etc.
    place your previous and next buttons in their own layer that spans the main timeline (which will have as many frames as you have "pages").  give them instance names (say prevBtn and nextBtn).
    you can then use the following code placed in frame 1:
    var tl:MovieClip=this
    prevBtn.onRelease=function(){
    tl.prevFrame();
    nextBtn.onRelease=function(){
    tl.nextFrame();

  • How to connect "Next" and "Previous" ?

    Hi everyone,
    I am new in this with videoediting etc but I just managed to finish my first real videoproject and burned a DVD last night.
    My first Encore project crashed after 3 days but I could start a new project and finish that one within 4 hours. Great program.
    The DVD works fine except for1 thing:
    I could not figure out how to connect "Next" and "Previous" in my Submenu for choosing clips.
    So I just deleted these functions (!)
    Looking forward to next project but I would like to use these 2 functions!
    Thanks in advance!
    Great forums in Adobe with Great People!

    Thank you !
    I thought it was to go to Next clip and previous clip. Not very good thinking.....
    Now I understand!
    Thanks again!

  • How to done Next and Previous operations using(struts or jsp and servlets).

    I have some problem with Next and Previous Operations in my application. I solve that problem by my own. But I need some more information to solve that problem.
    In order to solve this problem, 1st i moved all the Dara Base records into one collection.And I set that collection Object in Session scope in Servlet file.And i dispatch the request to one jsp(Show.jsp) . The code of that is given bellow.
    <%@page language="java"%>
    <%@page import="java.util.*"%>
    <%@page import="home.servlet.beans.*"%>
    <%!
         public static int no=0;
    %>
    <html>
         <body>          
                   <%
                        String s=request.getParameter("nam");
                        if(s==null)
                             s="some";
                        ArrayList a=(ArrayList)session.getAttribute("tv");
                        if(!s.equals("pre"))
                             int i=no;
                             %>
                             <table border=1>
                   <tr>
                        <th>DEPTNO</th>
                        <th>DNAME</th>
                        <th>LOC</th>
                   </tr>
                   <%
                        if((no+1)<a.size())
                        for(i=no;i<(no+2);i++)
                             SelectBean sb=(SelectBean)a.get(i);
                             %>
                             <tr>
                                  <td><%=sb.getDeptno()%></td>
                                  <td><%=sb.getDname()%></td>
                                  <td><%=sb.getLoc()%></td>
                             </tr>
                             <%
                             no=no+2;
                        else
                             if(i<a.size())
                             for(i=no;i<a.size();i++)
                             SelectBean sb=(SelectBean)a.get(i);
                             %>
                             <tr>
                                  <td><%=sb.getDeptno()%></td>
                                  <td><%=sb.getDname()%></td>
                                  <td><%=sb.getLoc()%></td>
                             </tr>
                             <%
                             else
                                  out.println("<tr><td colspan='3'>There is no records to display</td></tr>");
                        else
                             %>
                             <table border=1>
                   <tr>
                        <th>DEPTNO</th>
                        <th>DNAME</th>
                        <th>LOC</th>
                   </tr>
                   <%
                             if(no==a.size())
                                  no=no-1;
                             int i=no;
                             for(i=no;i>(no-2);i--)
                                  if(i==-1)
                                       break;
                                  SelectBean sb=(SelectBean)a.get(i);
                             %>
                             <tr>
                                  <td><%=sb.getDeptno()%></td>
                                  <td><%=sb.getDname()%></td>
                                  <td><%=sb.getLoc()%></td>
                             </tr>
                             <%                               
                             no=no-2;
                             if(no<0)
                                  no=0;
                   %>
                   </table>
                   <br>
                   next
                   previous
         </body>
    </html>
    If u have any other idea please reply to me. Please copy the above code and work with your application.

    It's a classic paging feature.
    And since it's a classic feature, you have most of the work already done for you, like JSP paging tags.
    You just need to Google for "jsp tag paging" or something to that effect to get several useful links.

  • In an alv report how to get data in next and previous pages.

    in my alv report i require the output such that
    when i will press the next button in the application tool bar the alv report will be displayed for the next inventory document number in the next page. like wise previous
    would anybody please help me out.
    thanks and regards
    papps

    In your servlet you could set the arraylist into the HttpRequest object so that it is visible in the JSP you are forwarding to.
    RegistrationDAO rdao=new RegistrationDAO();
    ArrayList arr1=rdao.getsearchresults(af);
    request.setAttribute("someArrayList",arr1);Then in the JSP you could use JSTL 1.1 and jsp:useBean tag to access the ArrayList like this
    <%@ page contentType="text/html;charset=UTF-8" language="java" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <jsp:useBean id="someArrayList" class="java.util.ArrayList" scope="request"/>
      <c:forEach var="currentRecord" items="${someArrayList}">
        Some property of the AddressForm object: ${currentRecord.propertyName} <br/>
        Another property of the AddessForm object : ${currentRecord.someOtherPropertyName} <br/>
        <hr/> 
      </c:forEach>I guess you are using struts, so instead of JSTL there might be some struts tags that do the same as above JSTL tags. You can research further on that.
    If you can't use struts tags or JSTL tags then you could write it with JSP scriptlets (highly discouraged option).

  • Use "next" and "previous" buttons in two scroll panes

    Hello, I have a question about how to use next and previous buttons in two scroll panes. In fact, I plan to display two similar files (HTML) in two scroll panes seperately. the purpose is to find their differences, highlight these differences and finally traverse these differences one by one by using next and previous buttons.
    To realize this function, how should I mark their differences so that next and prevous buttons can recognize their locations? does anyone have idea?
    Thank you very much.

    Can "focus" resolve this problem? But how should I add focus to a line in one HTML files? Thank you.

  • How to Create process of Type : Get Next or Previous Primary Key Value

    Hi,
    Can anybody give the steps how to create the page process for type Get Next or Previous Primary Key Value in oracle Express database
    Ramesh j c.

    Hi Justin,
    In oracle 10g XE , we have sample application v2.0
    1. Do you have any Document to create step by step the sample application v2.0 and Is it possible to create all the pages of this sample application v2.0 b by wizard. To recreate or create the demo app, start from the home area,
    next go to application builder,
    then click the create button,
    next choose "demonstration application"
    and then you can choose "Run | Edit | Re-install" the "Sample Application" along with a few other apps.
    2. When we install this sample application v2.0 , which is the sql script is executed or how it is installed. If you want the sample application you can export it after you create it if you want the SQL associated with it.
    3. Whenever the sample application v2.0 is installed, how the encrypted pass word is created for the user demo and admin. This is setup with the application install. I don't believe it is encrypted either. If your wanting SSL there are some threads on here that talk about encrypting content.
    Justin thanks for to create process Get Next or Previous Primary Key Value

  • How do I change the lable of next and previous button in GAF of FPM

    Hi Experts,
    How do I change the label of next and previous button in GAF application using FPM in each individual step?
    Thanks!

    Hello Anthony,
    as far as I am aware only the final step before the confirmation screen can be changed. Which you can do by clicking on it in the configuration view - click on the last but one step - and click on the next button - at the bottom of the screen you'll get a view where you can change the label of the step.
    There is some logic in this - in that it does make for a more consistent user experience across various apps.
    It's different to how we could do things in Java - but it's nice that there is a certain level of conformity across FPM apps.
    hope this helps,
    Cheers,
    Chris

  • Next and Previous button on detail page

    I am new to Apex development and have a need to develop an application that has 2 pages. The first page displays a list of employees for instance and allows the user to sort the list on difference columns e.g., first name, last name, salary etc. The user then clicks on a employee and navigates to a second page which shows the details of the employee that the user can update and save. The second page should also include Next and Previous buttons which show the details of the next or previous employee from the SORTED list on the first page so that the user can avoid constantly switching between the two pages. How do I implement this? I thought of using collections but I don't know how to populate the collection when the user navigates out of the first page and how to reference the collection on the second page. Note that in the real application there could be a large number of rows on the first page (a few thousand) and response time is critical. Any help would be much appreciated. I am using Apex 2.2.
    Thanks
    Sadanand

    Thanks Anton. And apologies for the delay in responding to your message. I will give it a try soon.
    On a related note and as alternate implementation (i.e. not using collections), is it possible to have a tabular form (showing only one row) on the second page using the same query and filter/sort conditions as the first page with an additional feature that the first time the page is displayed, the record selected on the first page is the one shown in the tabular form? I can then use the default Next and Prev buttons of tabular forms to navigate through the records in exactly same order as the first page (assuming ofcourse that new rows have not been added by an external process in the meantime). I hope I am clear in my description.
    Thanks for your help.
    Regards
    Sadanand

  • How to disable browser next and previous buttons for entire ADF application

    Hi,
    JDev Ver : 11.1.1.2.0
    How can I disable the browser navigation buttons next and previous for my entire ADF application.
    If user click on page and then if it press backspace key then it should not go back to the previous opend url and the current page should remain as it is.
    How can I do this ?
    regards,
    devang

    Back button (and backspace) will always go to the previous page. However, with a single master page, the previous page will be the page that called the application so users won't be likely to use it to navigate. The idea of opening the application in a new window/tab is also a nice addition to prevent the back button from being enabled and yes that would block backspace as well. Combine both solutions and you'll have a tab with both back and forward button disabled for the whole application. I don't think there's any document specifically about this solution, but it's not exactly complicated, you seem to already have it actually. Can you precise your question?
    ~ Simon

  • I cannot find the next and previous button in iTunes get info menu? Is there anyone that has also experienced this problem that can help me please

    I cannot find the next and previous button in iTunes get info menu?
    Is there anyone that has also experienced this problem that can help me please
    I have the lates version of Itunes

    I have managed to figure out how to solve this problem, after looking around I saw a lot of people kept saying makesure it is list view however this still did not work, I found the only way for me get these buttons back was to change the Movie to a TV Show and only then did the "Next" and "Previous" button appear. Right Click> Get Info > Options > Media Kind and then Select TV Show, this is extremely inconvienent but the only way that I found that has worked so far.
    Hope this works for you too!!

  • Adobe reader has buttons next page and previous page, why not also top of current page and bottom of

    Adobe reader has buttons "next page" and "previous page",
    why not alson "bottom of current page" and "top of current page" ,
    these would be very useful if the page is increase to the maximum left and right

    This is a user forum; if you have any product enhancement requests, do it here: https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

  • Next and previous button

    Hi,
    Just got back from the APEX class. Very new at this.
    I just created two button called PREVIOUS AND NEXT. When I press PREVIOUS or NEXT button I want it to go to previous or next record within the same form page.
    What do I have to do to make it functional in APEX. I mean, what code,processes is needed and how to do it.
    I would appreciate it if someone has done it and maybe show me the code/process of how to do it. Maybe they can share their application on apex.oracle.com.
    Please let me know.
    Appreciate a lot
    Munish
    Edited by: user4848861 on Sep 4, 2009 8:37 AM

    Hi,
    When I first come to a page, I show an interactive report. Interactive report has an edit button.
    When user clicks on the edit button, it goes to a form where user can edit the record.
    Once the user edits the record, they want to go to the next or previous record. What needs to be done on next and previous button to accomplish that.
    For eg. If I am on record 1, when I press NEXT I should go to record 2.

  • Next and Previous Button Question

    First my code :)
    import java.util.*;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.GridLayout;
    import java.lang.Object;
    import java.awt.Image;
    public class Inventory // Main class
    //main method begins execution of java application
    public static void main(String args[])
         int i;
         double totalInventory = 0.0;
         final int dispProd = 0; // variable for actionEvents
         final part[] myPart = new part[4];
         for (i=0; i<4; i++)
                   myPart[0] = new part("Glass Break", 730, 12, 32.19);
                  myPart[1] = new part("Motion", 995, 14, 37.69);
                  myPart[2] = new part("Keypad", 220, 12, 50.69);
                  myPart[3] = new part("Contact", 944, 44, 1.19);
         final JButton firstBtn = new JButton("First");
         final JButton prevBtn = new JButton("Previous");
         final JButton nextBtn = new JButton("Next");
         final JButton lastBtn = new JButton("Last");
         final JLabel label;
         final JTextArea textArea;
         final JPanel buttonJPanel;
         //Add Logo          
         ImageIcon icon = new ImageIcon("javashield.JPG");
                   label = new JLabel("Some Company Inc.", icon, JLabel.RIGHT);
         //Set the position of the text, relative to the icon:
         label.setVerticalTextPosition(JLabel.BOTTOM);
         label.setHorizontalTextPosition(JLabel.CENTER);
         buttonJPanel = new JPanel(); // set up panel
         buttonJPanel.setLayout( new GridLayout(1, 4)); //set layout
              // add buttons to buttonPanel
         buttonJPanel.add(firstBtn);
         buttonJPanel.add(prevBtn);
         buttonJPanel.add(nextBtn);
         buttonJPanel.add(lastBtn);
    textArea = new JTextArea(myPart[3]+" "); // create textArea for product display
         // add total inventory value to GUI
    textArea.append("\nTotal value of Inventory "+new java.text.DecimalFormat("$0.00").format(totalInventory)+"\n\n");
    textArea.setEditable(false);
    JFrame invFrame = new JFrame();
    invFrame.setLayout(new BorderLayout());
    invFrame.getContentPane().add(new JScrollPane(textArea), BorderLayout.CENTER);
    invFrame.getContentPane().add(buttonJPanel, BorderLayout.SOUTH);
    invFrame.getContentPane().add(label, BorderLayout.NORTH);
    invFrame.setTitle("INVENTORY:");
    invFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    invFrame.setSize(350, 350);
    invFrame.setLocationRelativeTo(null);
    invFrame.setVisible(true);
    // assign actionListener and actionEvent for each button
    firstBtn.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent ae)
    textArea.setText(myPart[0]+"\n");
    }); // end firstBtn
    prevBtn.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent ae)
    textArea.setText(myPart[1]+"\n");
    }); // end prevBtn
    nextBtn.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent ae)
    textArea.setText(myPart[2]+"\n");
    }); // end nextBtn
    lastBtn.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent ae)
    textArea.setText(myPart[3]+"\n");
    }); // end lastBtn
    } // end main
    } // end class Inventory6
    class part
       public String partName;
       public int itemNum;
       public double units;
       public double price;
       //default constructor
    public part()
            partName = "";
            itemNum = 0;
            units = 0.0;
             price = 0.00;
        }//end default constructor
         //Parameterized Constructor
    public part( String partName, int itemNum, double units, double price)
            this.partName = partName;
             this.itemNum = itemNum;
             this.units = units;
             this.price = price;
        }//end constructor
         public void setpartName(String partName) {
             this.partName = partName;
            public String getpartName()
                return partName;
        public void setitemNum ( int itemNum )
           this.itemNum = itemNum;
        public int getitemNum()
         return itemNum;
        public void setunits ( double units )
             this.units = units;
         public double getunits()
              return units;
         public void setprice ( double price )
             this.price = price;
         public double getprice()
         return price;
      //calculates product total     
         public double invTotal()
         return (units * price);
    public String toString()
              return "Part:  "+partName+
                        "\nPart Number:  "+itemNum+
                        "\nUnits on hand: "+(int)units+
                        "\nPrice per unit:  $"+price+
                        "\nPart Total:  $"+invTotal();
    //end Class Part
    // Class Part holds Part information
    class Wireless extends part
    private String wlPart; // variable for added feature
    public Wireless(String partName, int itemNum, double units, double price, String addWL)
    // call to superclass  constructor
    super(partName, itemNum, units, price);
    wlPart = addWL;
    }// end constructor
    public void setwlPart(String addWL) // method to set added feature
    wlPart = addWL;
    public String getwlPart() // method to get added feature
    return wlPart;
    public double totalRestock() // method to set value and add restock fee
    return units * price * 0.05;
    public String toString()
    return "Part:  "+partName+
                        "\nPart Number:  "+itemNum+
                        "\nUnits on hand: "+(int)units+
                        "\nPrice per unit:  $"+price+
                        "\nRestock Fee:  $"+totalRestock()+     
                        "\nPart Total:  $"+invTotal();
    } I need to make my next and previous button keep going through the array. They go next or previous one time and stop. I know it is because of the way I wrote the statement
    textArea.setText(myPart[2]+"\n");What I can't figure out is how to make that statement be the current myPart and add 1 to it. I tried textArea.setText(myPart[i]+1+"\n");and it did not work either, I got these errors:
    C:\Inventory\Inventory.java:92: local variable i is accessed from within inner class; needs to be declared final
    textArea.setText(myPart[i]+1+"\n");
    ^
    C:\Inventory\Inventory.java:92: operator + cannot be applied to part,int
    textArea.setText(myPart[i]+1+"\n");
    ^
    2 errors
    So I tried to write {nextItem()}
    and writing a method for next item,
    nextBtn.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent ae)
    nextItem();
    }); // end nextBtn
    lastBtn.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent ae)
    textArea.setText(myPart[3]+"n");
    } // end lastBtn actionEvent
    }); // end lastBtn actionListener
    } // end main
    private static void nextItem();
    if (myPart < myPart[]-1)
         myPart++;
         textArea.setText(myPart[0]);
    }and I get this error
    C:\Inventory\Inventory.java:109: '.class' expected
    if (myPart < myPart[]-1){
    ^
    1 error
    I thought '.class' expected meant I was missing a bracket, but I can't see where I am missing a bracket.
    I feel dumber by the minute.
    Am I not seeing something?

    Another suggestion. First create a non-GUI Inventory class, something like this:
    public class Inventory
        private part[] myPart;
        private int index = 0;
        public Inventory()
            myPart = new part[4];
            myPart[0] = new part("Glass Break", 730, 12, 32.19);
            myPart[1] = new part("Motion", 995, 14, 37.69);
            myPart[2] = new part("Keypad", 220, 12, 50.69);
            myPart[3] = new part("Contact", 944, 44, 1.19);
        public part getPart(int i)
            //TODO fill this in
        public part getFirst()
            //TODO fill this in
        public part getLast()
            //TODO fill this in
        public part getNext()
            //TODO fill this in
        public part getPrev()
            //TODO fill this in
        public double getTotalInventory()
            //TODO fill this in
        // this main is here only to test out the class
        public static void main(String[] args)
            Inventory inv = new Inventory();
            for (int i = 0; i < 4; i++)
                System.out.println(inv.getPart(i));  
                System.out.println();
            System.out.println("getFirst: " + inv.getFirst());
            System.out.println();
            for (int j = 0; j < 6; j++) // deliberately set to be > 4
                System.out.println("getNext: " + inv.getNext());
                System.out.println();
            for (int j = 0; j < 6; j++)
                System.out.println("getPrev: " + inv.getPrev());
                System.out.println();
            System.out.println("getLast: " + inv.getLast());
    }Then use this class as a variable within another class, say InventoryGUI. In this second class, the "next" button would call the Inventory object's getNext() method.

Maybe you are looking for

  • An iAS 4.1 Web Connector looked up the wrong IP, is there a way to change it ?

    I have one working iWS 4.1 instance running on Solaris 8. I have decided to install anthoer web server instance + web connector to iAS 6.0 for SSL purposes. However, after I set up the second instance and when I ran the page, an error 500 is returned

  • How can i use  this id to my iphone

    i wanna know about my apple id howto use in my phone

  • Messages of type 'I' in Transformation

    Hi, I try to give out messages of type 'I' in a characteristic routine of a transformation:       monitor_rec-msgid = 'ZBW'.       monitor_rec-msgty = 'I'.       monitor_rec-msgno = '000'.       monitor_rec-msgv1 = 'Missing Vehicle code link for Mode

  • Disable thumbnail page

    I am not a computer programmer who knows what a Boleen page is. I need a step by step instruction on how to disable the new thumbnail page. I just want it to do what it used to do when I opened up a new page - go to my homepage. I am using OSX 10.9.5

  • HT2518 migration is stuck on looking for other computers....

    I am a brand new MAC user.  I'm trying to transfer files, etc. from my PC to my new MAC.  I am in "Migration" on Mac, have downloaded the software to do so on my PC, networks are both on, file sharing is on my PC...but on MAC I am stuck on "looking f