Forum Stats

  • 3,722,204 Users
  • 2,244,252 Discussions
  • 7,849,703 Comments

Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Java Condition Error after doing "String To Number Conversion In OAF - OA Framework

User_BUUZ8
User_BUUZ8 Member Posts: 3 Red Ribbon
edited September 2020 in Java User Groups Discussions

import oracle.jbo.domain.Number;

      String slevel1 = pageContext.getParameter("ATTRIBUTE10");  // This is Page Parameter value

      String slevel2 = pageContext.getParameter("BILL_AMOUNT"); // This is Page Parameter value

     

       //  Try to convert string to Number 

      try

      {

         oracle.jbo.domain.Number nlevel1 = new oracle.jbo.domain.Number (slevel1);

         oracle.jbo.domain.Number nlevel2 = new oracle.jbo.domain.Number (slevel2); 

      

       // Number nlevel1 = new Number (slevel1);

       //Number nlevel2 = new Number (slevel2);      

      }

     

      catch (Exception e)

      {

          e.printStackTrace();    

      }    

        if((null!=slevel1)&&(null!=slevel2))

           {         

            if(nlevel1.intValue() > nlevel2.intValue())  // When I use the condition than Raise Error. If I don't use the condition than ERROR not show //

            {

            throw new OAException("level2 is greater than level1",OAException.ERROR);

            }

            }

----------- Show below Error -----------------------

Error(116,16): identifier nlevel1 not found

Error(116,38): identifier nlevel2 not found

Answers

Sign In or Register to comment.