Reusing Classes?

I'm trying to understand better how to reuse code instead of just copying it, but I have a dilemma:
I have a frame (Frame1) composed of let's say 2 panel. 1 of those 2 panels (panel1) has the potential to be reused many times in other frames throughout the selfsame program. In addition, panel1 contains a few radio buttons.
public class Frame1
this.add(new panel1);
public class panel1()
public JRadioButton jrb1 = new JRadioButton("11");
public JRadioButton jrb2 = new JRadioButton("22");
//constructor
public class panel2()
{  //constructor
Since Frame1 has a composition relationship with panel1, I created the class, panel1, within Frame1. The problem is how can I reuse panel1 in a different frame without copying the code? Essentially, I'm trying to better understand how to structure classes for reuse whenever possible.
My initial solution was to make extract class panel1 from within Frame1 and make it a distinct class unto itself. That of works in terms of displaying, but then I encounter the next issue - how do I gain access to the radio buttons variables?

Once you get down to specific detail, it is very had to reuse code. When you want to make a reusable code library, the thing you are after is general forms: Maybe you find yourself always overriding paintComponent in a JPanel in the very same fashion every time. Make that class with that override, then you can include it in your project and extend it. So instead of having the JPanel that Sun provides as your base, the one you have to override every time, you have your JPanel that has the feature(s) you use all the time.
Unless a significant portion of your code is going to have the same components layed out in the same manner, then remember to stick to general cases.
Remember: what you are looking for are base classes that you can extend. (That is not to say, using copy and paste is not a good thing for some tedious detail work.)

Similar Messages

  • Problem with Oracle Web Service Proxies reusing classes and exceptions

    We have an application that have many web services and we're having a really hard time working with Oracle Web Service Proxy. We have many web services that share the same classes for parameters and exceptions. When we generate de proxy classes, it generates a lot of _LiteralSerializer classes. Because I'm reusing the same classes and exceptions it generates the same _LiteralSerializer classes for this classes and they get replaced. For Example
    I have classes A and B and Web Services X and Y that use this classes. When I generate the 2 proxies it generates A_LiteralSerializer and B_LiteralSerializer on the 2 proxies and they get replaced and I get "No serlalizers for A class or B class". This problems repeats a lot of times and this problem is a huge risk for our project. We're using JDeveloper 10.1.3.4.
    Is there a way to avoid this with Oracle Web Service Proxies?
    Regards,
    Néstor

    Resolved when I create a deployement profile explicitly.
    The Webservice.deploy that gets created automatically when I create a web service was giving this issue.
    Thanks
    Saikrishna

  • Reusing classes generated by xjc

    Hi,
    I'am new to xjc and I'd like to know if there is a way to tell it not to generate classes
    for certain schemas (maybe better to say namespaces) that I feed to it (let's say I give
    it a couple schema files and they have dependencies between them)?
    What I would like to do is to generate classes for certain namespaces, package
    them to a jar and then supply them when generating classes for other dependent
    schemas that need them, but do not generate the packaged classes again.
    Is that possible?
    Thanks in advance,
    Tomasz

    Flattening your schema definition will flatten the output files, too -- that will probably be nice for coding as well since you wont have to use class names such as SomeTypeNestedInAnotherTypeThatHasYetAnotherType. Instead of having all of the elements defined directly within the enclosing root element, define logical chunks at the top level and incorporate them in the definition of real root element of your documents by reference.

  • Reuse classes or methods.

    Hi,
    I would like to know how I can reuse methods in java.
    For example I want to reuse send() method in delete() method.
    Thank you. sample code will be ok.

