How to access the int variable in the inner class

hi all,
i can't access the int variable in the inner class. can any one help me
int count = 0;
MouseMoveListener mouseMove = new MouseMoveListener() {
     public void mouseMove(MouseEvent e) {
          count1++;
          System.out.println(count);
};how to access count variable
thanks

for this how can i access the countIf the count variable is a local variable you can't access it from within the
inner class. Make it a member variable of the outer class instead:public class Outer {
   private int count;
   MouseMoveListener mouseMove= new MouseMoveListener() {
      public void mouseMove(MouseEvent me) {
         count++;
         System.out.println(count);
}Alternatively, if you don't need that count variable anywhere else, you
could simply make it a member variable of the inner class itself:public class Outer {
   MouseMoveListener mouseMove= new MouseMoveListener() {
      private int count;
      public void mouseMove(MouseEvent me) {
         count++;
         System.out.println(count);
}kind regards,
Jos

Similar Messages

  • How do I set a variable on the main timeline from within a symbol?

    Just getting started with Animate and coming to it from Flash, as may be apparent from my question. How do you set a variable to the main timeline from within a symbol?
    I have 24 pairs of clickable elements, each in their own symbols, and all 24 of those symbols sit inside another symbol. I want all 24 to be able to set the same global variable when clicked. I can't find that this question is addressed anywhere, which makes me think I may be stuck in a Flash mindset and approaching the task in the wrong way. (There are however MANY discussions of how to address objects at different levels in the hierarchy. That's well covered.)
    Relatedly, how do you access a function on the main timeline from within a symbol?
    Adobe should consider putting together a support page (or pages) just for folks migrating form Flash. In the materials I've encountered so far there seems to be a studied effort to refrain from mentioning Flash in any way. I imagine there are a lot of people out there like me who have a deep background in Flash coding, but are just getting started with Animate. We don't need help with most of the basic concepts, but we may still have some pretty basic questions about how to accomplish some things in Animate because our Flash knowledge is getting in the way.

    Hi Bill,
    There are plenty of threads on here about scope, but here's one way to create a global variable:
    // code on Stage.compositionReady
    sym.myGlobalVar = 1;
    Then, anywhere in your project, you can check/set that var like so:
    sym.getComposition().getStage().myGlobalVar = 2;
    And here's one way to create a global function:
    // code on Stage.compositionReady
    sym.myGlobalFunction = function(){
              console.log('myGlobalFunction');
    Then, anywhere in your project, you can call that function like so:
    sym.getComposition().getStage().myGlobalFunction();

  • How to access my hard drive when the system does not work

    how to access my hard drive when the system does not work

    Startup - Gray, Blue or White screen at boot, w/spinner/progress bar
    Startup Issues - Resolve
    Startup Issues - Resolve (2)

  • How can I pass environment variables to the child process?

    How can I pass environment variables to the child process? This is what I tried and it didn't work.
         static public void main (String[] args) throws Exception {
              ProcessBuilder b = new ProcessBuilder("java", "-cp", ".", "Child");
              Map<String, String> map = b.environment();
              map.put("custom.property", "my value");
                 b.redirectErrorStream(true);
              Process p = b.start();
              BufferedReader reader = new BufferedReader (new InputStreamReader(p.getInputStream()));
              String line = null;
              while (null != (line = reader.readLine())) {
                   System.out.println(line);
         public static void main(String[] args) {
              System.out.println("The value of custom.property is : " + System.getProperty("custom.property"));
         }and the result is:
    The value of custom.property is : null

    Complete test:
         static public void main (String[] args) throws Exception {
              ProcessBuilder b = new ProcessBuilder("java", "-Dcustom.property=my property value", "-cp", ".", "Child");
              Map<String, String> map = b.environment();
              map.put("custom.property", "my environment value");
                 b.redirectErrorStream(true);
              Process p = b.start();
              BufferedReader reader = new BufferedReader (new InputStreamReader(p.getInputStream()));
              String line = null;
              while (null != (line = reader.readLine())) {
                   System.out.println(line);
         public static void main(String[] args) {
              System.out.println("Property value of custom.property is : " + System.getProperty("custom.property"));
              System.out.println("Environment value of custom.property is : " + System.getenv("custom.property"));          
         }

  • How to print a request variable in the name of a section?

    Hello all,
    I have a session variable created in the RPD called VarWorstStore
    and I have a prompt which sets a request variable with the same name.
    Now when I put a report which is filtered on this variable then I can see that the variable is changing when I press go in the dashboard prompt.
    However, I call this variable in a section as well (go to page options - edit dashboard and click on rename of a section)
    Now I type: @{biServer.variables['NQ_SESSION.VarWorstStore']} and check the box Display section heading.
    Now when I save the dashboard I can see the value of the session variable. However, when I change the session variable with the prompt, thenb I can see that the report is changing, but the title isn't.
    Can anyone help me on this? My reference on this was: http://4.bp.blogspot.com/_f689sAiiG-E/SKv8Fxu7wNI/AAAAAAAAAPk/pppwQ1DdEhg/s1600-h/obi-ee-variables-overview.jpg
    I think it is a bug, but perhaps someone knows
    OBIEE version:
    Build: 10.1.3.4.1.090414.1900
    Release Version: Oracle Business Intelligence 10.1.3.4.1
    Package: 090414.1900

    Thanks for all your responds!!
    However, I was thinking in first instance on a narrative view myself indeed, however this is not good enough for me, because I really have an almost pixel perfect dashboard.
    But the thing with the prompt works!!! What I have done is making an extra prompt with the default value set to the session variable and then I set a presentation variable in the same prompt, and after that I am filtering the reports on the presentation variable in stead of the session variable.
    But I cannot find anywhere where to hide the prompt, can you tell me this?
    The only way I can hide things is to set permissions I gues, but then I also guess is that the prompt will do not do its tasks when the user has no permissions to this prompt.
    Hope you can help me out on this last part!!

  • How to convert an int variable into String type

    hi everybody
    i want to know how to convert an interger variable into string variable
    i have to implement a code which goes like this
    Chioce ch;
    for(int i=0;i<32;i++)
    // here i need a code to convert the int variable i into a string variable
    ch.add(String variable);
    how do i convert that int variable i into a String type variable??
    can anyone help me?

    Different methods:
    int a;
    string s=a+"";or
    String.valueOf(int) is the better option because Int.toString() generated an intermediate object to get the endresult
    Ema

  • [svn] 4267: Change path to Assets.swf in eclipse . project file from full hardcoded path to use the FLEX_SDK variable as the base path .

    Revision: 4267
    Author: [email protected]
    Date: 2008-12-09 10:32:36 -0800 (Tue, 09 Dec 2008)
    Log Message:
    Change path to Assets.swf in eclipse .project file from full hardcoded path to use the FLEX_SDK variable as the base path. There is still an issue with Assets.swf not getting referenced correctly. If you import the framework project from Blazeds/trunk into Eclipse and get an error related to Assets.swf or that says "Unable to export SWC oem" for the time being try right clicking on the framwork project in Eclipse and selecting properties. Then in the properties panel, select Flex Library Build Path and then the Assets tab. On the Assets tab, check the check box next to Assets.swf and click Ok. This usually fixes the reference for me.
    Modified Paths:
    blazeds/trunk/development/eclipse/projects/flex/3.0/framework/.project

    Revision: 4267
    Author: [email protected]
    Date: 2008-12-09 10:32:36 -0800 (Tue, 09 Dec 2008)
    Log Message:
    Change path to Assets.swf in eclipse .project file from full hardcoded path to use the FLEX_SDK variable as the base path. There is still an issue with Assets.swf not getting referenced correctly. If you import the framework project from Blazeds/trunk into Eclipse and get an error related to Assets.swf or that says "Unable to export SWC oem" for the time being try right clicking on the framwork project in Eclipse and selecting properties. Then in the properties panel, select Flex Library Build Path and then the Assets tab. On the Assets tab, check the check box next to Assets.swf and click Ok. This usually fixes the reference for me.
    Modified Paths:
    blazeds/trunk/development/eclipse/projects/flex/3.0/framework/.project

  • Accessing Managed Bean Variables in Entity Impl Class

    How can I access managed bean variables in the entity Impl class .
    While inserting a new record in DB , i want to set few entity properties values . The values of those properties are available in the managed bean .
    How can i access those values from Managed Bean and set them the entity Impl class to override the create method.
    Or is there any better recommended approaches ?
    Jdev - 11.1.1.5

    >
    While inserting a new record in DB , i want to set few entity properties values .
    >
    you can user CreateWithparams
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/13-create-with-params-169140.pdf
    http://andrejusb.blogspot.com/2011/02/createwithparams-operation-for-oracle.html

  • How to get an environment variable from OS in class ?

    Hello,
    How to get an environment variable from OS in class ?
    Thanks !

    An example of a Java application that does this is Ant, when you add a line like this in your build.xml:
    <!-- Import environment variables -->
    <property environment="env"/>
    I have looked at the source code of Ant 1.3, especially the file src/main/org/apache/tools/ant/taskdefs/Execute.java. Look at the methods getProcEnvironment() and getProcEnvCommand(). Ant uses an OS-dependent trick to get the environment variables.
    You can download the Ant source code from http://jakarta.apache.org/ant
    Jesper

  • Can I create the object of an protected inner class of a Base class in to t

    Dear All,
    Can I create the object of an protected inner class of a Base class in to the subclass ?
    e.g.
    public class Base{
         protected class Inner {};
    Public class Sub extends Base{
         Public Inner amethod (){
              Return new Inner(); //here I get an exception as
                                //Inner has protected access
    }Regards,
    Ishan

    @Op. The code that you posted isn't close to compiling. Java is case sensitive. It should be public and not Public, and return instead of Return.
    Kaj

  • How to log the error/variables info in java classes

    We are using the third party jar and the jar is independent to the application. So this is why I am not able to see any errors in the web server log. In that file using the below sample code is using. And my problem is I am not able to print the variables info either in web page or in the terminal. Please can any one suggest how to make it possible(to print the variables info).Just fyi, the methods in this class are calling by Java bean and the java bean in turn calling by servlet.
    ============================
    import SPSecurity.configuration.SecurityConfiguration;
    import SPSecurity.exception.NoDataFoundException;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class BasicUserInformation
    public BasicUserInformation()
    //intialization
    public void initialize(String s, int i)
    //some code with variables
    public void initialize(HttpServletRequest httpservletrequest)
    // some code with variables
    private void setUserIdandTypeProperties()
         //Some code with variable.
    }

    The answer is reflection
    Read the following tutorial
    [http://java.sun.com/docs/books/tutorial/reflect/index.html]

  • How to create a presentation variable outside the prompt in OBIEE 10.1.3.4?

    I am having a situation as below:
    I have a "Month" and "Year" dashboard Prompt.
    Once the user selects a particular Month and year, that particular month's end date should be defined as a presentation variable. (For example, if the user selects 'September' and 2011 then '30-sep-2011' should be the presentation variable).
    I dont want the Month End Date to be a part of the prompt.
    Please suggest.

    Hi
    if you have access to metalink, there is a patch..released by oracle.
    i had this same issue and solved it by applying the patch.
    instructions are given in that patch release on how to apply that.
    just replace the DAWServer.jar file in DAC/ Folder by taking a backup of exisitng one
    thank you
    kumr

  • How to access to a resource in the ADF application?

    Hi
    I have a jasper report file named report.jrxml in the following path in my ADF application named “app”:
    app\ViewController\src\org\nmp\app\view\report
    I wanna access to this file inside a java file located in the ViewController project as follows:
    InputStreaminSt = new FileInputStream(new File(“app\ViewController\src\org\nmp\app\view\report\report.jrxml”));
    But I get the following exception:
    java.io.FileNotFoundException: app\ViewController\src\org\nmp\app\view\report\report.jrxml (The system cannot find the path specified)
    How could I access to this resource in my application? I am using JDev 11.1.2.3
    Cheers,
    Ferez

    Timo,
    I made a test case named fileaccess and uploaded it here:
    http://rapidshare.com/files/2200118787/fileaccess.zip
    Just open the project in JDev 11.1.2.3, the Model project is empty and in the viewController project there is a single page named home.jsf in which contains a commandButton. Clicking the button executes the #{fileAccess.readFile} method. The fileAccess bean is located in org.company.fileaccess.view.beans and introduced in faces-config.xml. Body of readFile method is as the following:
    FileInputStream fis = new FileInputStream(new File("/org/company/fileaccess/view/resources/file.txt")); file.txt is located in org.company.fileaccess.view.resources and viewController project is set to copy .txt files into output directory. Clicking the button causes FileNotFoundException.
    Thank you in advance,
    Ferez

  • How to access a static method inside the JSP page

    Here i had wrote the code in java to access databases , i had include the class path to all the class files.
    my problem is when i click the register.jsp page, it will pose eror as null pointer exception i've put my code in this section as follows
    memberchecking.jsp
    <%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*,businessclasses.*,businessobjects.*,projectutils.DateUtilities.*,java.util.*" errorPage="" %>
    <html>
    <head>
    <title>Checking Member's Registration Details...</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body>
    <%
    String loginId = request.getParameter("loginId");
    String resourcePassword = request.getParameter("resourcePassword");
    String confirmPassword = request.getParameter("confirmPassword");
    String resourceStatus=request.getParameter("resourceStatus");
    String nameTitle = request.getParameter("nameTitle");
    String jobTitle = request.getParameter("jobTitle");
    String firstName = request.getParameter("firstName");
    String middleName = request.getParameter("middleName");
    String lastName = request.getParameter("lastName");
    String displayName = request.getParameter("displayName");
    String resourceInitials = request.getParameter("resourceIniitials");
    String countryCode = request.getParameter("countryCode");
    String resourceLanguage = request.getParameter("resourceLanguage");
    //String resourceCurrency = request.getParameter("resourceCurrency");
    String resourceEmail2 = request.getParameter("resourceEmail2");
    String birthMonth = request.getParameter("birthMonth");
    String birthDay = request.getParameter("birthDay");
    String birthYear = request.getParameter("birthYear");
    String resourceGender = request.getParameter("resourceGender");
    String martialStatus = request.getParameter("martialStatus");
    String resourceOccupation = request.getParameter("resourceOccupation");
    String webPage = request.getParameter("webPage");
    String homePhone = request.getParameter("homePhone");
    String homePhone2 = request.getParameter("homephone2");
    String homeFax = request.getParameter("homepFax");
    String phoneOffice = request.getParameter("phoneOffice");
    String phoneOffice2 = request.getParameter("phoneOffice2");
    String officeFax = request.getParameter("officeFax");
    String resourcePager = request.getParameter("resourcePager");
    String resourceMobile = request.getParameter("resourceMobile");
    String resourceType=request.getParameter("resourceType");
    String resourceName = firstName + " " + middleName + " " + lastName;
    //java.util.Date resourceBirthDate = (String)birthMonth + "/" + birthDay + "/" + birthYear;
    session.setAttribute("Name",resourceName);
    session.setAttribute("UserId",loginId);
    out.println("name==========="+resourceName);
    //check whether the input data is valid for insert
    //input validation code goes here.....
    ResourceBC aResourceBC=new ResourceBC();
    //marshall the resource
    ResourceBO resource=new ResourceBO();
    String e1 = (String)resource.getEmail();
    String e2 = (String)resource.getEmail2();
    if(loginId != e1 && resourceEmail2 != e2 ) {
              resource.setStatus( "L");
              resource.setId(5);
              resource.setCountryCode(countryCode);
         //     resource.setResourceTypeCode(resourceType);     
         //     resource.setResourceParent(rs.getLong(6));
         //     resource.setHKey(rs.getLong(7));          
              resource.setName(resourceName);
              resource.setDisplayName(displayName);
              resource.setLogonPassword(resourcePassword);
              resource.setNameTitle(nameTitle);
              resource.setJobTitle(jobTitle);
              resource.setEmail(loginId);
              resource.setEmail2(resourceEmail2);          
         //     resource.setPasswordUpdateDate(rs.getDate(14));
         //     resource.setPasswordExpireDate(rs.getDate(15));
         //     resource.setAccessCode(rs.getString(16));
         //     resource.setLogonUnSuccessTries(0);
              resource.setWebPage(webPage);
              resource.setPhoneOffice(phoneOffice);
              resource.setPhoneOffice2(phoneOffice2);
              resource.setPhoneOfficeFax(officeFax);
              resource.setPhoneHome(homePhone);
              resource.setPhoneHome2(homePhone2);
              resource.setPhoneHomeFax(homeFax);
              resource.setMobile(resourceMobile);
              resource.setPager(resourcePager);
              resource.setStatus(resourceStatus);     
              resource.setGender(resourceGender);     
         //     resource.setBirthDate(resourceBirthDate);
              resource.setMartialStatus(martialStatus);
              resource.setLanguage(resourceLanguage);
    //          resource.setCurrency(resourceCurrency);
    //          resource.setPhoto(photo);
              resource.setInitials(resourceInitials);                         
    //          resource.setCreatedBy(1);
    //          resource.setCreatedDate(rs.getDate(36));
    //          resource.setUpdatedBy(rs.getLong(37));
    //          resource.setUpdatedDate(rs.getDate(38));
              resource.setFirstName(firstName);
              resource.setLastName(lastName);
              resource.setMiddleName(middleName);     
              //resource.setCreatedDate(new java.sql.Date());
              int rowsAdded=aResourceBC.resourceAdd(resource);
              out.println("rowsAdded= "+rowsAdded);
              //add message for success or failure to add resource
              String msg="";
              if(rowsAdded == -1){
                   msg="<font color=red>The ResourceName already exists .Try another</font>";
                   session.setAttribute("message",msg);
                   response.sendRedirect(response.encodeRedirectURL("memberregister.jsp"));
              else if(rowsAdded > 0){
                   msg="<font color=green>Resource Added successfully..........</font>";     
                   session.setAttribute("message",msg);
    %>
                   <jsp:forward page="memberlist.jsp">
                   <jsp:param name="message" value="<%=msg%>"/>
                   </jsp:forward>
    <%}
    %>
    </body>
    </html>
    ResourceBC.java
    package businessclasses;
    import java.sql.*;
    import businessobjects.ResourceBO;
    import java.util.*;
    import dbutilities.DBManager;
    public class ResourceBC
         public Vector resourceList() throws Exception{
         Vector resourceList=new Vector();
         String listSQL="";
         StringBuffer listSQLBuffer=new StringBuffer();
         listSQLBuffer.append("SELECT ");
         listSQLBuffer.append("RES_ID,");
         listSQLBuffer.append("RES_NAME,");
         listSQLBuffer.append("CNTRY_CODE,");
         listSQLBuffer.append("RES_LOGON_PASSWORD,");
         listSQLBuffer.append("RESTYPE_CODE,");
         listSQLBuffer.append("RES_PARENT,");
         listSQLBuffer.append("RES_HKEY,");
         listSQLBuffer.append("RES_DISPLAY_NAME,");
         listSQLBuffer.append("RES_NAME_TITLE,");     
         listSQLBuffer.append("RES_JOB_TITLE,");     
         listSQLBuffer.append("RES_EMAIL,");
         listSQLBuffer.append("RES_EMAIL2,");     
         listSQLBuffer.append("RES_PASSWORD_ACTION,");     
         listSQLBuffer.append("RES_PASSWORD_UPDATE_DATE,");     
         listSQLBuffer.append("RES_PASSWORD_EXPIRE_DATE,");     
         listSQLBuffer.append("RES_ACCESS_CODE,");     
         listSQLBuffer.append("RES_LOGON_UNSUCCESS_TRIES,");     
         listSQLBuffer.append("RES_WEB_PAGE,");
         listSQLBuffer.append("RES_PHONE_OFFICE,");
         listSQLBuffer.append("RES_PHONE_OFFICE2,");
         listSQLBuffer.append("RES_PHONE_OFFICE_FAX,");
         listSQLBuffer.append("RES_PHONE_HOME,");
         listSQLBuffer.append("RES_PHONE_HOME2,");
         listSQLBuffer.append("RES_PHONE_HOME_FAX,");
         listSQLBuffer.append("RES_MOBILE,");
         listSQLBuffer.append("RES_PAGER,");
         listSQLBuffer.append("RES_STATUS,");
         listSQLBuffer.append("RES_GENDER,");
         listSQLBuffer.append("RES_BIRTH_DATE,");
         listSQLBuffer.append("RES_MARTIAL_STATUS,");
         listSQLBuffer.append("RES_LANGUAGE,");
         listSQLBuffer.append("RES_CURRENCY,");
         listSQLBuffer.append("RES_PHOTO,");
         listSQLBuffer.append("RES_CREATED_BY,");
         listSQLBuffer.append("RES_NAME_INITIALS,");          
         listSQLBuffer.append("RES_CREATED_DATE,");
         listSQLBuffer.append("RES_UPDATED_BY");
         listSQLBuffer.append("RES_UPDATED_DATE,");
         listSQLBuffer.append("RES_NAME_FIRST,");
         listSQLBuffer.append("RES_NAME_LAST,");
         listSQLBuffer.append("RES_NAME_MIDDLE");     
         listSQLBuffer.append(" FROM T_RESOURCES ");
         listSQL=listSQLBuffer.toString();
    System.out.println("listSQL---"+listSQL);
         DBManager dbManager=new DBManager();
         Connection con =dbManager.getConnection();
         Statement stmt=con.createStatement();
         ResultSet rs=stmt.executeQuery(listSQL);
         ResourceBO resource=null;
         while(rs.next()){
              resource=new ResourceBO();
              resource.setId(rs.getLong(1));
              resource.setName(rs.getString(2));
              resource.setCountryCode(rs.getString(3));
              resource.setLogonPassword(rs.getString(4));
              resource.setResourceTypeCode(rs.getLong(5));     
              resource.setResourceParent(rs.getLong(6));
              resource.setHKey(rs.getLong(7));          
              resource.setDisplayName(rs.getString(8));
              resource.setNameTitle(rs.getString(9));
              resource.setJobTitle(rs.getString(10));
              resource.setEmail(rs.getString(11));
              resource.setEmail2(rs.getString(12));          
              resource.setPasswordAction(rs.getString(13));
              resource.setPasswordUpdateDate(rs.getDate(14));
              resource.setPasswordExpireDate(rs.getDate(15));
              resource.setAccessCode(rs.getString(16));
              resource.setLogonUnSuccessTries(rs.getLong(17));
              resource.setWebPage(rs.getString(18));
              resource.setPhoneOffice(rs.getString(19));
              resource.setPhoneOffice2(rs.getString(20));
              resource.setPhoneOfficeFax(rs.getString(21));
              resource.setPhoneHome(rs.getString(22));
              resource.setPhoneHome2(rs.getString(23));
              resource.setPhoneHomeFax(rs.getString(24));
              resource.setMobile(rs.getString(25));
              resource.setPager(rs.getString(26));
              resource.setStatus(rs.getString(27));     
              resource.setGender(rs.getString(28));     
              resource.setBirthDate(rs.getDate(29));
              resource.setMartialStatus(rs.getString(30));
              resource.setLanguage(rs.getString(31));
              resource.setCurrency(rs.getString(32));
              resource.setPhoto(rs.getString(33));
              resource.setCreatedBy(rs.getLong(34));
              resource.setInitials(rs.getString(35));                         
              resource.setCreatedDate(rs.getDate(36));
              resource.setUpdatedBy(rs.getLong(37));
              resource.setUpdatedDate(rs.getDate(38));
              resource.setFirstName(rs.getString(39));
              resource.setLastName(rs.getString(40));
              resource.setMiddleName(rs.getString(41));          
              resourceList.add(resource);
              con.close();
              con=null;
              return resourceList;
    //Method to insert the values into the database
    public int resourceAdd(ResourceBO resource){
         System.out.println("in resourceAdd method ");
         //check for duplicate record in the table
         String checkDuplicationSQL="SELECT RES_ID FROM T_RESOURCES WHERE RES_ID='"+resource.getId()+"'";     
         DBManager dbManager=new DBManager();//.getInstance();
         boolean hasDuplicateRecord=dbManager.hasDuplicateRecord(checkDuplicationSQL);
         int rowsAdded=0;
         //insert the record
         //hasDuplicateRecord=false;
              if(!hasDuplicateRecord){
                   //get the next resource id for insertion
              long nextID=dbManager.getNextIDForColumnAndTable("RES_ID","T_RESOURCES");
              System.out.println("nextID================== "+nextID);
    StringBuffer fieldsbuffer=new StringBuffer();
         fieldsbuffer.append("INSERT INTO T_RESOURCES (");
         fieldsbuffer.append("RES_ID,");
         fieldsbuffer.append("RES_NAME,");
         fieldsbuffer.append("CNTRY_CODE,");
         fieldsbuffer.append("RES_LOGON_PASSWORD,");
         fieldsbuffer.append("RESTYPE_CODE,");     
         fieldsbuffer.append("RES_PARENT,");
         fieldsbuffer.append("RES_HKEY,");
         fieldsbuffer.append("RES_DISPLAY_NAME,");     
         fieldsbuffer.append("RES_NAME_TITLE,");
         fieldsbuffer.append("RES_JOB_TITLE,");
         fieldsbuffer.append("RES_EMAIL,");
         fieldsbuffer.append("RES_EMAIL2,");
         fieldsbuffer.append("RES_PASSWORD_ACTION,");
         fieldsbuffer.append("RES_PASSWORD_UPDATE_DATE,");          
         fieldsbuffer.append("RES_PASSWORD_EXPIRE_DATE,");          
         fieldsbuffer.append("RES_ACCESS_CODE,");          
         fieldsbuffer.append("RES_LOGON_UNSUCCESS_TRIES,");     
         fieldsbuffer.append("RES_WEB_PAGE,");
         fieldsbuffer.append("RES_PHONE_OFFICE,");
         fieldsbuffer.append("RES_PHONE_OFFICE2,");
         fieldsbuffer.append("RES_PHONE_OFFICE_FAX,");
         fieldsbuffer.append("RES_PHONE_HOME,");
         fieldsbuffer.append("RES_PHONE_HOME2,");
         fieldsbuffer.append("RES_PHONE_HOME_FAX,");
         fieldsbuffer.append("RES_MOBILE,");
         fieldsbuffer.append("RES_PAGER,");
         fieldsbuffer.append("RES_STATUS,");     
         fieldsbuffer.append("RES_GENDER,");     
         fieldsbuffer.append("RES_BIRTH_DATE,");          
         fieldsbuffer.append("RES_MARTIAL_STATUS,");          
         fieldsbuffer.append("RES_LANGUAGE,");          
         fieldsbuffer.append("RES_CURRENCY,");          
         fieldsbuffer.append("RES_PHOTO,");     
    /*     fieldBuffer.append("RES_CREATED_BY,");
         fieldBuffer.append("RES_NAME_INITIALS,");          
         fieldBuffer.append("RES_CREATED_DATE,");
         fieldBuffer.append("RES_UPDATED_BY");
         fieldBuffer.append("RES_UPDATED_DATE,");
         fieldBuffer.append("RES_NAME_FIRST,");
         fieldBuffer.append("RES_NAME_LAST,");
         fieldBuffer.append("RES_NAME_MIDDLE");     */
         StringBuffer valuesBuffer=new StringBuffer(" VALUES(");
    valuesBuffer.append(nextID+",");
         valuesBuffer.append("'"+resource.getName()+",");
         valuesBuffer.append("'"+resource.getCountryCode()+",");
         valuesBuffer.append("'"+resource.getLogonPassword()+"',");
         valuesBuffer.append("'"+resource.getResourceTypeCode()+",");
         valuesBuffer.append("'"+resource.getResourceParent()+",");
         valuesBuffer.append("'"+resource.getHKey()+",");
         valuesBuffer.append("'"+resource.getDisplayName()+",");
         valuesBuffer.append("'"+resource.getNameTitle()+",");
         valuesBuffer.append("'"+resource.getJobTitle()+",");
         valuesBuffer.append("'"+resource.getEmail()+"',");
         valuesBuffer.append("'"+resource.getEmail2()+"',");
         valuesBuffer.append("'"+resource.getPasswordAction()+",");
         valuesBuffer.append("'"+resource.getPasswordUpdateDate()+",");
         valuesBuffer.append("'"+resource.getPasswordExpireDate()+",");
         valuesBuffer.append("'"+resource.getAccessCode()+",");
         valuesBuffer.append("'"+resource.getLogonUnsuccessTries()+",");     
         valuesBuffer.append("'"+resource.getWebPage()+"',");
         valuesBuffer.append("'"+resource.getPhoneOffice()+"',");
         valuesBuffer.append("'"+resource.getPhoneOffice2()+"',");
         valuesBuffer.append("'"+resource.getPhoneOfficeFax()+"',");
         valuesBuffer.append("'"+resource.getPhoneHome()+"',");
         valuesBuffer.append("'"+resource.getPhoneHome2()+"',");
         valuesBuffer.append("'"+resource.getPhoneHomeFax()+"',");
         valuesBuffer.append("'"+resource.getMobile()+"',");
         valuesBuffer.append("'"+resource.getPager()+"',");
         valuesBuffer.append("'"+resource.getStatus()+"',");
         valuesBuffer.append("'"+resource.getGender()+"',");
         valuesBuffer.append("'"+resource.getBirthDate()+"',");
         valuesBuffer.append("'"+resource.getMartialStatus()+"',");
         valuesBuffer.append("'"+resource.getLanguage()+"',");
         valuesBuffer.append("'"+resource.getCurrency()+"',");
         valuesBuffer.append("'"+resource.getPhoto()+"',");
         valuesBuffer.append("'"+resource.getCreatedBy()+"',");
         valuesBuffer.append("'"+resource.getInitials()+"',");
         valuesBuffer.append("'"+resource.getCreatedDate()+"',");
         valuesBuffer.append("'"+resource.getUpdatedBy()+"',");
         valuesBuffer.append("'"+resource.getUpdatedDate()+"',");
         valuesBuffer.append("'"+resource.getFirstName()+"',");
         valuesBuffer.append("'"+resource.getLastName()+"',");
         valuesBuffer.append("'"+resource.getMiddleName()+"')");
         String insertSQL=fieldsbuffer.toString()+valuesBuffer.toString();
              System.out.println("insertSQL="+insertSQL);
              rowsAdded=dbManager.executeSQL(insertSQL);
              System.out.println("rowsAdded= "+rowsAdded+"hasDuplicateRecord "+hasDuplicateRecord);
              }//end if
              else{
                   //throw new Exception("Has a duplicate Record");
                   return -1;
              return rowsAdded;
    public int resourceUpdate(ResourceBO resource){
              int rowsUpdated=0;
    /*          String orgCodeStr=null;
              if(resource.getOrgCode()==0){
                   orgCodeStr="NULL";
         }else{
                   orgCodeStr=""+resource.getOrgCode();
              StringBuffer updateSQLBuffer=new StringBuffer();
         updateSQLBuffer.append("UPDATE T_RESOURCES SET ");          
         updateSQLBuffer.append("RES_NAME='"+resource.getName()+"',");
         updateSQLBuffer.append("CNTRY_CODE='"+resource.getCountryCode()+"',");
         updateSQLBuffer.append("RES_LOGON_PASSWORD='"+resource.getLogonPassword()+"',");
         updateSQLBuffer.append("RESTYPE_CODE="+resource.getResourceTypeCode()+",");
         updateSQLBuffer.append("RES_PARENT="+resource.getResourceParent()+",");
         updateSQLBuffer.append("RES_HKEY="+resource.getHKey()+",");
         updateSQLBuffer.append("RES_DISPLAY_NAME="+resource.getDisplayName()+",");
         updateSQLBuffer.append("RES_NAME_TITLE="+resource.getNameTitle()+",");
         updateSQLBuffer.append("RES_JOB_TITLE="+resource.getJobTitle()+",");
         updateSQLBuffer.append("RES_EMAIL='"+resource.getEmail()+"',");
         updateSQLBuffer.append("RES_EMAIL2='"+resource.getEmail2()+"',");
         updateSQLBuffer.append("RES_PASSWORD_ACTION="+resource.getPasswordAction()+",");
         updateSQLBuffer.append("RES_PASSWORD_UPDATE_DATE="+resource.getPasswordUpdateDate()+",");
         updateSQLBuffer.append("RES_PASSWORD_EXPIRE_DATE="+resource.getPasswordExpireDate()+",");
         updateSQLBuffer.append("RES_ACCESS_CODE="+resource.getAccessCode()+",");
         updateSQLBuffer.append("RES_LOGON_UNSUCCESS_TRIES="+resource.getLogonUnsuccessTries()+",");     
         updateSQLBuffer.append("RES_WEB_PAGE='"+resource.getWebPage()+"',");
         updateSQLBuffer.append("RES_PHONE_OFFICE='"+resource.getPhoneOffice()+"',");
         updateSQLBuffer.append("RES_PHONE_OFFICE2='"+resource.getPhoneOffice2()+"',");
         updateSQLBuffer.append("RES_PHONE_OFFICE_FAX='"+resource.getPhoneOfficeFax()+"',");
         updateSQLBuffer.append("RES_PHONE_HOME='"+resource.getPhoneHome()+"',");
         updateSQLBuffer.append("RES_PHONE_HOME2='"+resource.getPhoneHome2()+"',");
         updateSQLBuffer.append("RES_PHONE_HOME_FAX='"+resource.getPhoneHomeFax()+"',");
         updateSQLBuffer.append("RES_MOBILE='"+resource.getMobile()+"',");
         updateSQLBuffer.append("RES_PAGER='"+resource.getPager()+"',");
         updateSQLBuffer.append("RES_STATUS='"+resource.getStatus()+"',");
         updateSQLBuffer.append("RES_GENDER='"+resource.getGender()+"',");
         updateSQLBuffer.append("RES_BIRTH_DATE='"+resource.getBirthDate()+"',");
         updateSQLBuffer.append("RES_MARTIAL_STATUS='"+resource.getMartialStatus()+"',");
         updateSQLBuffer.append("RES_LANGUAGE='"+resource.getLanguage()+"',");
         updateSQLBuffer.append("RES_CURRENCY='"+resource.getCurrency()+"',");
         updateSQLBuffer.append("RES_PHOTO='"+resource.getPhoto()+"',");
         updateSQLBuffer.append("RES_NAME_INITIALS='"+resource.getInitials()+"',");
         updateSQLBuffer.append("RES_NAME_FIRST='"+resource.getFirstName()+"',");
         updateSQLBuffer.append("RES_NAME_LAST='"+resource.getLastName()+"',");
         updateSQLBuffer.append("RES_NAME_MIDDLE='"+resource.getMiddleName()+"'");
         updateSQLBuffer.append("WHERE RES_ID="+resource.getId());
         String updateSQL=updateSQLBuffer.toString();
              //String updateSQL="UPDATE T_RESOURCES SET CLIENT_NAME='"+resource.getName()+"',CLIENT_STATUS='"+resource.getStatus()+"',CLIENT_EMAIL_PRIMARY='"+resource.getEmailPrimary()+"',CLIENT_EMAIL_ALTERNATIVE='"+resource.getEmailAlternate()+"',CLIENT_CURRENCY_SYMBOL='"+resource.getCurrencySymbol()+"',CLIENT_CURRENCY_DIGITS="+resource.getCurrencyDigits()+",CLIENT_DIRECTORY_DOCUMENT='"+resource.getDirectoryDocument()+"',CLIENT_DIRECTORY_TEMPLATE='"+resource.getDirectoryTemplate()+"',CLIENT_STORAGE_QUOTA="+resource.getStorageQuota()+",CLIENT_KEY='"+resource.getKey()+"' WHERE CLIENT_ID="+resource.getId();
              System.out.println("updateSQL---"+updateSQL);
              DBManager dbManager=new DBManager();
              rowsUpdated=dbManager.executeSQL(updateSQL);
              return rowsUpdated;
    public int resourceDelete(long resourceId){
              int rowsDeleted=0;
              DBManager dbManager=new DBManager();
              String deleteSQL="DELETE FROM T_RESOURCES WHERE RES_ID="+resourceId;
              System.out.println("deleteSQL==="+deleteSQL);
              rowsDeleted=dbManager.executeSQL(deleteSQL);
              System.out.println("rowsDeleted= "+rowsDeleted);
              return rowsDeleted;
    public ResourceBO getResourceById(long resourceId)throws Exception{
              StringBuffer selectSQLBuffer=new StringBuffer();
              selectSQLBuffer.append("SELECT ");
              selectSQLBuffer.append("RES_ID,");
              selectSQLBuffer.append("RES_NAME,");
              selectSQLBuffer.append("CNTRY_CODE,");
              selectSQLBuffer.append("RES_LOGON_PASSWORD,");
              selectSQLBuffer.append("RESTYPE_CODE,");
              selectSQLBuffer.append("RES_PARENT,");
              selectSQLBuffer.append("RES_HKEY,");
              selectSQLBuffer.append("RES_DISPLAY_NAME,");
              selectSQLBuffer.append("RES_NAME_TITLE,");          
              selectSQLBuffer.append("RES_JOB_TITLE,");     
              selectSQLBuffer.append("RES_EMAIL,");
              selectSQLBuffer.append("RES_EMAIL2,");     
              selectSQLBuffer.append("RES_PASSWORD_ACTION,");     
              selectSQLBuffer.append("RES_PASSWORD_UPDATE_DATE,");     
              selectSQLBuffer.append("RES_PASSWORD_EXPIRE_DATE,");     
              selectSQLBuffer.append("RES_ACCESS_CODE,");     
              selectSQLBuffer.append("RES_LOGON_UNSUCCESS_TRIES,");     
              selectSQLBuffer.append("RES_WEB_PAGE,");
              selectSQLBuffer.append("RES_PHONE_OFFICE,");
              selectSQLBuffer.append("RES_PHONE_OFFICE2,");
              selectSQLBuffer.append("RES_PHONE_OFFICE_FAX,");
              selectSQLBuffer.append("RES_PHONE_HOME,");
              selectSQLBuffer.append("RES_PHONE_HOME2,");
              selectSQLBuffer.append("RES_PHONE_HOME_FAX,");
              selectSQLBuffer.append("RES_MOBILE,");
              selectSQLBuffer.append("RES_PAGER,");
              selectSQLBuffer.append("RES_STATUS,");
              selectSQLBuffer.append("RES_GENDER,");
              selectSQLBuffer.append("RES_BIRTH_DATE,");
              selectSQLBuffer.append("RES_MARTIAL_STATUS,");
              selectSQLBuffer.append("RES_LANGUAGE,");
              selectSQLBuffer.append("RES_CURRENCY,");
              selectSQLBuffer.append("RES_PHOTO,");
              selectSQLBuffer.append("RES_CREATED_BY,");
              selectSQLBuffer.append("RES_NAME_INITIALS,");          
              selectSQLBuffer.append("RES_CREATED_DATE,");
              selectSQLBuffer.append("RES_UPDATED_BY");
              selectSQLBuffer.append("RES_UPDATED_DATE,");
              selectSQLBuffer.append("RES_NAME_FIRST,");
              selectSQLBuffer.append("RES_NAME_LAST,");
              selectSQLBuffer.append("RES_NAME_MIDDLE");     
              selectSQLBuffer.append(" FROM T_RESOURCES WHERE RES_ID="+resourceId);
              String fetchSQL=selectSQLBuffer.toString();
    System.out.println("fetchSQL---"+fetchSQL);
                   DBManager dbManager=new DBManager();
                   Connection con =dbManager.getConnection();
                   Statement stmt=con.createStatement();
                   ResultSet rs=stmt.executeQuery(fetchSQL);
                   ResourceBO resource=new ResourceBO();
                   while(rs.next()){                    
                   resource.setId(rs.getLong(1));
                   resource.setName(rs.getString(2));
                   resource.setCountryCode(rs.getString(3));
                   resource.setLogonPassword(rs.getString(4));
                   resource.setResourceTypeCode(rs.getLong(5));     
                   resource.setResourceParent(rs.getLong(6));
                   resource.setHKey(rs.getLong(7));          
                   resource.setDisplayName(rs.getString(8));
                   resource.setNameTitle(rs.getString(9));
                   resource.setJobTitle(rs.getString(10));
                   resource.setEmail(rs.getString(11));
                   resource.setEmail2(rs.getString(12));          
                   resource.setPasswordAction(rs.getString(13));
                   resource.setPasswordUpdateDate(rs.getDate(14));
                   resource.setPasswordExpireDate(rs.getDate(15));
                   resource.setAccessCode(rs.getString(16));
                   resource.setLogonUnSuccessTries(rs.getLong(17));
                   resource.setWebPage(rs.getString(18));
                   resource.setPhoneOffice(rs.getString(19));
                   resource.setPhoneOffice2(rs.getString(20));
                   resource.setPhoneOfficeFax(rs.getString(21));
                   resource.setPhoneHome(rs.getString(22));
                   resource.setPhoneHome2(rs.getString(23));
                   resource.setPhoneHomeFax(rs.getString(24));
                   resource.setMobile(rs.getString(25));
                   resource.setPager(rs.getString(26));
                   resource.setStatus(rs.getString(27));     
                   resource.setGender(rs.getString(28));     
                   resource.setBirthDate(rs.getDate(29));
                   resource.setMartialStatus(rs.getString(30));
                   resource.setLanguage(rs.getString(31));
                   resource.setCurrency(rs.getString(32));
                   resource.setPhoto(rs.getString(33));
                   resource.setCreatedBy(rs.getLong(34));
                   resource.setInitials(rs.getString(35));                         
                   resource.setCreatedDate(rs.getDate(36));
                   resource.setUpdatedBy(rs.getLong(37));
                   resource.setUpdatedDate(rs.getDate(38));
                   resource.setFirstName(rs.getString(39));
                   resource.setLastName(rs.getString(40));
                   resource.setMiddleName(rs.getString(41));          
                   con.close();
                   con=null;
                   return resource;
    }//end of class
    plz help me to solve this problem....
    rajkumar

    The JSP wil be converted into a java file and then compiled into a class. If you are using tomcat, the java file will be somewhere in the work folder of your tomcat installation. Find the java file and check the line that is reported in the exception to see where the null-pointer is coming from.

  • HELP : How to access a datasource rowset in the AM class ?

    Hi,
    i have an AM "TestAM" which contains the viewobject "ViewTest".
    in the class "TestAMImpl.java" i added a method called "verify()".
    in my JSP i have initialised the AM and a datasource based on the VO "ViewTest" :
    <jbo:ApplicationModule id="am" configname="TestAM.TestAMLocal" releasemode="Stateful" />
    <jbo:DataSource id="ds" appid="am" viewobject="ViewTest" />
    <%
    TestAM am = (TestAM) am.useApplicationModule();
    String Message = am.verify();
    %>
    My question is how to access to the rowset of the datasource "ds" in the code of the method
    "verify()" ?
    public class TestAMImpl extends ApplicationModuleImpl implements TestAM {
    public String verify()
    How to access the rowset initialised in the JSP???????????
    Thanks for your help

    This is correct. Think of the AM as having a hashtable of instances of view objects that you can lookup by instance name.
    The <jbo:DataSource> tag lets you lookup an instance by name in the AM and get a reference to it to use in the JSP page. Within your AMImpl class, you can either:
    [list]
    [*]Call findViewObject("YourViewInstanceName"), or
    [*]Just call the generated getYourViewInstanceName() method which is ok to call inside the Impl class to get hold of the same VO.
    [list]

Maybe you are looking for

  • How to Change Outlook Default Folder for Insert-Attachment and Save Email/Attachemnt while Outlook is open (VBA)

    Hello, Office 2010 32bit, VBA Is it possible to programmatically do the above while Outlook is running?  If so, I'm hoping to make that change from a Word macro. I tried tinkering with the reg key and that doesn't work because it appears Outlook only

  • Endeca App creation using crs

    hi guys, i am using atg 10.1.1 , i successfully running the crs app , now i would like to integrate crs with endeca. Can u guys tel me the next step please? Edited by: ressh on Jan 29, 2013 10:41 PM

  • Blackberry 9780 and Exchange 2013

    Hi all, In my environment, I have Exchange 2013 server hosting email for my domain.com, I have configured spf record for this domain, users can set up email on smart phone nornally. One of my users uses BB 9780, after set up email on phone, when he s

  • Dv6-6c35dx installing backlit keyboard

    I recently purchased a refurbished dv6-6c35dx and I am very satisfied with the laptop. I have upgraded the Ram, gotten an extended battery and upgraded to add bluetooth.   The ONLY thing that I am missing to complete it is a backlit keyboard.  I have

  • Time measurement

    Dear All We are working on a maintenance project and it will be strictly monitored on hourly basis activities. The problem we are facing is when the project is scheduled the time duration of some activities differ from their respected assigned WBS el