Trouble with isDigit method

Hi guys,
I am currently in the middle of my first Assignment for an intro to java. I seem to have done alright so far, except just for a couple of minor details. Firstly, I am developing an EXTREMELY basic atm prototype. I am passing the staring balance as a HTML parameter. I wan't to check that is is all numeric. If not then I want the label that displays the updated balance to say something like "must enter valid dollar amount". I know I have to use the isDigit method, 'cause I have successfully done that for my textfield, but I have absolutely no idea how to do it for this. I shall paste the relevant sections of code (that apear in order) and hope someone can help :)
public void init()
     {//start of init method - initialisation of the applet
          //assigning inital balance to current balance variable
          StartBalStr = this.getParameter("InitialBalParameter");
          if ((StartBalStr == null) || (StartBalStr.equals("")))
               StartBalStr = "No Starting Balance Provided";
public static boolean isStringAllNumeric(String aString)
     {//looping structure to check from the first character to the last of the value entered
          int stringSize = aString.length();
          for (int i = 0; i < stringSize; i++)
               boolean check = Character.isDigit(aString.charAt(i));
               if (!check)
               return false;//if any characters at each position of the string's length is not a digit
                    return true;//if any characters at each position of the string's length is a digit
     }//end of isStringAllNumeric function     
public void keyTyped(KeyEvent ke)
               char c = ke.getKeyChar();
               if (!((Character.isDigit(c)) || (c == KeyEvent.VK_BACK_SPACE) || (c == KeyEvent.VK_DELETE) || (c == '.')))
                    getToolkit().beep();
                    ke.consume();

How about this....
if (isStringAllNumeric(StartBalStr)) {
System.out.println("The param is numeric");
} else {
System.out.println("The param is non-numeric");
Hope that was what you were after.
Alan

Similar Messages

  • TROUBLE WITH PAYMENT METHOD USED DIFFRENT VISA PAYMENTS STILL WONT WORK

    TROUBLE WITH PAYMENT METHOD USED DIFFRENT VISA PAYMENTS STILL WONT WORK

    This is a case for the iTunes Store Support:
    1. Go to expresslane.apple.com
    2. select 'itunes' and then 'itunes store' on the right
    3. select a topic and a subject
    4. click 'continue' and then 'email'
    5. fill out the form and explain your situation
    6. they will respond within 24 hours usually
    Good luck
    Stijn

  • Trouble with forward() method in a Servlet

    I am new to Servlets and am having trouble with one that queries a database and forwards the data to a JSP. A portion of the code is below (The <i> are really , but are being displayed wrong).
                   for(int i = 0; i < numberOfRows; i++)
                        data2[0] = rs.getString("REIMBUR_DATE");
                        data2[i][1] = occupancyPCT;
                        data2[i][2] = rs.getString("RMBR_RATE_REVENUE");
                        data2[i][3] = rs.getString("RMBR_ROOM_TAX");
                        data2[i][4] = "reimbur total";
                        data2[i][5] = rs.getString("BOOK_RATE_REVENUE");
                        data2[i][6] = rs.getString("BOOK_ROOM_TAX");
                        data2[i][7] = "rebate";
                        data2[i][8] = "tax rebate";
                        rs.next();
                   request.setAttribute("CERT_INFO", data);
                   request.setAttribute("OTHER_INFO", data2);
                   request.setAttribute("NUMBER_ROWS", new Integer(numberOfRows));
                   ServletContext context = getServletContext();
                   RequestDispatcher dispatcher = context.getRequestDispatcher("/certdetails.jsp");
                   dispatcher.forward(request, response);
              catch(Exception ee)
                   PrintWriter out = null;
                   response.setContentType("text/html");
                   out = response.getWriter();
                   out.println("<html>");
                   out.println("<body>");
                   out.println("Exception !!<br>");
                   out.println(ee.getMessage());
                   out.println("</body>");
                   out.println("</html>");
    When I include the line with the forward() method, I get an exception and the message is "1998-08-20", the contents of data2[numberOfRows - 1][0]. I don't know why an exception is being generated or how it is getting this database value as its message. What's going on?

    Nevermind, I found the problem. There was an error in my JSP. I don't know how it affected the Servlet as it did, but...who cares!!

  • Having trouble with "main" method

    I have just installed j2re1.4.1 and I am having trouble running my applications. Every time I try to run even the smallest of apps I get an error message about the "Main" method.
    In textpad i get this message:
    "Exception in thread "main" java.lang.NoClassDefFoundError:"
    and in Jcreator I get this message:
    "The system couldnt find a suitable main method"
    what is going wrong?How can I fix this?

    It could be something as simple as Case :-/
    If you have a file Foo.java with a class Foo with a main()
    you can compile it with javac foo.javawhich will create Foo.classbut you cannot run it with java fooyou will get Exception in thread "main" java.lang.NoClassDefFoundError: roids (wrong name: Foo)whereas java Foowill work just fine.

  • Some trouble with getElementById method

    Hi
    I have an XML file just like that:
    <?xml version="1.0" encoding="UTF-8"?>
    <persons id="root">
        <firstname1 id="firstname1">John</firstname1>
        <lastname1 id="lastname1">Brown</lastname1>
        <firstname2 id="firstname2">Andrew</firstname2>
        <lastname2 id="lastname2">Clark</lastname2>
        <firstname3 id="firstname3">Sylvie</firstname3>
        <lastname3 id="lastname3">Steevens</lastname3>
        <firstname4 id="lastname3"></firstname4>
        <lastname4 id="lastname4"></lastname4>
    </persons>I enter this one into the Document by using the standard way, problem is with calling gsome etElementById method. When I put there any one id value, firstname1, or root for instance, then I get null.
    What do I do wrong?
    Regards
    Krzysztof Malinowski

    http://javaalmanac.com/egs/org.w3c.dom/GetById.html

  • Beetle game..trouble with a method?

    I finally got the game to work (somewhat). The player keeps collecting body parts until it switches turns, then computer collects parts. However when one of the players (comp or player) gets a full beetle it still rolls...is my logic in these two methods correct?
    public static void playBeetle(String playerName, boolean hasBody, boolean hasHead,
                int legCount, int eyeCount, int feelerCount, boolean hasTail)
            boolean playerBody = false, computerBody = false, body=false,
                    playerHead = false, computerHead = false, head=false,
                    playerTail = false, computerTail = false, tail=false;
            int     playerLegs = 0,     computerLegs = 0,     legs=0,
                    playerEyes = 0,     computerEyes = 0,     eyes=0,
                    playerFeelers = 0,  computerFeelers = 0,  feelers=0;
            boolean winner = false;
            boolean rollAgain = true;
            boolean playerTurn = true;
            String message = "";
            int roll=0;
            String bodyPart = "";
            while(!winner)
                //Sets thr generic parts into the players parts depending on who's turn it is.
                if(playerTurn)
                    body=playerBody;
                    head=playerHead;
                    tail=playerTail;
                    legs=playerLegs;
                    eyes=playerEyes;
                    feelers=playerFeelers;      
                else
                    body=computerBody;
                    head=computerHead;
                    tail=computerTail;
                    eyes=computerEyes;
                    feelers=computerFeelers;
                    legs=computerLegs; 
                while(rollAgain)
                     if(playerTurn)
                            message+="\n"+playerName+":\n";
                        else
                            message+="\nCOMPUTER: \n";
                    message+=beetleString(body, head, legs, eyes, feelers, tail)+"\n";          
                    roll=randomGenerator.nextInt(6)+1;
                    message+="\nDie roll:"+roll+"...>";
                    switch(roll)
                        case BODY:
                             bodyPart="body";
                             if(body)
                                rollAgain=false;
                             else
                                body=true;
                        break;
                        case HEAD:
                            bodyPart="head";
                            if(body)
                                if(head)
                                    rollAgain=false;
                                else
                                    head=true;
                            else
                                rollAgain=false;
                        break;
                        case LEG:
                            bodyPart="two legs";
                            if(body)
                                if(legs==6)
                                    rollAgain=false;
                                else
                                    legs=legs+2;
                            else
                                rollAgain=false;
                        break;
                        case EYE:
                            bodyPart="eye";
                            if(head)
                                if(eyes==2)
                                    rollAgain=false;
                                else
                                    eyes=eyes+1;
                            else
                                rollAgain=false;
                        break;
                        case FEELER:
                            bodyPart="feeler";
                            if(head)
                                if(feelers==2)
                                    rollAgain=false;
                                else
                                    feelers=feelers+1;
                            else
                                rollAgain=false;
                        break;
                        case TAIL:
                            bodyPart="tail";
                            if(body)
                                if(tail)
                                    rollAgain=false;
                                else
                                    tail=true;
                            else
                                rollAgain=false;
                    message+=bodyPart;
                    if(rollAgain)
                         message+=beetleString(body, head, legs, eyes, feelers, tail);
                         if(completeBeetle(body, head, tail, legs, eyes, feelers))
                           if(playerTurn)
                               message+="\n Congratulations! You won!";
                           else
                               message+="\n Computer Won! Better luck next time!";
                           rollAgain=false;
                           winner=true;
                        else
                            message+="\n Click O.K. to roll again.";
                    else
                        message+="\nSorry, you cannot use the "+bodyPart;
                    JOptionPane.showMessageDialog(null, message);
                    message="";
               rollAgain=true;
               //Assigns players parts back to generic parts.
               if(playerTurn)
                   playerBody=body;
                   playerHead=head;
                   playerTail=tail;
                   playerLegs=legs;
                   playerEyes=eyes;
                   playerFeelers=feelers;
               else
                   computerBody=body;
                   computerHead=head;
                   computerTail=tail;
                   computerLegs=legs;
                   computerEyes=eyes;
                   computerFeelers=feelers;
               playerTurn=!playerTurn;
        }  // end method playBeetle
    public static boolean completeBeetle(boolean body, boolean head, boolean tail, int legs,
                            int eyes, int feelers)
            boolean fullBeetle=false;
            if(body)
                if(head)
                    if(tail)
                        if(legs==6)
                            if(eyes==2)
                                if(feelers==2)
                                    fullBeetle=true;
            return false;
        } // end method completeBeetle

    Your original code was fine, you only needed to change one thing...
    public static boolean completeBeetle(boolean body, boolean head, boolean tail, int legs,
                            int eyes, int feelers)
            boolean fullBeetle=false; //<-- this way you would need this
            if(body)
                if(head)
                    if(tail)
                        if(legs==6)
                            if(eyes==2)
                                if(feelers==2)
                                    fullBeetle=true; // <-- here should be...
                                    return true;
            return false;
        } // end method completeBeetleLogically...
    You only need to return true or false, so...
    if all your ifs prove true (the case you want) just return true...
    if not all if are met the method will hit the return false...
    this is because the compiler "kicks out of the method" when it sees a return statement, but...
    this way you also must capture the result of the method call! Hope that helps!

  • Trouble with a If conditional using string methods.

    Hello Everyone,
    I am having trouble with an If statement. I want to compare a string variable to two values using the or operator. I have found the || may not be applied to string.equals. Would neone happen to have a different method? Code below:
    check = ("C".equals(option)) || ("F".Equals(option));

    jverd wrote:
    Please paste in the exact, complete error message.
    One thing that's definitely wrong is the capital E in your second Equals. I don't know if that's causing the problem though.Also note that, once you get it to compile, if you don't remove the semicolon after the if statement, you won't get the behavior you want.

  • A trouble with "LIKE" in a select statement

    Hi!
    I'm having trouble with "LIKE" in a select statement...
    With Access I can make the following and everything works well:
    SELECT name, birthday
    FROM client
    WHERE birthday LIKE '*/02/*';
    but if try to do it in my application (it uses Access), it doesn't work - I just can't understand that!!!
    In my application the "month" is always the currently month taken from the "System". Look what I'm doing...
    String query1 = "SELECT name, birthday " +
              "FROM client " +
              "WHERE birthday " +
              "LIKE '*/" +
              pMonth +
              "/*' " +
              "ORDER BY birthday ASC ";
    ResultSet rs = statement1.executeQuery(consulta1);
    boolean moreRecords = rs.next();
    The variable "moreRecords" is always "false", the query returns nothing although the table "client" has records that attend the query.
    Please, anyone can help me?! It's a little bit urgent.
    Thanks,
    Katia.

    Hi Katia,
    I'll bet the problem lies with the characters you're using to escape the LIKE clause. You're using the ones that Access likes to see, but that's not necessarily what's built into the JDBC-ODBC driver class.
    You can find out what the correct escape wildcard characters are from the java.sql.DatabaseMetaData.getSearchStringEscape() method. It'll tell you what to use in the LIKE clause.
    I'm not 100% sure about your code. It doesn't use query1 anywhere. I'd do this:
    String query = "SELECT name, birthday FROM client WHERE birthday LIKE ? ORDER BY birthday ASC";
    PreparedStatement statement = connection.createStatement(query);
    String escape = connection.getMetaData().getSearchStringEscape();
    String test = escape + '/' + pMonth + '/' + escape;
    statement.setString(1, test);
    ResultSet rs = statement.executeQuery();
    while (rs.hasNext())
    // load your data into a data structure to pass back.
    rs.close();
    statement.close();Let me know if that works. - MOD

  • Trouble with my Apple ID on multiple devices

    I am having trouble with my Apple ID when downloading app updates.  I go to update my Apps, but the Apple ID for a seperate iPod, that I also sync with this computer, is what appears when the password is requested.  I checked the account in Settings > Store and it is the correct one.  But everytime I attempt to update my Apps, it has the iPod's Apple ID, which is my father's Apple ID. 
    In short, when I try to update an app on my iPhone, my Apple ID is not displayed, but my father's iPod Apple ID is displayed with a request for the password.  I am not sure what I am doing wrong, but I would appreciate your assistance. 

    Ok, so you want to remove data (contacts, bookmarks, calendar etc) from other users from your iCloud/Apple ID?
    If you want to use your ID for your family because it is the account everybody uses to buy stuff then you only need to ensure that your apple ID is set up in the store (settings-store) and then the users of each device and put their own apple ID in icloud/message/facetime/etc.
    To set up your device, in my opinion, it is best to back up to itunes, and then plug your new device into itunes and "set up as ..." and select the backup from your device.  This will import all your data/settings and your new device will be set up just like your old one.
    I am not certain about using the same payment method for more than one account. 

  • Problems with invokeing method

    Hey,
    I'm trying to create an splash screen before my app starts but i have alot of troubles with this. Here is my code:
    package classes;
    import java.awt.*;
    import java.awt.event.*;
    import java.net.*;
    import java.io.*;
    import clientmanager.Delta;
    * A Splash window.
    *  <p>
    * Usage: MyApplication is your application class. Create a Splasher class which
    * opens the splash window, invokes the main method of your Application class,
    * and disposes the splash window afterwards.
    * Please note that we want to keep the Splasher class and the SplashWindow class
    * as small as possible. The less code and the less classes must be loaded into
    * the JVM to open the splash screen, the faster it will appear.
    * <pre>
    * class Splasher {
    *    public static void main(String[] args) {
    *         SplashWindow.splash(Startup.class.getResource("splash.gif"));
    *         MyApplication.main(args);
    *         SplashWindow.disposeSplash();
    * </pre>
    * @author Werner Randelshofer
    * @version 2.2.1 2006-05-27 Abort when splash image can not be loaded.
    public class SplashWindow extends Window {
         * The current instance of the splash window.
         * (Singleton design pattern).
        private static SplashWindow instance;
         * The splash image which is displayed on the splash window.
        private Image image;
         * This attribute indicates whether the method
         * paint(Graphics) has been called at least once since the
         * construction of this window.<br>
         * This attribute is used to notify method splash(Image)
         * that the window has been drawn at least once
         * by the AWT event dispatcher thread.<br>
         * This attribute acts like a latch. Once set to true,
         * it will never be changed back to false again.
         * @see #paint
         * @see #splash
        private boolean paintCalled = false;
         * Creates a new instance.
         * @param parent the parent of the window.
         * @param image the splash image.
        private SplashWindow(Frame parent, Image image) {
            super(parent);
            this.image = image;
            // Load the image
            MediaTracker mt = new MediaTracker(this);
            mt.addImage(image,0);
            try {
                mt.waitForID(0);
            } catch(InterruptedException ie){}
            // Abort on failure
            if (mt.isErrorID(0)) {
                setSize(0,0);
                System.err.println("Warning: SplashWindow couldn't load splash image.");
                synchronized(this) {
                    paintCalled = true;
                    notifyAll();
                return;
            // Center the window on the screen
            int imgWidth = image.getWidth(this);
            int imgHeight = image.getHeight(this);
            setSize(imgWidth, imgHeight);
            Dimension screenDim = Toolkit.getDefaultToolkit().getScreenSize();
            setLocation(
            (screenDim.width - imgWidth) / 2,
            (screenDim.height - imgHeight) / 2
            // Users shall be able to close the splash window by
            // clicking on its display area. This mouse listener
            // listens for mouse clicks and disposes the splash window.
            MouseAdapter disposeOnClick = new MouseAdapter() {
                public void mouseClicked(MouseEvent evt) {
                    // Note: To avoid that method splash hangs, we
                    // must set paintCalled to true and call notifyAll.
                    // This is necessary because the mouse click may
                    // occur before the contents of the window
                    // has been painted.
                    synchronized(SplashWindow.this) {
                        SplashWindow.this.paintCalled = true;
                        SplashWindow.this.notifyAll();
                    dispose();
            addMouseListener(disposeOnClick);
         * Updates the display area of the window.
        public void update(Graphics g) {
            // Note: Since the paint method is going to draw an
            // image that covers the complete area of the component we
            // do not fill the component with its background color
            // here. This avoids flickering.
            paint(g);
         * Paints the image on the window.
        public void paint(Graphics g) {
            g.drawImage(image, 0, 0, this);
            // Notify method splash that the window
            // has been painted.
            // Note: To improve performance we do not enter
            // the synchronized block unless we have to.
            if (! paintCalled) {
                paintCalled = true;
                synchronized (this) { notifyAll(); }
         * Open's a splash window using the specified image.
         * @param image The splash image.
        public static void splash(Image image) {
            if (instance == null && image != null) {
                Frame f = new Frame();
                // Create the splash image
                instance = new SplashWindow(f, image);
                instance.setVisible(true);
                // Note: To make sure the user gets a chance to see the
                // splash window we wait until its paint method has been
                // called at least once by the AWT event dispatcher thread.
                // If more than one processor is available, we don't wait,
                // and maximize CPU throughput instead.
                if (! EventQueue.isDispatchThread()
                && Runtime.getRuntime().availableProcessors() == 1) {
                    synchronized (instance) {
                        while (! instance.paintCalled) {
                            try { instance.wait(); } catch (InterruptedException e) {}
         * Open's a splash window using the specified image.
         * @param imageURL The url of the splash image.
        public static void splash(URL imageURL) {
            if (imageURL != null) {
                splash(Toolkit.getDefaultToolkit().createImage(imageURL));
         * Closes the splash window.
        public static void disposeSplash() {
            if (instance != null) {
                instance.getOwner().dispose();
                instance = null;
         * Invokes the main method of the provided class name.
         * @param args the command line arguments
        public static void invokeMain(String className, String[] args) {
            try {
                //Class.forName(className).getMethod("main", new Class[] {String[].class}).invoke(null, new Object[] {args});
            } catch (Exception e) {
                InternalError error = new InternalError("Failed to invoke main method");
                error.initCause(e);
                throw error;
    }But when i run my application i get this:
    Exception in thread "main" java.lang.InternalError: Failed to invoke main method
            at classes.SplashWindow.invokeMain(SplashWindow.java:199)
            at clientmanager.Main.main(Main.java:14)
    Caused by: java.lang.ClassNotFoundException: Delta
            at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:169)
            at classes.SplashWindow.invokeMain(SplashWindow.java:197)
            ... 1 moreAnd i don't know why i get that error. Can anybody help me?
    Thanks alot!
    Sincerely,
    NightFox

    this i have created in java 2d
    the code: -
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    public class Draw2 extends Frame
         Shape s[] = new Shape[5];
         public static void main(String args[])
              Draw2 app = new Draw2();
         public Draw2()
              super("Draw2");
              add("Center", new MyCanvas());
              setSize(600, 400);
              show();
         class MyCanvas extends Canvas
              public void paint(Graphics graphics)
                   Graphics2D g = (Graphics2D) graphics;
                   for (int i=0; i<=5; i++)
                        g.draw(new Ellipse2D.Double(20+(60*i), 50.0, 50, 50));
                   for (int i=0; i<=5; i++)
                        g.draw(new Ellipse2D.Double(20+(50*i), 100.0, 50, 50));
                   for (int i=0; i<=5; i++)
                        g.draw(new Ellipse2D.Double(20+(40*i), 150.0, 50, 50));
                   for (int i=0; i<=5; i++)
                        g.draw(new Ellipse2D.Double(20+(30*i), 200.0, 50, 50));
                   for (int i=0; i<=5; i++)
                        g.draw(new Ellipse2D.Double(20+(20*i), 250.0, 50, 50));
    }hope this helps
    thanks
    Pradyut
    http://pradyut.tk

  • Having trouble with persist

    I have created a simple application where a user can order items and then i'm saving the order and all the items (details of order) to the dataBase.
    i'm using jdk1.5 with jboss and mySql (also hibernate).
    i'm having troubles with saving the details of the order, the relevant code is-
    order entity -
    @Entity
    public class Orders implements Serializable
        @Id @GeneratedValue
        private long orderId;                    //generated in db
        private String name;
       public Orders(String userName)
            this.userName=userName;
        public long getOrderId() { return orderId; }
        //getters and setters...
    detailsOfOrder entity -
    @Entity
    public class DetailsOfOrders implements Serializable
    @Id
    private long orderId;
    @Id
    private int productId;
    private int quantity;
    public DetailsOfOrders(long orderId,int productId)
         this.productId=productId;
         this.orderId=orderId;
    public long getOrderId() { return orderId; }
    public int getProductId() { return productId; }
    //getters and setters...
    }session bean (order method) -
            List<SCItem> listOfItems;                         //SCItem is a regular class
            Orders order=new Orders(userName);
            manager.persist(order);
            long orderId=order.getOrderId();   //get order id after persisting
            for(SCItem item : listOfItems)    //save details of order
             DetailsOfOrders detail=new DetailsOfOrders(orderId,"1");
             manager.persist(detail);                                                   //exception occures here
           }when i'm trying to make an order i'm getting the exception-
    javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted state
    what is the problem?
    thanks in advanced.

    yes, the entity classes have no-arg constructors (i just tried to write it shortly here...)
    about the other thing , well i'm sorry , the right code is-
    session bean (order method) -
       List<SCItem> listOfItems;                         //SCItem is a regular class
       Orders order=new Orders(userName);
       manager.persist(order);
       long orderId=order.getOrderId();   //get order id after persisting
       for(SCItem item : listOfItems)    //save details of order
         DetailsOfOrders detail=new DetailsOfOrders(orderId,item.getProductId());
         manager.persist(detail);                                                   //exception occures here
         }what else could it be?

  • How to Use Interactive Forms in BSP Applications - trouble with demo

    Is anyone else out there having trouble with the subject how to guide? https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d0e58022-2a39-2a10-69a8-c1a892e2b3f4
    I think I have everything built out correctly but I get the following run time error.
    Business Server Page (BSP) error
    What happened?
    Calling the BSP page was terminated due to an error.
    SAP Note
    The following error text was processed in the system:
    An exception with the type CX_SY_REF_IS_INITIAL occurred, but was neither handled locally, nor declared in a RAISING clause
    Exception Class CX_SY_REF_IS_INITIAL
    Error Name 
    Program Z_PROCESS_BOOKING_FORM========CP
    Include Z_PROCESS_BOOKING_FORM========CM002
    ABAP Class Z_PROCESS_BOOKING_FORM
    Method DO_REQUEST
    Line 33 
    Long text An attempt was made to execute a dynamic method callon an initial(NULL-) object reference. The reference must refer to an object.
    Following is my code:  line 33 reads as strChecked = node->get_value( ).
    method DO_REQUEST.
    *CALL METHOD SUPER->DO_REQUEST
      data: bookingxml type string.
      bookingxml = request->get_cdata( ).
      data: streamFactory type ref to
      if_ixml_stream_factory.
      data: iStream type ref to if_ixml_istream.
      streamFactory = g_ixml->create_stream_factory( ).
      iStream =
      streamFactory->create_istream_string(
      bookingxml ).
      data: document type ref to if_ixml_document.
      document = g_ixml->create_document( ).
      data: parser type ref to if_ixml_parser.
      parser = g_ixml->create_parser( stream_factory =
      streamFactory
      istream =
      iStream
      document =
      document ).
      parser->parse( ).
      data: node type ref to if_ixml_node.
      data: strChecked type string.
      node = document->find_from_name( name = 'RESERVED'
      strChecked = node->get_value( ).
      data: reserved type BAPISBODAT-RESERVED.
      data: checked type i.
      move strChecked to checked.
      if ( checked = 1 ).
        reserved = 'X'.
      else.
        reserved = ''.
      endif.
      data: custbook type BAPISBONEW.
      node = document->find_from_name( name = 'AIRLINEID'
      custbook-airlineid = node->get_value( ).
      node = document->find_from_name( name = 'CONNECTID'
      custbook-connectid = node->get_value( ).
      data: fd type BAPISBONEW-FLIGHTDATE.
      data: strFd type string.
      node = document->find_from_name( name =
      'FLIGHTDATE' ).
      strFd = node->get_value( ).
      CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
      EXPORTING
      DATE_EXTERNAL = strFd
    * ACCEPT_INITIAL_DATE =
      IMPORTING
      DATE_INTERNAL = custbook-flightdate
      EXCEPTIONS
      DATE_EXTERNAL_IS_INVALID = 1
      OTHERS = 2
      IF SY-SUBRC <> 0.
    * Do something
      ENDIF.
      node = document->find_from_name( name =
      'CUSTOMERID' ).
      custbook-customerid = node->get_value( ).
      node = document->find_from_name( name = 'CLASS' ).
      custbook-class = node->get_value( ).
      node = document->find_from_name( name = 'AGENCYNUM'
      custbook-agencynum = node->get_value( ).
      node = document->find_from_name( name = 'PASSNAME'
      custbook-passname = node->get_value( ).
      data: pb type BAPISBONEW-PASSBIRTH.
      data: strPb type string.
      node = document->find_from_name( name = 'PASSBIRTH'
      strPb = node->get_value( ).
      CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
      EXPORTING
      DATE_EXTERNAL = strPb
    * ACCEPT_INITIAL_DATE =
      IMPORTING
      DATE_INTERNAL = custbook-passbirth
      EXCEPTIONS
      DATE_EXTERNAL_IS_INVALID = 1
      OTHERS = 2
      IF SY-SUBRC <> 0.
    * Something
      ENDIF.
      data: bn type BAPISBOKEY-BOOKINGID.
      data: return type bapiret2_tab.
      data: errmsg type string.
      CALL FUNCTION 'BAPI_FLBOOKING_CREATEFROMDATA'
      EXPORTING
      RESERVE_ONLY = reserved
      BOOKING_DATA = custbook
    * TEST_RUN = ' '
      IMPORTING
    * AIRLINEID =
      BOOKINGNUMBER = bn
    * TICKET_PRICE =
      TABLES
    * EXTENSION_IN =
      RETURN = return.
      data: wa type bapiret2.
      loop at return into wa.
        if wa-type = 'E'.
          move wa-message to errmsg.
          response->append_cdata( errmsg ).
          response->append_cdata( '<BR>' ).
        endif.
      endloop.
    response->append_cdata( 'Flight booked, booking reference number: ').
      data: strBn type string.
      move bn to strBn.
      response->append_cdata( strBn ).
    endmethod.
    The first page works fine but when I submit my form it fails.  I debugged and the request object doesn't look right.
    Any ideas would be greatly appreciated.
    Regards,
    Dan
    Message was edited by:
            Dan Scheck
    Message was edited by:
            Dan Scheck

    Hi Surija,
    there is an issue with Internet Explorer that causes this problem when you launch the BSP applicaiton using the test menu in SE80. The issue does not occur with Firefox...very strange I know.
    Anyway, to get around this you just copy the BSP application URL and open a browser and paste the URL in...so essentially do not use the "Test" in SE80 to launch your application.
    Hope this fixes your problem!
    Cheers,
    Jeff

  • Trouble with Adobe Bridge CS5.5 for Mac Lion Photo downloader

    Hi, I am having trouble with  CS5.5 Bridge's photdownloader when I am trying to choose a folder location.
    Im using Lion / Mac
    When I try to choose say an external drive or another folder location it will freeze up and stay on "Choose" the button flashes on and off but when i try to click it it will not respond or select the desired file location
    The photodownloader does not respond to any other commands..i have to force quit it..yes i have re-booted..re-started and problem remains..
    The only way i can download photos is by choosing the first file option of the pictures file on my harddrive which is not want I wish to do..i have noticed that this started happening after the Raw update..was wondering if this is affecting Photodownloader..
    any suggestions would be greatly appreciated..thank you

    Thank you, SG, for clarifying which OS's this will work with.
    I agree with Jennie - the beauty of "get photos from camera" is that it takes 2 steps out of the workaround you mention above. Personally, I'm okay living with 6.4.1, as I have an older camera. I won't be happy if one of the push updates re-updates me to 6.5 though. I wouldn't want to redo the reinstallation of the new version. This method will not work for any of my clients or students though - they normally can't comfortably follow the technicality of downgrading, and some have newer cameras and would need the 6.5 version. (I don't believe in betas for my clients, and neither do they, for the most part)
    I guess I should thank Adobe - some of my clients have needed tech support to perform the downgrade (SO many people aren't comfortable technically), and some of my clients needed to be retaught the workaround SG mentions. Adobe's flub has actually made me a little money - which I'd rather not have to make this way.
    SG's workaround does work and makes sense - but for my clients with hundreds of images at a time, who have to rename items, add copyright info, & etc., this more than doubles their work-time for the start of their workflow. I hope Adobe gets that GM version out soon.
    BTW - this issue supports an argument I've hadfor years regarding "PUSH" updates. I always tell my clients and students not to do them until they research the update. Because of what I do, I do have to install them personally, but I'm grateful I'm comfortable fixing things myself.

  • DW MX trouble with loading PDF files

    I'm using Dreamweaver MX on an XP Pro machine and have
    trouble loading pdf documents to my web pages. It cooperates
    intermittently. I'm using a virtual pdf printer to convert word
    documents to pdf, then saving them to my website folder, selecting
    the linking text on my page in DW, using the link box to select my
    pdf document, then saving the page and putting files in both the
    local and remote views.
    This method has worked for me before, and now it's not. Does
    anyone know of a reason for this? The documents are saved
    correctly, as I can get them to open as pdf outside of dreamweaver
    and my webpage...when I click on the link I created online I get
    "page not found."
    Thanks for any help!

    I am having the same trouble with Dreamweaver MX 2004 on
    Mac-OSX since I switched from MacOs9. I still have no solution .
    When I want to export a .pdf file I get a message saying <ftp
    error>.
    I never had problems on Mac Os 9 and it started when using
    the first version of Mac Os X. I am presently using mac Os 10.4.10
    and I am still unable to transfer .pdf files, no matter whether I
    use acrobat or the Mac system to produce the.pdf file.
    When I try the page on my computer the link to the.pdf file
    functions allright, but not on the server as the file cannot be
    transfered to it by the software.
    Does someone know how to solve this ?
    Q]
    Originally posted by:
    milflib
    I'm using Dreamweaver MX on an XP Pro machine and have
    trouble loading pdf documents to my web pages. It cooperates
    intermittently. I'm using a virtual pdf printer to convert word
    documents to pdf, then saving them to my website folder, selecting
    the linking text on my page in DW, using the link box to select my
    pdf document, then saving the page and putting files in both the
    local and remote views.
    This method has worked for me before, and now it's not. Does
    anyone know of a reason for this? The documents are saved
    correctly, as I can get them to open as pdf outside of dreamweaver
    and my webpage...when I click on the link I created online I get
    "page not found."
    Thanks for any help!

  • Trouble with first progråµ

    I'm having trouble with my simple calculator, which is similar to the calculator in "cocoa programming for dummies".
    http://public.me.com/schoolkid144
    its firstproject.zip
    The trouble is that when I get the value of the two text fields, it always returns 0 even when the value of both text fields is 1.

    Hi S-T Programmer, and welcome to the Dev Forums!
    The connections between the FuseBox outlets and the three text fields just need to be reversed in Interface Builder. An IBOutlet instance variable is associated with an Interface Builder object by Ctrl-Dragging from the object which owns the variable to the object the variable wants to reference. For example, to connect the FuseBox ivar named answerField to the text field which is to display the answer, Ctrl-Click on the FuseBox icon in the xib window then drag to the desired text field object. The text field object may either be found as an icon in the xib (Document) window, or as the full-scale drawing of the object in the IB Editor window (where you lay out the view). When you release the mouse at the end of the drag, a black list of all the FuseBox class outlets will pop up. Select the outlet you meant to connect (in this case answerField), and the connection will be made.
    The problem with giving IB instructions in the forum is that a picture is worth a thousand words, and this post is on the wrong side of that equation. So I'm hoping you'll be able to see enough of the picture from all these words. There are two other ways of making IB connections that are harder to use, but easier to explain:
    1) If you Ctrl-Click (without dragging) on any icon in the xib window, a floating, black panel will pop up showing every possible connection to that object. To make the same connection discussed above from the answerField outlet to the right-hand text field, Ctrl-Click on the FuseBox icon and find answerField in Outlet list. You can now drag directly from the connector symbol to the desired text field. This time there's no popup when you release the mouse because IB already knows which outlet is to be connected. After the connection is made, you can Ctrl-Click on the text field icon and see its connection panel. You'll know the connection is going in the right direction when the connection to the text field is listed under +Referencing Outlets+ and the connection back at the FuseBox object is listed under Outlets.
    The floating, black connection panels are especially useful for deleting connections. Since your project currently has three backwards connections, you can use these panels to delete those by clicking on the 'X' which is visible on each connection line.
    2) There's also a tab in the Inspector window for making connections. Select one of the objects you want to connect and select Tools>Connections Inspector from the top menu if you have trouble finding the tab. You can make connections in this window if you want, but you can also use the Connections Inspector to view the connections previously made by dragging.
    This topic is covered in more detail (including some screen shots! yay!!) under Creating and Managing Outlet and Action Connections in the +Interface Builder User Guide+.
    I think your connection between the Calculate button and the FuseBox was correct. This post has gotten so long I can't remember if I had to reverse that one too, but I don't think I did. Anyway you'll be able to check for yourself now that you know what to look for, right? The connection between an object's Sent Action and an IBAction method goes in the direction opposite to an IBOutlet connection. Thus to connect the Calculate button you need to drag from the button to the FuseBox.
    _Outlet from_ the FuseBox
    _Action to_ the FuseBox
    Hope that helps!
    \- Ray

Maybe you are looking for