    what you mean by that ?
    public void delete()
        ... //do something...
        send();
        ...// do something...
    }is this what you want ?

  • Software / class management

    Hello,
    i have done one project in lvoop :   a T° calibration software
    now i have another one with humidity but software are used separatly 
    I see i could reuse most of the first one but i don't know how to manage it :
    1) i can use the same project but softwares are distinct and T° classes and devices linked to will be loaded for nothing
    or maybe i could load them dynamically but   for the moment it isn't the case
    2) or creating a differente project so how can i reuse classes used in the first one
    and how to do when changing class parametes or functions. how to have shared classes
    i think the first solution could be the best way but as i am new to sofware management
    i would like to collect points of view of experimented developers
    What do you think about ?
    Best regards
    Tinnitus
    CLAD / Labview 2011, Win Xp
    Mission d'une semaine- à plusieurs mois laissez moi un MP...
    RP et Midi-pyrénées .Km+++ si possibilité de télétravail
    Kudos always accepted / Les petits clicks jaunes sont toujours appréciés
    Don't forget to valid a good answer / pensez à valider une réponse correcte

    Hi tinnitus,
    It is quite hard to answer your
    question....
    In fact usually in Object Oriented you should think about the
    maintenance and upgradability of your application.
    What I can suggest you is
    to create a general class (the parent class) then different children depending
    what type of measurement or sensor you use. Then you can implement your code
    using Dynamic Dispatch (the VI Server for LVOOP ;-). So your code will
    automatically invoke the proper method depending the class he's got as input.
    Using this approach you can have a very generic top level VI calling
    dynamically the class children.
    A dynamic dispatching subVI
    has some small overhead when LabVIEW looks up which subVI to invoke. The
    overhead is constant. It does not increase as you add more classes or as you
    add more dynamic VIs to a class. There can be a performance hit if the subVI
    call has to make extra copies of the parameters to match the functionality of
    the actual subVI LabVIEW invokes. You can avoid this by wiring the input front
    panel terminals to output front panel terminals even on dynamic VIs that you
    never expect to call (for example, parent VIs that exist only to
    define the connector pane for children to override). You can also use Data By
    Reference in you class to optimize memory management. 
    Feel free if you have any
    further question.
    upgradability 
    Benjamin R.
    R&D Software Development Manager
    http://www.fluigent.com/

  • Reusing vis between projects

    Hi All:
    I need to start a new project, Where I want to reuse few classes and others VIs from previous Project. I copied all the files into a new folder and renamed.. now all the vi links are messed up... I am looking for effective way to reuse classes and other VIs from one project to another.
    Regards,
    Chandra. 

    Put them in librarys (Not an LLBs LVLIBs!).  Use the librarys in your projects.
    Jeff

  • Reg : object creation for controller and view ?

    hi friends....
    i am new to WDA and objects...
    please explain me..
    when i create the web dynpro component one interface is automatically created as IF_COMPONENTCONTROLLER for component
    IF_MAINVIEW for view
    IF_WINDOW for window
    correct me if i am wrong
    suppose if i want to reuse class, i want to create object... like wise
    if i want to reuse interfaces, i want to create object.
    but in this case..for eg (IF_COMPONENTCONTROLLER, IF_MAINVIEW ) where we are creating object...?
    no need to create object ?
    regards
    deva

    >but in this case..for eg (IF_COMPONENTCONTROLLER, IF_MAINVIEW ) where we are creating object...?
    no need to create object ?
    No you don't have instantiate any of the objects.  Think of Web Dynpro as a modeling layer implemented in ABAP Objects, but sitting on top of the Object Oriented constructs.  You still have some of the benfiits of OO - like event registration, inheritance, methods, etc - but a lot of the OO setup is done and maintained by the framework for you.  So although each section of Web Dynpro - the component, the controllers, contexts, views, etc - are all technically ABAP Object instances, you don't have to manage the objects directly.

  • Composition vs. Inheritance

    Hello again world.
    I finally got around to buying Bruce Eckel's book Thinking in Java. After reading the chapter "Reusing Classes", I tried to write a program using both techniques just to see if it would compile:class  Building
       protected  boolean  isBrick;
       protected  boolean  isRoofPitched;
    class  Window
       public  void  setTinted(boolean  isTinted) {}
    class  Door
       public  void  open() {}
       public  void  close() {}
       protected  Window  window = new  Window();
    public  class  House  extends  Building
       private  Window  windows[] = new  Window[12];
       private  Door  frontDoor;
       public  House()
          isBrick = false;
          isRoofPitched = true;
          frontDoor = new  Door();
          frontDoor.window.setTinted(true);
          windows[0] = new  Window();
          windows[0].setTinted(false);
          for (int  x = 0 ; x < 12 ; x++)
             windows[x] = new  Window();
       public  static  void  main(String[]  params)
          House  house = new  House();
          house.frontDoor.open();
          System.out.println("Welcome to your new home.");
          System.out.println("You may want to install some plumbing.");
    }I would appreciate any comments or criticisms on how demonstrative my logic is.
    Thank you one and all.
    Ciao for now.

    I think you have used inheritance and composition in a correct way. For example a House IS-A Building but a House HAS-A Window and it HAS-A Door etcetera.

  • 1.4.1 JRE Support

    Hi,
    Does Oracle Workflow support the 1.4.1 JRE (or plugging in any other JRE)?
    I am hoping to be able to develop a workflow-based app using Java functions/activities but I would like to be able to use new classes/features in 1.4.1. I would also potentially like to reuse classes from other projects within my organization, which may be written to the 1.4.1 features.
    Also, are there any significant downsides to using Java activities instead of PL/SQL?
    Thank you.
    -Suren

    Raja,
    Thank you for your reply. Just to confirm, only the workflow engine embedded in iAS 904 supports 1.4.1 and the standalone version does not?
    To clarify, there is not necessarily a middle tier app calling through to the engine, though that may be one aspect of the system. My concern with JDK support stems from the fact that we would like to use Java functions via the activity agent. The functions that we write may leverage existing Java library code, some of which may rely on 1.4.1 functionality. In this case, we would need the JRE that is used by the Java function activity agent to support 1.4.1.
    From your response, it seems that the engine bundled with iAS 904 does support this but the standalone workflow engine may not.
    Is this accurate and a correct understanding of your reply? Thank you.

  • Object oriented concepts

    Hi Gurus,
    I want to know thw difference between objectoriented program and abap general programme?
    thanks in advance

    Hi Rama Krishna ,
    Object Orientation
    A programming technique in which solutions reflect real world objects
    What are objects ?
    An object is an instantiation of a class. E.g. If “Animal” is a class, A cat
    can be an object of that class .
    With respect to code, Object refers to a set of services ( methods /
    attributes ) and can contain data
    What are classes ?
    A class defines the properties of an object. A class can be instantiated
    as many number of times
    Advantages of Object Orientated approach
    Easier to understand when the system is complex
    Easy to make changes
    Encapsulation - Can restrict the visibility of the data ( Restrict the access to the data )
    Polymorphism - Identically named methods behave differently in different classes
    Inheritance - You can use an existing class to define a new class
    Polymorphism and inheritance lead to code reuse
    Classes in abap
    Classes in ABAP are either local or global
    Global classes are declared in class builder (SE24 )
    Local classes are declared within programs
    Components of a class
    Attributes : Internal data fields of class
    Attributes can be either instance attributes – specific to each instance of the class ( object ) or static attributes which are common to all instances
    Methods :
    Subroutines / procedures in a class that define the behavior of the object. Methods can also be instance methods or static methods
    Encapsulation in ABAP
    Encapsulation is obtained through the restriction in visibility of attributes / methods attained through the definition of Public, Private and Protected section of a class
    Public Section
    All of the components declared in the public section are accessible to all users of the class, and to the methods of the class and any classes that inherit from it. The public components of the class form the interface between the class and its users.
    Protected Section
    All of the components declared in the protected section are accessible to all methods of the class and of classes that inherit from it.
    Private Section
    Components that you declare in the private section are only visible in the methods of the same class.
    Inheritance in ABAP
    Inheritance allows you to derive a class based on an already existing class.
    CLASS <subclass> DEFINITION INHERITING FROM <superclass>.
    ENDCLASS.
    CLASS <subclass> IMPLEMENTATION.
    ENDCLASS.
    All attributes / methods of super class become the property of the subclass too. Only public and protected attributes / methods are visible in the subclass
    Polymorphism in ABAP
    When methods with same name perform differently under different
    circumstances we call it polymorphism.
    Methods redefined in a subclass is an example for Polymorphism
    Interfaces
    Interfaces are used to define the model of a class.
    They also like classes can be either local or global.
    Global interfaces are defined through SE24 and local interfaces are defined in program.
    Please check this online document (starting page 1291).
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf
    Also check this links as well.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    http://www.futureobjects.de/content/intro_oo_e.html
    http://www.sap-img.com/abap/business-add-in-you-need-to-understand-abap-oo-interface-concept.htm
    /people/ravikumar.allampallam/blog/2005/02/11/abap-oo-in-action
    check the below links lot of info and examples r there
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.geocities.com/victorav15/sapr3/abap_ood.html
    http://www.brabandt.de/html/abap_oo.html
    Check this cool weblog:
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    Hope this resolves your query.
    Reward all the helpful answers.
    Thanks & Regards
    Bhaskar rao.M

  • Info on ABAP-OOPS

    Hi All,
    I want to know where exactly can we use ABAP OOPS..
    Can  we use in Classical Reports,
                            Pool Programming
    If we can use them in Pool Programming can you help me out with a small example.
    Regards

    hi,
    Object Orientation
    A programming technique in which solutions reflect real world objects
    What are objects ?
    An object is an instantiation of a class. E.g. If “Animal” is a class, A cat
    can be an object of that class .
    With respect to code, Object refers to a set of services ( methods /
    attributes ) and can contain data
    What are classes ?
    A class defines the properties of an object. A class can be instantiated
    as many number of times
    Advantages of Object Orientated approach
    Easier to understand when the system is complex
    Easy to make changes
    Encapsulation - Can restrict the visibility of the data ( Restrict the access to the data )
    Polymorphism - Identically named methods behave differently in different classes
    Inheritance - You can use an existing class to define a new class
    Polymorphism and inheritance lead to code reuse
    Classes in abap
    Classes in ABAP are either local or global
    Global classes are declared in class builder (SE24 )
    Local classes are declared within programs
    Components of a class
    Attributes : Internal data fields of class
    Attributes can be either instance attributes – specific to each instance of the class ( object ) or static attributes which are common to all instances
    Methods :
    Subroutines / procedures in a class that define the behavior of the object. Methods can also be instance methods or static methods
    Encapsulation in ABAP
    Encapsulation is obtained through the restriction in visibility of attributes / methods attained through the definition of Public, Private and Protected section of a class
    Public Section
    All of the components declared in the public section are accessible to all users of the class, and to the methods of the class and any classes that inherit from it. The public components of the class form the interface between the class and its users.
    Protected Section
    All of the components declared in the protected section are accessible to all methods of the class and of classes that inherit from it.
    Private Section
    Components that you declare in the private section are only visible in the methods of the same class.
    Inheritance in ABAP
    Inheritance allows you to derive a class based on an already existing class.
    CLASS <subclass> DEFINITION INHERITING FROM <superclass>.
    ENDCLASS.
    CLASS <subclass> IMPLEMENTATION.
    ENDCLASS.
    All attributes / methods of super class become the property of the subclass too. Only public and protected attributes / methods are visible in the subclass
    Polymorphism in ABAP
    When methods with same name perform differently under different
    circumstances we call it polymorphism.
    Methods redefined in a subclass is an example for Polymorphism
    Interfaces
    Interfaces are used to define the model of a class.
    They also like classes can be either local or global.
    Global interfaces are defined through SE24 and local interfaces are defined in program.
    Please check this online document (starting page 1291).
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf
    Also check this links as well.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    http://www.futureobjects.de/content/intro_oo_e.html
    http://www.sap-img.com/abap/business-add-in-you-need-to-understand-abap-oo-interface-concept.htm
    /people/ravikumar.allampallam/blog/2005/02/11/abap-oo-in-action
    check the below links lot of info and examples r there
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.geocities.com/victorav15/sapr3/abap_ood.html
    http://www.brabandt.de/html/abap_oo.html
    Check this cool weblog:
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://www.allsaplinks.com/
    http://www.sap-img.com/
    http://www.sapgenie.com/
    http://help.sap.com
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.sapgenie.com/abap/controls/index.htm
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
    For funtion module to class
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm
    for classes
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm
    for methods
    http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
    for inheritance
    http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm
    for interfaces
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm
    Hope this resolves your query.
    Reward all the helpful answers.
    Regards
    Omkar

  • ABAP with OOPS

    Hi to all,
    can anyone give the information regarding oops in abap,
    like how it is used and the scope of it in abap.
    points will be rewarded,
    rushi.
    Message was edited by:
            Rushi T

    Hi Rushi,
    Check this info.
    Object Orientation
    A programming technique in which solutions reflect real world objects
    What are objects?
    An object is an instantiation of a class. E.g. If “Animal” is a class, A cat can be an object of that class.
    With respect to code, Object refers to a set of services (methods/attributes) and can contain data
    what are classes?
    A class defines the properties of an object. A class can be instantiated as many number of times
    Advantages of Object Orientated approach
    Easier to understand when the system is complex
    Easy to make changes
    Encapsulation - Can restrict the visibility of the data ( Restrict the access to the data )
    Polymorphism - Identically named methods behave differently in different classes
    Inheritance - You can use an existing class to define a new class
    Polymorphism and inheritance lead to code reuse
    Classes in abap
    Classes in ABAP are either local or global
    Global classes are declared in class builder (SE24 )
    Local classes are declared within programs
    Components of a class
    Attributes : Internal data fields of class
    Attributes can be either instance attributes – specific to each instance of the class ( object ) or static attributes which are common to all instances
    Methods :
    Subroutines / procedures in a class that define the behavior of the object. Methods can also be instance methods or static methods
    Encapsulation in ABAP
    Encapsulation is obtained through the restriction in visibility of attributes / methods attained through the definition of Public, Private and Protected section of a class
    Public Section
    All of the components declared in the public section are accessible to all users of the class, and to the methods of the class and any classes that inherit from it. The public components of the class form the interface between the class and its users.
    Protected Section
    All of the components declared in the protected section are accessible to all methods of the class and of classes that inherit from it.
    Private Section
    Components that you declare in the private section are only visible in the methods of the same class.
    Inheritance in ABAP
    Inheritance allows you to derive a class based on an already existing class.
    CLASS <subclass> DEFINITION INHERITING FROM <superclass>.
    ENDCLASS.
    CLASS <subclass> IMPLEMENTATION.
    ENDCLASS.
    All attributes / methods of super class become the property of the subclass too. Only public and protected attributes / methods are visible in the subclass
    Polymorphism in ABAP
    when methods with same name perform differently under different circumstances we call it polymorphism.
    Methods redefined in a subclass is an example for Polymorphism
    Interfaces
    Interfaces are used to define the model of a class.
    They also like classes can be either local or global.
    Global interfaces are defined through SE24 and local interfaces are defined in program.
    Please check this online document (starting page 1291).
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf
    Also check this links as well.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    http://www.futureobjects.de/content/intro_oo_e.html
    http://www.sap-img.com/abap/business-add-in-you-need-to-understand-abap-oo-interface-concept.htm
    /people/ravikumar.allampallam/blog/2005/02/11/abap-oo-in-action
    check the below links lot of info and examples r there
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.geocities.com/victorav15/sapr3/abap_ood.html
    http://www.brabandt.de/html/abap_oo.html
    Check this cool weblog:
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://www.allsaplinks.com/
    http://www.sap-img.com/
    http://www.sapgenie.com/
    Hope this resolves your query.
    <b>Reward all the helpful answers.</b>
    Regards

  • Translation Help in Webdynpro

    Dear All,
    I need a help for doing my Project Internationalization, as I am finding out some what difficulties to changes some of the Changes. Could you please help to make it as Internationalization. Please find my way of Approach, I am putting all the Hard Coded Messages into Message Pool of that Particular Webdynpro Component. Please see one of the Example below.
    <u><b>For Eg:</b></u>
    1. messageMgr.reportSuccess("Updated successfully");
    Ans: messageMgr.reportSuccess(wdComponentAPI.getTextAccessor().getText("UPDATED_SUCC"));
    <u><b>Explanation:</b></u>
    UPDATED_SUCC is the Message Pool's Message Key. So i am replacing the Hard Coded Message "Updated Successfully" to wdComponentAPI.getTextAccessor().getText("UPDATED_SUCC").
    <u><b>My Queries & Need Answers for the Following:</b></u>
    1. submitBtn.setText("Create");
    2. wdContext.currentContextElement().setHeaderText("Define Business Unit");
    3.String cret = "Create";
    Appreciate your Co-operation, If you could give me ASAP.
    Thanks & Regards,
    Satya Krishna Madasu

    Satya,
    In Java you can always use Resource Bundles (property files or specific objects). Plus WD gives you almost the same option with message pool + better editing / translating environment
    So if you can -- use message pool for the very same purpose you are using it to display messages, i.e. kind of
    wdContext.currentContextElement().setHeaderText(
      wdComponentAPI.getTextAccessor().getText("HEADER_TEXT")
    "If you can" means that you are using localized text from WD controllers (view/component/custom) or you may pass IWDTextAccessor to your custom Java classes. If you cann't (just a design choice or you reuse classes between WD/non-WD code, like exception classes) -- then use standard Java i18n/l10n API for resource bundles.
    Valery Silaev
    EPAM Systems
    http://www.NetWeaverTeam.com

  • Death of Swing

    Hello,
    How to other programmers who have looked inside the Swing java code feel about it?
    It seems to me that this package has developed into spaghetti programming with objects.
    <......................................................................>
    <......................................................................>
    <......................................................................>
    <......................................................................>
    <......................................................................>
    One possible reason I can think of are that the developers have tried too hard to reuse classes.
    Whatever happened to the idea of encapsulation sun?

    I have to agree with you on this one, I cannot stand when I have to look through the Swing code for help. Its convoluded and disgusting. The resued of classes and functionality pays NO attention to performance but rather to the "end result" so they can have a longer feature list.
    Granted Swing is no easy feat, but jesus christ, try and trim it down a little. I wouldn't mind a Toolkit rewrite that got rid of AWT and Swing, but I suppose that's like asking for trees that grow gold... not to mention the cost to the company.

  • Linking Universe

    Hi,
    Can we use linking universe in XIR3.1?If so, I have two different universes with different connections and  different databases.In this case,can we link two universes ?
    Both servers are sqlserver 2000
    Regards
    Jug

    Hi Jug,
    I copy paste the note below.
    The presentation is better on the page that I linked of course but at least you get the information
    1348843 - Best Practice for Linking Universes in XIR2 and XI3.1
    Symptom
    What are the Best Practices for Linking Universes? I am trying to solve this formatting issue on the forum...
    Environment
    BusinessObjects Enterprise XIR2, XIR3.1
    Cause
    Linking Universes:
    Within a universe it is possible to dynamically link to another universe.  
    When you link two universes, the primary active universe that is open has the role of derived universe and the universe that will be attached to it is referred to as the core universe.  
    Changes that are made in the attached core universe are automatically propagated to the derived universes.  
    The core universe can only be edited at its source and not in the derived universe.
    Why Link?
    If you have a number of universes and each contains the same set of objects it enables the reuse of objects.  
    Or you can opt for using the Include to copy all classes/objects and structure to a new universe.  (Include becomes part of the new universe and is not dynamic)
    Advantages of Linking:
    Structure is created once and reused
    Class and objects created once and reused
    Maintenance on CORE only
    Derived universes automatically updated
    Disadvantages of Linking:
    Only applicable to exported universes. (Not able to hide core universe in CMS)
    Contexts must be recreated
    Lovu2019s must be recreated
    Connection must be to the same data source
    One level of linking allowed
    Why Include?
    Advantages of Including:
    Quick method of copying one universe into another
    Maintain one universe rather than a number of smaller ones
    Disadvantages of Including:
    Only applicable to exported universes
    Contexts must be recreated
    No dynamic change if core universe is updated
    Linking Requirements:
    The core universe and derived universe use the same connection, data account, or Database and the same RDBMS.
    Using the same connection for both the core and the derived universe makes managing the universes easier, but this can be changed at any time.
    The core and derived universes must be in the same repository and the same domain.
    The core universe and derived universe use the same data account, or database, and the same RDBMS. Using the same connection for both the core and the derived universe.
    The core universe was exported and re-imported at least once. The derived universe does not need to have been exported before creating a link.
    Exported derived universes are located in the same universe domain as the core universe.
    You are authorized to link the given universe.
    You cannot link to a universe that uses stored procedures.
    You can use only one level of linking. You cannot create derived universes from a universe which is itself derived.
    All classes and objects are unique in both the core universe and the derived universes. If not conflicts will occur.
    Once the links are created there is very limited ability to move classes and dimensions.
    The two universe structures must allow joins to be created between a table in one universe to a table in the other universe. If not, then Cartesian products can result when a query is run with objects from both structures.
    Only the table schema, classes and objects of the core universe are available in the derived universe. Contexts and Access Restrictions must be re-detected or re-added in the derived universe.
    Lists of values associated with a core universe are not saved when you export a derived universe with the core universe structures.
    When multiple links are added the order of the links will appear reversed in the Class/Object Panel.   For example, if universe A is first linked and then universe B the result will display in the class/objects panel as universe B then universe A.
    Note: When you link universes, you can relocate the core universe within the same repository with out breaking the link. This allows you to export the core universe to a different repository folder, while keeping the links with derived universes valid.
    The linking process must be completed by creating joins between the core tables and the derived universe tables.  Delete all current contexts and re-detect the contexts for the new structure.  
    Note: You can not edit any structure, class, or object from the linked universe (core universe), within the derived universe.
    Editing the Derived Universe:
    Create joins between the core and derived universe structures.  Creating joins ensures that Cartesian products are not returned for objects included in a query from both structures.
    Remove existing contexts.
    Detect aliases.
    Detect contexts.
    Hide or Create new objects as required.
    Note: For information on hiding a component, refer to the section showing or hiding classes, objects and conditions Universe Designer Guide on page 308.

Maybe you are looking for

  • How to remove the button "play" and "stop" in that flash animation?

    The animation is this one ... http://adf.ly/OTGyh Hello, I made a simple flash animation of a character talking ... The only problem is that this animation has the button "play" and "stop" and I do not want it ... I want so carry out the main charact

  • TIME_OUT in SAP when accessing external Oracle table thru native SQL

    Hi, I have a problem in one of my native SQL statement. It takes a long time accessing the table considering that the number of records to be retrieved is only small. Something happened on the Oracle system. But, stilll to be confirmed. Before, there

  • XP Mode integration Feature will no longer enable

    Everything has been running smoothly with XP Mode.  I run a number of legacy programs which require XP.  I fianlly figured out yesterday how to print to LPT1 from these programs and configured my printers accordingly.  I had too many browser windows

  • Adding a variable Watermark

    Hi, We have a  180pp PDF which we need to put a large overprinting tinted number across the middle of each page, i.e. 0001, we have to print 200 copies of this document and each printed copy needs to have a different number, 0001 to 00200, is there a

  • Account assignment group

    Hi, what is Account assignment category. what is it's purpose. what it controls and where are it's config settings. for instance account assignment category is a cost centre or a sales order. what it means and what it controls as far as a sales order