Accessing Members in Enclosing context

hi all.. I am new to java. I came across this example that didnt make sense to me and wondering if someone can explain it to me. It is about nested classes, specificly static member classes.
In the code below under the method public void nonStaticMethod_1_1_1().
the assignment statment int kk = k is allowed how come?
// Filename: AccessInTopLevelClass.java
public class AccessInTopLevelClass {                            // (1)
public void nonStaticMethod_1() {                           // (2)
System.out.println("nonstaticMethod_1 in AccessInTopLevelClass");
private static class StaticMemberClass_1 {                  // (3)
private static int i; // (4)
private int j; // (5)
public static void staticMethod_1_1() {                 // (6)
System.out.println("staticMethod_1_1 in StaticMemberClass_1");
interface StaticMemberInterface_1_1 { int Y2K = 2000; } // (7)
protected static class StaticMemberClass_1_1
implements StaticMemberInterface_1_1 {          // (8)
private int k = Y2K; // (9)
public void nonStaticMethod_1_1_1() {               // (10)
// int jj = j; // (11) Not OK.
int ii = i; // (12)
int kk = k; // (13)
// nonStaticMethod_1(); // (14) Not OK.
staticMethod_1_1(); // (15)
public static void main (String[] args) {
int ii = i; // (16)
// int kk = k; // (17) Not OK.
staticMethod_1_1(); // (18)
}

try to use code tag. it's easier for other to read.
interface StaticMemberInterface_1_1 {
               int Y2K = 2000;
          } // (7)
          protected static class StaticMemberClass_1_1 implements
                    StaticMemberInterface_1_1 { // (8)
               private int k = Y2K; // (9)
               public void nonStaticMethod_1_1_1() { // (10)
               // int jj = j; // (11) Not OK.
                    int ii = i; // (12)
                    int kk = k; // (13)
                    // nonStaticMethod_1(); // (14) Not OK.
                    staticMethod_1_1(); // (15)
               public static void main(String[] args) {
                    int ii = i; // (16)
                    // int kk = k; // (17) Not OK.
                    staticMethod_1_1(); // (18)
the assignment statment int kk = k is allowed how come?whats the prob? kk is a local variable. and k is member of StaticMemberClass_1_1 that is not static.
since k is not static member, u only accessing k in an instance of class. in your main method which is static, u can't accessing k.

Similar Messages

  • Non-static variable cant accessed from the static context..your suggestion

    Once again stuck in my own thinking, As per my knowledge there is a general error in java.
    i.e. 'Non-static variable cant accessed from static context....'
    Now the thing is that, When we are declaring any variables(non-static) and trying to access it within the same method, Its working perfectly fine.
    i.e.
    public class trial{
    ���������� public static void main(String ar[]){      ////static context
    ������������ int counter=0; ///Non static variable
    ������������ for(;counter<10;) {
    �������������� counter++;
    �������������� System.out.println("Value of counter = " + counter) ; ///working fine
    �������������� }
    ���������� }
    Now the question is that if we are trying to declare a variable out-side the method (Non-static) , Then we defenately face the error' Non-static varialble can't accessed from the static context', BUT here within the static context we declared the non-static variable and accessed it perfectly.
    Please give your valuable suggestions.
    Thanks,
    Jeff

    Once again stuck in my own thinking, As per my
    knowledge there is a general error in java.
    i.e. 'Non-static variable cant accessed from static
    context....'
    Now the thing is that, When we are declaring any
    variables(non-static) and trying to access it within
    the same method, Its working perfectly fine.
    i.e.
    public class trial{
    ���������� public static void
    main(String ar[]){      ////static context
    ������������ int counter=0; ///Non
    static variable
    ������������ for(;counter<10;) {
    �������������� counter++;
    ��������������
    System.out.println("Value
    of counter = " + counter) ; ///working fine
    �������������� }
    ���������� }
    w the question is that if we are trying to declare a
    variable out-side the method (Non-static) , Then we
    defenately face the error' Non-static varialble can't
    accessed from the static context', BUT here within
    the static context we declared the non-static
    variable and accessed it perfectly.
    Please give your valuable suggestions.
    Thanks,
    JeffHi,
    You are declaring a variable inside a static method,
    that means you are opening a static scope... i.e. static block internally...
    whatever the variable you declare inside a static block... will be static by default, even if you didn't add static while declaring...
    But if you put ... it will be considered as redundant by compiler.
    More over, static context does not get "this" pointer...
    that's the reason we refer to any non-static variables declared outside of any methods... by creating an object... this gives "this" pointer to static method controller.

  • Access to internal workflow context is denied.

    Hi All,
    while starting osb_server1 i am getting below errors. can someone help me to understand what is the reason for this error and how to resolve this?
    <Aug 22, 2012 7:34:44 AM CDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
    <Aug 22, 2012 7:34:47 AM CDT> <Warning> <oracle.soa.services.notification> <BEA-000000> <<.> Notification via email, voice, SMS or IM will not be sent. If you would like to enable them, please configure corresponding sdpmessaging driver. Then modify the accounts and set NotificationMode attribute to either NONE, EMAIL or ALL in workflow-notification-config.xml>
    <Aug 22, 2012 7:34:47 AM CDT> <Error> <oracle.soa.services.workflow.verification> <BEA-000000> <<.> createInternalWorkflowContext: access error: access denied (oracle.security.jps.JpsPermission VerificationService.createInternalWorkflowContext)>
    <Aug 22, 2012 7:34:47 AM CDT> <Error> <oracle.soa.services.workflow.query> <BEA-000000> <<.> Access to internal workflow context is denied.
    Requested access to internal workflow context is not allowed according to security policy.
    Ensure that correct security policy is used. If the error persists, contact Oracle Support Services.
    ORABPEL-30515
    Access to internal workflow context is denied.
    Requested access to internal workflow context is not allowed according to security policy.
    Ensure that correct security policy is used. If the error persists, contact Oracle Support Services.
    at oracle.bpel.services.workflow.verification.impl.VerificationService.createInternalWorkflowContext(VerificationService.java:1163)
    at oracle.bpel.services.workflow.evidence.impl.TaskEvidenceService$1.run(TaskEvidenceService.java:812)
    at oracle.bpel.services.workflow.evidence.impl.TaskEvidenceService.getInternalWorkflowContext(TaskEvidenceService.java:809)
    at oracle.bpel.services.workflow.evidence.impl.TaskEvidenceService.initTrustedCAs(TaskEvidenceService.java:112)
    at oracle.bpel.services.workflow.evidence.impl.TaskEvidenceService.startup(TaskEvidenceService.java:99)
    at oracle.bpel.services.workflow.common.WorkflowServiceInitializer.run(WorkflowServiceInitializer.java:67)
    at java.util.TimerThread.mainLoop(Timer.java:512)
    at java.util.TimerThread.run(Timer.java:462)
    Caused By: java.security.AccessControlException: access denied (oracle.security.jps.JpsPermission VerificationService.createInternalWorkflowContext)
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:374)
    at java.security.AccessController.checkPermission(AccessController.java:546)
    at oracle.security.jps.util.JpsAuth$AuthorizationMechanism$3.checkPermission(JpsAuth.java:436)
    at oracle.security.jps.util.JpsAuth.checkPermission(JpsAuth.java:496)
    at oracle.security.jps.util.JpsAuth.checkPermission(JpsAuth.java:519)
    at oracle.bpel.services.workflow.verification.impl.VerificationService.createInternalWorkflowContext(VerificationService.java:1156)
    at oracle.bpel.services.workflow.evidence.impl.TaskEvidenceService$1.run(TaskEvidenceService.java:812)
    at oracle.bpel.services.workflow.evidence.impl.TaskEvidenceService.getInternalWorkflowContext(TaskEvidenceService.java:809)
    at oracle.bpel.services.workflow.evidence.impl.TaskEvidenceService.initTrustedCAs(TaskEvidenceService.java:112)
    at oracle.bpel.services.workflow.evidence.impl.TaskEvidenceService.startup(TaskEvidenceService.java:100)
    at oracle.bpel.services.workflow.common.WorkflowServiceInitializer.run(WorkflowServiceInitializer.java:68)
    at java.util.TimerThread.mainLoop(Timer.java:512)
    at java.util.TimerThread.run(Timer.java:462)
    >
    ORABPEL-30515
    Access to internal workflow context is denied.
    Requested access to internal workflow context is not allowed according to security policy.
    Ensure that correct security policy is used. If the error persists, contact Oracle Support Services.
    at oracle.bpel.services.workflow.verification.impl.VerificationService.createInternalWorkflowContext(VerificationService.java:1163)
    at oracle.bpel.services.workflow.evidence.impl.TaskEvidenceService$1.run(TaskEvidenceService.java:812)
    at oracle.bpel.services.workflow.evidence.impl.TaskEvidenceService.getInternalWorkflowContext(TaskEvidenceService.java:809)
    at oracle.bpel.services.workflow.evidence.impl.TaskEvidenceService.initTrustedCAs(TaskEvidenceService.java:112)
    at oracle.bpel.services.workflow.evidence.impl.TaskEvidenceService.startup(TaskEvidenceService.java:99)
    at oracle.bpel.services.workflow.common.WorkflowServiceInitializer.run(WorkflowServiceInitializer.java:67)
    at java.util.TimerThread.mainLoop(Timer.java:512)
    at java.util.TimerThread.run(Timer.java:462)
    Caused by: java.security.AccessControlException: access denied (oracle.security.jps.JpsPermission VerificationService.createInternalWorkflowContext)
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:374)
    at java.security.AccessController.checkPermission(AccessController.java:546)
    at oracle.security.jps.util.JpsAuth$AuthorizationMechanism$3.checkPermission(JpsAuth.java:436)
    at oracle.security.jps.util.JpsAuth.checkPermission(JpsAuth.java:496)
    at oracle.security.jps.util.JpsAuth.checkPermission(JpsAuth.java:519)
    at oracle.bpel.services.workflow.verification.impl.VerificationService.createInternalWorkflowContext(VerificationService.java:1156)
    at oracle.bpel.services.workflow.evidence.impl.TaskEvidenceService$1.run(TaskEvidenceService.java:812)
    at oracle.bpel.services.workflow.evidence.impl.TaskEvidenceService.getInternalWorkflowContext(TaskEvidenceService.java:809)
    at oracle.bpel.services.workflow.evidence.impl.TaskEvidenceService.initTrustedCAs(TaskEvidenceService.java:112)
    at oracle.bpel.services.workflow.evidence.impl.TaskEvidenceService.startup(TaskEvidenceService.java:100)
    at oracle.bpel.services.workflow.common.WorkflowServiceInitializer.run(WorkflowServiceInitializer.java:68)
    ... 2 more
    <Aug 22, 2012 7:34:47 AM CDT> <Error> <oracle.soa.services.workflow.evidence> <BEA-000000> <<TaskEvidenceService.initTrustedCAs> ORABPEL-30515
    Access to internal workflow context is denied.
    Requested access to internal workflow context is not allowed according to security policy.
    Ensure that correct security policy is used. If the error persists, contact Oracle Support Services.
    at oracle.bpel.services.workflow.verification.impl.VerificationService.createInternalWorkflowContext(VerificationService.java:1163)
    at oracle.bpel.services.workflow.evidence.impl.TaskEvidenceService$1.run(TaskEvidenceService.java:812)
    at oracle.bpel.services.workflow.evidence.impl.TaskEvidenceService.getInternalWorkflowContext(TaskEvidenceService.java:809)
    at oracle.bpel.services.workflow.evidence.impl.TaskEvidenceService.initTrustedCAs(TaskEvidenceService.java:112)
    at oracle.bpel.services.workflow.evidence.impl.TaskEvidenceService.startup(TaskEvidenceService.java:99)
    at oracle.bpel.services.workflow.common.WorkflowServiceInitializer.run(WorkflowServiceInitializer.java:67)
    at java.util.TimerThread.mainLoop(Timer.java:512)
    at java.util.TimerThread.run(Timer.java:462)
    Caused by: java.security.AccessControlException: access denied (oracle.security.jps.JpsPermission VerificationService.createInternalWorkflowContext)
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:374)
    at java.security.AccessController.checkPermission(AccessController.java:546)
    at oracle.security.jps.util.JpsAuth$AuthorizationMechanism$3.checkPermission(JpsAuth.java:436)
    at oracle.security.jps.util.JpsAuth.checkPermission(JpsAuth.java:496)
    at oracle.security.jps.util.JpsAuth.checkPermission(JpsAuth.java:519)
    at oracle.bpel.services.workflow.verification.impl.VerificationService.createInternalWorkflowContext(VerificationService.java:1156)
    at oracle.bpel.services.workflow.evidence.impl.TaskEvidenceService$1.run(TaskEvidenceService.java:812)
    at oracle.bpel.services.workflow.evidence.impl.TaskEvidenceService.getInternalWorkflowContext(TaskEvidenceService.java:809)
    at oracle.bpel.services.workflow.evidence.impl.TaskEvidenceService.initTrustedCAs(TaskEvidenceService.java:112)
    at oracle.bpel.services.workflow.evidence.impl.TaskEvidenceService.startup(TaskEvidenceService.java:100)
    at oracle.bpel.services.workflow.common.WorkflowServiceInitializer.run(WorkflowServiceInitializer.java:68)
    ... 2 more
    >

    Hi,
    Execute the following steps to resolve this issue:
    Start both managed servers once from the aserver domain.
    This will create a merged system policies file in domain/config/fmwconfig
    Stop both managed servers
    Start both managed servers from mserver domain.
    This will make sure that the system-jazn-policy.xml copied over from domain/config/fwmconfig contains the policies for both SOA and BAM servers
    The above steps will copy the system-jazn-policy.xml created from aserver domain to the mserver domain so that it will avoid overwritten of the system-jazn-policy.xml file
    Regards,
    Kal

  • Problem in accessing attribute of a context node

    Hi All,
    I have a context node called REFE and an attribute named REF to the node REFE. I am trying to get access to the attribute REF, so that i can dynamically set properties. But i am getting NULL Object error. I am successfully getting access to node REFE.
    Here is the code.
    lo_nd_refe = wd_context->get_child_node( name = wd_this->wdctx_refe ).
    lo_el_refe = lo_nd_refe->get_element(  ).
    lo_el_refe->set_attribute(
          EXPORTING
            name =  `REF`
            value = 'http://sapsndbp.sbic.co.za:8011/sap/bc/webdynpro/sap/zzdm_audit_report' ).
    Regards,
    RAvi

    Hi,
    What is the cardinality of the node.
    If it is 1:1 then you can get teh reference of the context element directly.
    If it 0:N or 1:N then you need to pass the index of the context element you are trying to get.
    Use the method get_element of the context node and pass the index value.
    Always check the element is initial or not before you process further for better coding.
    Regards,
    Lekha.

  • Issue with accessing members by dates

    Hi,
    i have one issue that Based on the start and end dates ,the qty and cost for a specific product line should be accessed.
    Here is the description...
    START DATE END DATE QTY COST
    RM1 1/9/2009 30/9/09 0.1 2
    RM2 1/10/09 31/10/09 0.2 1.5
    i need to accesss the products(rm1,rm2) based on the start date and end date..
    pls post it with detail....

    As per your dimension members you want to see the numbers for period of fullmonth(01 SEP to 30 SEP).
    For this case you dont need two dimensions, one dimension is enough at month level and you can use the alias name for the reporting purpose.
    If the data is coming for various startdate and end date and you want to see the data for various combinations, you can maintain two calender dimensions.
    Essbase will calculate the aggregated numbers for the various combinations.
    You dont need another time dimension.

  • Question related to accessing members through dates

    we can access the members in the report through by dates in the sample.basic application through attributes concept. If there is requirement to access the members if it is specified with start date to end date (16/09/09 to 17/09/09)...How can we proceed..?

    I'm afraid you're out of luck. Attribute dims don't accept security.
    Could you handle this through the front end and custom code?
    I wonder if FR would let you limit the scope -- you'd have to try.
    Also, if 11x, you might try a Smart Slice in SmartView. Again, you'd have to try.
    Regards,
    Cameron Lackpour

  • Accessing members of an "attached" movieclip

    Hi,
    I have a movieclip in my Library and at runtime I attached it
    to the stage like so
    var classDefintion:Object =
    getDefinitionByName("pathOption_mc");
    var pathOption:Sprite = new classDefintion();
    pathOption.x=400;
    pathOption.y=200;
    addChild(pathOption);
    Inside the movieclip that I have just attached there is a
    button that I want to attach an event listener to.
    I've tried
    pathOption.continueButton.addEventListener(MouseEvent.CLICK,
    checkAnswer);
    I get errors saying that contineButton is an undefined
    property?
    Can somebody help me out please. I'm still trying to get my
    head around the AS3 equivalent of attachMovieClip. I thought that
    once I had attached the movieclip (like I did above) I should just
    be able to drill down into its members?
    Thanks,
    dub

    Sprite doesn't have a continueButton property -- that's why
    you're getting the error.
    But iuf you cast the sprite to an appropriate dynamic class,
    such as Object, you can access the child objects. i.e.

  • Accessing members and intertance

    Greetings:
    I wrote up a couple of very simple classes to test my understanding of Accessing Inherited Members. In the "Java Programming Language 3rd Edition" page 75 it says "When you invoke a method through an object reference, the actual class of the object governs which implementation is used. When you access a field the declared type of the reference is used."
    This is what I my trying to test and I managed to confuse myself and a co-worker very well. Please find my classes below and my questions futher below.
    code:
    package testadd;
    class Car {
    int zero2Sixty = 12;
    void goFast() {
    System.out.println(" Car goes fast. Zero to Sixty in: " + zero2Sixty);
    void stepOnPetal() {
    goFast();
    int getZero2Sixty() {
    return zero2Sixty;
    class BMW extends Car {
    int zero2Sixty = 8;
    void goFast() {
    System.out.println(" BMW goes fast. Zero to Sixty in: " + zero2Sixty);
    // int getZero2Sixty() {
    // return zero2Sixty;
    // End
    package testadd;
    public class Untitled1 {
    public Untitled1() {
    public static void main(String[] args) {
    Car aCar;
    BMW bmer = new BMW();
    aCar = bmer;
    bmer.stepOnPetal() ;
    bmer.goFast() ;
    aCar.stepOnPetal() ;
    aCar.goFast() ;
    System.out.println("bmer.zero2Sixty:" + bmer.zero2Sixty );
    System.out.println("aCar.zero2Sixty:" + aCar.getZero2Sixty() );
    System.out.println("bmer.zero2Sixty:" + bmer.getZero2Sixty() );
    // End
    BMW goes fast. Zero to Sixty in: 8
    BMW goes fast. Zero to Sixty in: 8
    BMW goes fast. Zero to Sixty in: 8
    BMW goes fast. Zero to Sixty in: 8
    bmer.zero2Sixty:8
    aCar.zero2Sixty:12
    bmer.zero2Sixty:12
    I do not understand why the last two methods return 12
    What is the difference between the call to stepOnPetal and getZero2Sixty()?
    Thanks in Advance.
    Regards
    kd

    Hi,
    The field zero2Sixty is duplicated. I.e The field exists in both classes.
    stepOnPetal() always calls the goFast(), which is overridden in BMW, so it uses the correct value for the attribute zero2Sixty.
    getZero2Sixty() is not overriden in BMW, so it returns the value in Car.
    An easier answer it that the code you have written is the same as defining an attribute in car, and another one in bmw. They aren't related to each other.
    /Kaj

  • Access attribute of a context node in another context node of the same view

    Hi all,
    I want to acess value of an attribute PERNR of context node CUSTOMERS in another context node AUTHENTICATION of the same view. A sample syntax would be helpful .
    Thanks,

    You didn't specify your version of Oracle so here are two options. If 10.2 or greater, use XMLTable, else use the ExtractValue option.
    -- The WITH simply simulates your existing table that I do not have.
    WITH fake_tab AS
    (SELECT XMLTYPE('<?xml version="1.0" encoding="ISO-8859-1"?>
    <Settings>
      <Setting Name="A1" Value="N"/>
      <Setting Name="A2" Value="N"/>
      <Setting Name="A3" Value="SOMEVALUE"/>
      <Setting Name="A4" Value="N"/>
      <Setting Name="A5" Value="Y"/>
      <Setting Name="A6" Value="N"/>
    </Settings>
    ') tab_col
      FROM dual)
    -- For 10.2 and higher use this SELECT
    SELECT a5
      FROM fake_tab,
           XMLTABLE('/Settings'
                    PASSING fake_tab.tab_col
                    COLUMNS
                    a5   VARCHAR2(10)  PATH 'Setting[@Name="A5"]/@Value');
    -- For 10.1 and before
    SELECT ExtractValue(tab_col, '/Settings/Setting[@Name="A5"]/@Value')
      FROM fake_tab;

  • Access tree nodes from context

    Hi all,
      I have context with a parent node having a recursive node. if we populate data in this node i will get a tree structure. Now my question is how can I traverse to recursive node and display all informations to an excel. I know how to export the tree contents to excel. but my doubt is how to export the recursive node contents of the context to export to excel. can anybody help
    Thank you,
    Philip Thayil

    Hi Philip,
    Check this threads,
    Looking for example to export data from a DynPro table to Excel file
    getLeadSelection when using a recursive MasterColumn
    Regards,
    Mithu

  • Accessing Members in Another Class

    How would I access a member from another class? In the actionPerformed method, I want to be able to access objects such as filemenu in the Main class. Here's most of my code:
    class fileEvent implements ActionListener
    {     public void actionPerformed(ActionEvent e,JMenuItem& item)
    public class Main extends JFrame implements ActionListener, ItemListener {
        /** Creates a new instance of Main */
        public Main() {
            this.setTitle("Cross-platform Map Editor");
            this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JInternalFrame drawingframe;
            JDesktopPane desk;
            JPanel drawingpanel = new JPanel();
            JMenuBar menubar = new JMenuBar();
            JMenu filemenu = new JMenu("File");
            JMenu editmenu = new JMenu("Edit");
            JMenu mapmenu = new JMenu("Map");
            JMenu tilesmenu = new JMenu("Tiles");
            JMenu toolsmenu = new JMenu("Tools");
            JMenu windowmenu = new JMenu("Window");
            JMenu aboutmenu = new JMenu("Help");
            JMenuItem fileItem1 = new JMenuItem("New...",KeyEvent.VK_N);
            fileItem1.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, ActionEvent.ALT_MASK));
            fileItem1.addActionListener(new fileEvent(),fileItem1);
            JMenuItem fileItem2 = new JMenuItem("Open...");
            JMenuItem fileItem3 = new JMenuItem("Save");
            JMenuItem fileItem4 = new JMenuItem("Save As...");
            JMenuItem fileItem5 = new JMenuItem("Exit");
            JMenuItem editItem1 = new JMenuItem("Undo");
            JMenuItem editItem2 = new JMenuItem("Redo");
            JMenuItem editItem3 = new JMenuItem("Cut");
            JMenuItem editItem4 = new JMenuItem("Copy");
            JMenuItem editItem5 = new JMenuItem("Paste");
            JMenuItem editItem6 = new JMenuItem("Select All");
            filemenu.add(fileItem1);
            filemenu.add(fileItem2);
            filemenu.add(fileItem3);
            filemenu.add(fileItem4);
            filemenu.add(fileItem5);
            editmenu.add(editItem1);
            editmenu.add(editItem2);
            editItem2.add(new JSeparator());
            editmenu.add(editItem3);
            editmenu.add(editItem4);
            editItem4.add(new JSeparator());
            editmenu.add(editItem5);
            menubar.add(filemenu);
            menubar.add(editmenu);
            menubar.add(mapmenu);
            menubar.add(tilesmenu);
            menubar.add(toolsmenu);
            menubar.add(windowmenu);
            menubar.add(aboutmenu);
            this.setJMenuBar(menubar);
            JButton drawingbutton1 = new JButton("Pencil");
            JButton drawingbutton2 = new JButton("Line");
            JButton drawingbutton3 = new JButton("Paint Pucket");
            JButton drawingbutton4 = new JButton("Recntangle");
            JButton drawingbutton5 = new JButton("Filled Rectangle");
            drawingpanel.add(drawingbutton1);
            drawingpanel.add(drawingbutton2);
            drawingpanel.add(drawingbutton3);
            drawingpanel.add(drawingbutton4);
            drawingpanel.add(drawingbutton5);
            drawingframe = new JInternalFrame("Drawing", true,true,true,true);
            drawingframe.add(drawingpanel);
            drawingframe.setSize(200,300);
            drawingframe.setVisible(true);
            desk = new JDesktopPane();
            desk.add(drawingframe);
            this.add(desk);
            this.setSize(500,500);
            this.setVisible(true);
    /code]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    You don't want your Main class to have accessor methods or public variables... that's the worst dependency you can have.
    Anyways, think in terms of objects. When one object has a reference to another object, it can access all of its public data and methods.
    I'd recommend reading up on the basics:
    http://java.sun.com/docs/books/tutorial/java/index.html

  • BPM Access and modify the context

    Hello,
    I want create a ivew that allows user modify the context of the process's while is not approved. How can i show the actual context of a process ? (I know the BPM reports in Visual composer but my aplication is much complex and i need more flexibility such as webdnypro JAVA). So the idea is when the user click on the process that is not aprroved he can modify the context. How can i implement this ?
    There is some way to get the information of the process by someone webservice ? What is the best way to acessing the information of the BPM ?
    Regards
    JV

    Yes its a solution, but i dont want that the modify task appear in my UWL. How can i do it ?
    I want show only the notifications of the approvals in my UWL.
    Thanks soujanya bhaumik.

  • How to access super of enclosing class from inner class?

    Hello,
    I'd like to access Base.foo() from inner class in overridden Improved.foo(), but seem unable:
    public class InnerSuper {
         public static class Base {
              protected int foo() {
                   return 1;
         public static class Improved extends Base {
              @Override
              protected int foo() {
                   return Integer.parseInt(new Object () {
                        public String toString() {
                             return "1"+foo() ;
                   }.toString());
         public static void main(String[] args) {
              System.out.println(new Improved().foo());
    }The code above does not work, as it recursively calls Improved.foo() where I'd like it to call Base.foo(). What syntax construct should I use? Improved.this would be the same thing, Improved.super does not exist.
    I came up with a work around: adding a method baseFoo() to Improved and call that in the inner class:
       int baseFoo() {
          return super.foo();
       } but remain wondering if that is necessary?

    Indeed, Improved.super.foo() is allowed. My Eclipse syntax highlighting seems to have the same opinion as you: "are you sure you want to write that kind of code?" and leaves the read underlining for a syntax error on for just a second longer.
    This is where I am now:
         public static class DeferredExecSubroutineCall extends SubroutineCall {
              RelayExecutor relay;
              public DeferredExecSubroutineCall(RelayExecutor relay) {
                   this.relay = relay;
              @Override
              protected String execute(final IFDSOC fd, final String commandText) {
                   Future<String> f = relay.submit(new Callable<String>() {
                        @Override
                        public String call() throws Exception {
                             return DeferredExecSubroutineCall.super.execute(fd, commandText);
                   try {
                        return f.get();
                   } catch (InterruptedException e) {
                        throw new RuntimeException(e);
                   } catch (ExecutionException e) {
                        if (e.getCause() instanceof RuntimeException) {
                             throw (RuntimeException) e.getCause();
                        } else {
                             throw new RuntimeException(e.getCause());
         }which is my current effort of adding concurrency to an existing project. I find it quite elegant but I am interested to hear from you...

  • Problem accessing members from different packages

    Hi everyone,
    I have an app with two packages which interact with each other, and the problem is that I have come to a point where changes in one package do not take effect when called from the other package. I have checked the folders and the compilations are correct, they are always the latest. However I cannot explain myself how this can happen. I have even wondered of re-installing netbeans (version 5.5.1 on JKD 1.6) to see if this fixes the problem.
    It doesn't seem to be a problem of library dependency since all paths are correct!
    I have tried everything possible, cleanings and recompilations everywhere, re-starting nbeans, re-starting computer, everything. Don't know what else to do.
    I know it all began when I changed the scope of a class member in one of the packages.
    I would post the code but in fact they are several packages, although it is only one the one causing the problem. I can't find a reason.
    Could anyone give some advice on what else should I try?
    Thanks in advance.
    Chal-lo.

    ant clean build
    clean all installations and redeploy

  • Strange Error When Accessing Members Of A Class

    I'm having a problem referencing a member of an interface I've just created.
    I've created a UIView ( TestView ) in IB and had it write out the class definition and add it to my project. Within this view are two UILabels that I've named and have references to them by means of IBOutlet from within my TestView interface.
    Here is the TestView interface:
    TestView.h:
    #import <UIKit/UIKit.h>
    #import <Foundation/Foundation.h>
    @interface TestView : UIView {
    IBOutlet UILabel *Text1;
    IBOutlet UILabel *Text2;
    @end
    TestView.m:
    #import "TrashView.h"
    @implementation TrashView
    @end
    I then have a reference via IBOutlet to my TestView from within my main window:
    MyAppDelegate.h:
    #import <UIKit/UIKit.h>
    @class TestView;
    @interface MyAppDelegate : NSObject <UIApplicationDelegate> {
    IBOutlet UIWindow *window;
    IBOutlet TestView *testView;
    @property (nonatomic, retain) UIWindow *window;
    @end
    MyAppDelegate.m:
    #import "LSAppDelegate.h"
    #import "TestView.h"
    @implementation MyAppDelegate
    @synthesize window;
    - (void)applicationDidFinishLaunching:(UIApplication *)application {
    // Adjust text lables
    [ testView.Text1 setText:@"Hello World!" ];
    - (void)dealloc {
    [window release];
    [testView release];
    [super dealloc];
    @end
    However I get a strange compiler error from the line where I'm trying to set the text of the label:
    error: request for member 'Text1' in 'testView', which is of non-class type 'UIView'
    Anyone know what this means?
    Thanks!

    It not only depends on where the field is added but also on which fields were selected at the time of variant creation. In other words, the screen on which you are providing variant has now an extra field. You can try by just restricting that field from being displayed ont he screen by through Settings->Fields for selection.
    Try hiding the new field or any fields and make sure the structure is the same as before.
    For example.. there are 5 fields in your table...
    fld1
    fld2
    fld3
    fld4
    fld5
    You have created variant when the structure was like this:
    fld1
    fld2
    fld4
    Now, you have added fld6 at the bottom and the screen is given as:
    fld1
    fld2
    fld3
    fld4
    fld5
    fld6...
    Now it gives error for sure... but if you try hiding fld3 and fld5... this solves the problem... fld6 will not affect as it is placed at last...
    Hope this solves your problem.
    Edited by: Srinivas Kalluri on Aug 5, 2011 3:46 PM
    Edited by: Srinivas Kalluri on Aug 5, 2011 3:49 PM

Maybe you are looking for

  • My podcasts won't sync from iTunes to my iPhone

    I had been downloading podcasts onto iTunes, with several on auto-subscription, with any new ones auto-transferring to my iPhone each time I plugged it into the laptop via USB.  A couple of days ago, I noticed that no new podcasts were showing up on

  • Why MS Silverlight player not working in ubuntu

    I have installed Novell Moonlight 2.3 plug-in in Ubuntu firebox 7.01 but it failed to play any Silverlight video. Any suggestion will be appropriated

  • Microphone iPad 2 3g

    Today I could not record a video and microphone not doing its job because once I play the video the audio is heard as interference and do not hear any sound.

  • ACCESS column names containing spaces

    Hi I'm new to Java SQL programming and have come across a problem I can't seem to fix reharding ACCESS column names that contain spaces. Here's the actual code : sqlquery = "select * from cars,qualify where group2 = '" + addComponentsToDrivers.curren

  • Empty nodes using JhsTreeMenuPageTemplate

    Hi guys, JHeadstart version 11.1.1.2.46 I'm using the JhsTreeMenuPageTemplate as my page template to generate my menu's in the tree structure. I also have "Authorize using group permissions" set which sets the "rendered" attribute of each "itemNode"