How to use setters and getters in another program by using bean

how to use the setters and getters methods using database connection by bean

Say again?And so he did:
http://forum.java.sun.com/thread.jspa?threadID=750645
kind regards,
Jos ;-)And again
http://forum.java.sun.com/thread.jspa?threadID=750643&tstart=0
No, that's his class mate I guess; it must be national getter and setter
day somewhere today ;-)
kind regards,
Jos

Similar Messages

  • Setters and Getters

    Can any one Explain  the setters and getters and different ways of writing?? How Can we use it much better??

    http://www.flashscript.biz/flashas3/AS3_tutorial/lesson9.html

  • Regarding Setters and Getters

    Hi All,
    1. How parametters we can send to a Setter ?
    2. What are the best practices of setters and getters?
    Thank you
    Siva

    You should read up on "ENCAPSULATION". Here is a good read for ya:
    http://www.inf.ufsc.br/poo/smalltalk/ibm/tutorial/oop.html
    Thanks.

  • Setters and getters in my beans - syncrhonize

    All,
    have a bunch of POJO's. Using hibernate. Should I syncronize my setters and getters?

    It depends if you would use the object concurrently or not. Even if you did use an instance concurrently, you would not need to synchronize on every getter and setter. I strongly suggest you learn the ins and outs of thread safety before arbitrarily locking your objects.

  • How to use bean in forms

    i create one form based on emp. then i create beanarea and set its "Implementation Class Property"
    to oracle.forms.demos.Calendar.
    i copied calendar.jar from D:\oracle\ds9i\forms90\demos\jars to this lacation
    D:\oracle\ds9i\forms90\java
    after i write D:\oracle\ds9i\forms90\java\calendar.jar
    in the below registry paths:
    forms90_classpath
    forms90_builder_classpath
    forms90_path
    but not working.i am new in oracle plz help. i want to know how to use bean in forms

    1. \forms\server\formsweb.cfg
    archive_jini=frmall_jinit.jar,FormsProperties.jar
    2. regedit
    HKEY_LOCAL_MACHINE => FORMS_BUILDER_CLASSPATH
    C:\DevSuiteHome_1\forms\java\frmbld.jar;C:\DevSuiteHome_1\jlib\importer.jar;
    C:\DevSuiteHome_1\jlib\debugger.jar;C:\DevSuiteHome_1\jlib\utj.jar;
    C:\DevSuiteHome_1\jlib\dfc.jar;C:\DevSuiteHome_1\jlib\help4.jar;
    C:\DevSuiteHome_1\jlib\oracle_ice.jar;C:\DevSuiteHome_1\jlib\jewt4.jar;
    C:\DevSuiteHome_1\jlib\ewt3.jar;C:\DevSuiteHome_1\jlib\share.jar;
    C:\DevSuiteHome_1\forms\java\frmwebutil.jar;C:\DevSuiteHome_1\forms\java\frmall.jar;
    C:\DevSuiteHome_1\forms\java\FormsProperties.jar;
    3. Untuk Jdev.. include..Libraries [THE WAY I AM CREATING A BEAN..NO NEED TO READ THIS]
    ORacle Forms
    C:\DevSuiteHome_1\jdev\lib\ext\frmjdev_pjc.jar

  • How can I install and run a Windows program on my MacBook Pro/?

    How can I install and run a Windows program on my MacBook Pro?

    You have several options.
    1, Use a Virtual Machine like Vmware, Parallels etc... to Create a Virtual Windows Installation and Run your program in there.  A Virtual MAchine will runn in a Window on your Desktop and share your Mac's resources RAM HD space processor. Your MAc desktop will still be available while you run Windows install.
    http://www.parallels.com/
    2. Install Windows on a partition using Bootcamp. It will run a full installation of Windows you can boot into, and run your programs.  The Mac desktop will not available until your reboot the computer and start in OSx instead of Windows.
    https://www.apple.com/support/bootcamp/
    3. Use Wine /  Winebottler to run the Application without the need for a complete Windows installation.
    http://winebottler.kronenberg.org/

  • How to use BEAN in an oracle forms at client side

    Hello,
    I am new in oracle forms.I am using
    OS-Windows 7.
    Forms [32 Bit] Version 11.1.2.1.0 (Production)
    weblogic 10.3.5
    Now I want know that how to use bean item in an oracle forms.
    Thank You.

    Hello,
    You copy the corresponding JAR file that contains the Java BEan in your <DEVSUITE_HOME>/forms/java folder, then you add its name to the archive tags of the forsweb.cfg file.
    This done, you add a Bean Area to your canvas, set its Implementation Class property with the full class name, then you can communicate with the bean via the GET_CUSTOM_PROPERTY() and SET_CUSTOM_PROPERTY() built-in.
    Google could also give you more information.
    Francois

  • How to use bean:write inside jsp:include ?

    I got a problem about JSP's syntax. The following is my code:
    <%@ include file="<bean:write name="HelloForm" property="target" />"%>
    The double quotes inside bean:write is my problem. Could you please teach me how to use bean:write within JSP's include? Thank you!

    http://java.sun.com/products/jsp/syntax/1.2/syntaxref12.html
    Include Directive vs <jsp:include>
    The include directive <%@include %> is done at page translation/compile time.
    It effectively pastes in a static file, and then compiles the JSP as if it was all one file.
    As such, you cannot provide a runtime expression to it.
    To do runtime inclusion, you need to use the <jsp:include> tag which does except runtime parameters.
    <%String test = request.getParameter("pageInfo");%>
    <%String link = test + ".jsp"; %>
    <jsp:include page="<%= link %>" %>Unfortunately you can't use the tag with a bean:write tag as well, you can only use runtime expressions, not tag. So you have to do the include with
    <jsp:include page="<%= HelloForm.getTarget() %>" />
    Cheers,
    evnafets

  • How to call an alv report from another program and return back

         Hello ,
    I am calling one abap program (Prgm B) from another program (Prgrm A).
    Here, Prgm B is an ALV report. I have fetch some data from Prgem B that gets stored in an internal table.
    Now, I am using below code in Prgrm A,
      SUBMIT Prgrm B VIA SELECTION-SCREEN
                          WITH SELECTION-TABLE rspar
                          EXPORTING LIST TO MEMORY
                          AND RETURN.
    When Prgrm A executed, it lead me to selection screen of Prgrm B and when I click F8, it shows me the report output, In short, it doesnt return back to Prgrm A. It ends up showing me the alv report if Prgrm B even afetr using RETURN statement.
    I want to get back to Prgrm A by fetching some data from Prgrm B.
    Please let me know, if i am missing something.
    Regards,
    Seema

    Hi Seema,
    Refer below code.
    DATA: v_matnr LIKE mara-matnr.
    DATA: t_listobject TYPE abaplist OCCURS 0 WITH HEADER LINE.
    DATA: t_mara TYPE mara OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF t_ascilist OCCURS 0,
             line(200).
    DATA: END OF t_ascilist.
    data var(3) type c.
    SELECT-OPTIONS: s_matnr FOR v_matnr.
    var = '  3'.
    START-OF-SELECTION.
       SUBMIT ztestaks1 WITH s_matnr IN s_matnr EXPORTING LIST TO MEMORY
       AND RETURN.
       CALL FUNCTION 'LIST_FROM_MEMORY'
            TABLES
                 listobject = t_listobject
            EXCEPTIONS
                 not_found  = 1
                 OTHERS     = 2.
       IF sy-subrc <> 0.
         MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
       ELSE.
         CALL FUNCTION 'LIST_TO_ASCI'
    *     EXPORTING
    *       LIST_INDEX               = -1
    *       WITH_LINE_BREAK          = ' '
           TABLES
             listasci                 = t_ascilist
             listobject               = t_listobject
           EXCEPTIONS
             empty_list               = 1
             list_index_invalid       = 2
             OTHERS                   = 3.
         IF sy-subrc <> 0.
           MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
         ELSE.
           WRITE:/ 'Below are the lines from the submitted program.'.
           LOOP AT t_ascilist.
             WRITE:/ t_ascilist-line.
           ENDLOOP.
           SKIP 2.
         ENDIF.
       ENDIF.
       IMPORT t_mara FROM MEMORY ID 'T_MARA'.
       WRITE:/
    'Here is the output from the table exported from the submitted program.'
       LOOP AT t_mara.
         WRITE:/ t_mara-matnr.
       ENDLOOP.
    Submitted program
    REPORT  ZTESTAKS1.
    DATA: v_matnr LIKE mara-matnr,
           v_maktx LIKE makt-maktx.
    DATA: t_mara TYPE mara OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF t_makt OCCURS 0,
             matnr LIKE makt-matnr.
    DATA: END OF t_makt.
    SELECT-OPTIONS: s_matnr FOR v_matnr,
                     s_maktx FOR v_maktx.
    START-OF-SELECTION.
       SELECT matnr INTO TABLE t_makt
                    FROM makt
                   WHERE matnr IN s_matnr
                     AND maktx IN s_maktx.
    if not t_makt[] is initial.
       SELECT * FROM mara
                INTO TABLE t_mara FOR ALL ENTRIES IN t_makt
               WHERE matnr = t_makt-matnr.
    endif.
       EXPORT t_mara TO MEMORY ID 'T_MARA'.
       WRITE:/ 'This list is from the submitted program'.
       SKIP 1.
       LOOP AT t_mara.
         WRITE:/ t_mara-mtart.
       ENDLOOP.
    Hopes this helps you.
    Thanks,
    Ashok.

  • How to use bean write in  struts html:text tag

    hi,
    i'm new to struts concepts.here i'm trying to write a value in html struts tag using <bean:write>
    my current tag is
    <html:text property="empname" value='<bean:write name="employee" property="empid">' />
    but it gives same tag in the text box.how i can solve this.

    what am I doing wrong?You will notice above that I mentioned
    YOU CAN'T USE CUSTOM TAGS AS ATTRIBUTES TO OTHER CUSTOM TAGS
    (was that loud enough for you to notice this time)?
    Try
    <html:text styleId="instruction" styleClass="text" size="50" name="instruction" property="value"/>
    //or
    <html:text styleId="instruction" styleClass="text" size="50" property="instruction" value="<%= instruction.getValue() %>"/>
    better alternative: populate your formbean with your action and just have:
    <html:text styleId="instruction" styleClass="text" size="50" property="instruction"/>
    If you set the "instruction" property of your formBean in the action, the value will be automagically reflected here.
    Cheers,
    evnafets

  • How to list schedualed and run-alone concurrent programs?

    Hello All,
    Can you, plz, guide me on list schedualed and run-alone concurrent programs in R12 instances?
    Regards,
    Tareq

    Can you, plz, guide me on list schedualed and run-alone concurrent programs in R12 instances?https://forums.oracle.com/forums/search.jspa?threadID=&q=Scheduled+AND+Concurrent+AND+Query&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Concurrent+AND+Requests+AND+Query&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Please search the forum before posting similar questions.
    Thanks,
    Hussein

  • Why use setters and getters?

    Hi.
    I've been wondering woudn't a function with return do the same thing as a get function with return?
    Ex:
    var age:Number = 16;
    function get Age() {
         return age;
    isn't the same as:
    function Age() {
         return age;
    Thanks.

    I respectfully disagree with the statements that it is a matter of nomenclature. Although there are a lot of cases when accessors (getters/setters) are overused, they are definitely extremely useful features of any OO language. In some case code would be much longer and more cumbersome without accessors. I must say that with code written on timeline accessors are less useful (although I can see plenty of cases one can utilize them). When code is written in classes - accessors are indispensable.
    With your age example it is really a matter of preference. But if you need to do more with age - you would definitely appreciate getters/setters.
    For example:
    Say you have a class Person and it has property age:
    public var age:int = 0;
    Somewhere we instantiate this class:
    var myPerson:Person = new Person();
    Now we set age:
    myPerson.age = 23;
    trace(myPerson.age); // returns 23
    Just imagine you instantiate this variable in 100 of places.
    When you think you are done, your boss comes to you and says: “I want you when they set the age also to evaluate what age group person belongs to.”
    If there were no getters/setters – you would have a very hard time chasing all 100 instances in your program and changing your Person class architecture. With accessors you will spend a few minutes only. You can do the following:
    // change the variable to private
    private var _age:int = 0;
    // create accessors
    public function set age(a:int):void{
         _age = a;
         // here you evaluate age
         if (_age < 10) {
              trace("child");
         else if (_age > 10 && _age < 20) {
              trace("teenager");
         else if (_age > 20 && _age < 30) {
              trace("young");
         else {
              trace("too old to bare :-(");
    public function get age():int{
         return _age;
    As you can see you changed the code in one place and while not doing a thing in any of 100 places you instantiated the Person class.
    Again, your boss can come back and ask to restrict the age to people older than 20.
    So may write:
    public function set age(a:int):void {
         if (a > 20) {
              _age = a;
    Again, you met requirements and did not change any code anywhere else.
    One more request from the boss. Say, he wants you to count how many times age was changed. You can use setter to do that:
    private var getterCounter:int = 0;
    public function get age():int {
         getterCounter++;
         return _age;
    You wouldn’t be able to do all these things if there were not accessors.
    Still the use of age variable will stay the same:
    var myPerson:Person = new Person();
    myPerson.age = 34;
    trace(myPerson.age);
    Welcome to scalability and encapsulation. It doesn’t matter what you do when age is set inside Person class – it will not break code anywhere else.
    There are millions more useful cases when getters/setters come handy.

  • How to Clear Iphoto and Rebuild from another file, not Iphoto Library?

    I have over 7000 images. Some of the Iphoto thumbnails are from my desktop file and some from the DATA file copied into Iphoto. I want to rebuild my thumbnails using all of the pictures on my desk top, not copying them/duplicating into Iphoto. The reason I want to rebuild Iphoto is years ago while copying and moving pictures on another PC the picture data was deleted and the date data of the pics was lost. If I load the images, Iphoto mixes the images up. I have organized all the pics on my desktop into folders by month and year. When I tried to rebuild, old photos show up again so I deleted the original Data (photos) in Iphoto and after rebuilding they reappeared with many images just black boxes. I was expecting a blank page so I could start to build the thumbnails from my desktop folders.
    How do I get a blank screen/no images in Iphoto? Select all the images and drag to trash? To be safe I have all my pictures saved on 2 ext hard drives. Also can a select a group (i.e. by month) and change all the date info at one time?
    If you can help...THANKS

    BgMc
    It’s difficult to advise you because you’re using non-standard terms. I’m worried that if I misunderstood something that I might give you a bum steer.
    Some general principles: Don’t “clear iPhoto”. Instead make a new Library: Hold down the option (or alt) key key and launch iPhoto. From the resulting menu select 'Create Library'.
    When you have this new Library working you can delete the old one.
    In general, if you have a Folder of images and you drag them to the Source (or left-hand) Pane in iPhoto the pics will be imported and a new Album and Roll will be created. This may help.
    Some of the Iphoto thumbnails are from my desktop file and some from the DATA file copied into Iphoto.
    I have no idea why you would want thumbnails. Surely you want the full sized files? What’s a desktop file? Do you mean Desktop Folder?, also what’s a DATA file?
    I want to rebuild my thumbnails using all of the pictures on my desk top, not copying them/duplicating into Iphoto.
    This makes no sense to me. Why are you rebuilding thumbnails? And if you don’t want to use iPhoto then why are you posting here?
    so I deleted the original Data (photos) in Iphoto and after rebuilding they reappeared with many images just black boxes
    Here’s a really good general principle:
    Don't change anything in the iPhoto Library Folder via the Finder or any other application. iPhoto depends on the structure as well as the contents of this folder. Moving things, renaming things or otherwise making changes will prevent iPhoto from working and could even cause you to damage or lose your photos.
    Regards
    TD

  • Bean - setters and getters naming conventions

    Hi,
    Just like the constructor is named after the class,
    why shouldn't the setters & getters be named after the
    properties?
    This would make the reflection code clearer.
    Wouldn't it?

    Maybe he means that they should be called:
    void variableName(int value); // setter
    int variableName();  // getter
    Ouch, that was really ugly :)If thats true, our friend is a Delphi programmer :)
    Next we could drop the parenthesis in no arg methods
    v = variableName;
    ahhhh, so much more obfuscating.

  • How to use beans in more than one page

    hello members,
    can somebody tell me how to make beans availabe to more than one page ,i used scope variable as "application"
    in which i set the value of java bean and in that page it show all values of that bean even it modified
    but when redirect to another jsp page it does not show modifided value,it shows its default value
    what shld i use tell me
    following thing that i use in forwarded jsp page
    <jsp:useBean="same id in previous jsp page", class="same class", scope="application"/>
    and then i am using boolean variable which set false default ,but i set it manually though
    setfuction (assume) in original jsp page,but in redirected page it showing it value fasle
    i don't know why
    can somebody (Bean Bond) help me in this problem
    i will very thankfull to you
    plz..................

    My dear friend,
    your scope is wrong. Since you run a JSP page and you want it available everywhere, the only thing that all pages have common is session. So changing your bean scope to session will keep the bean variables and the rest you have on it.
    Try it and let me know.

Maybe you are looking for

  • Replace E1- Adapter with Business Services

    Hello, We are using E1-adapter to communicate with web Methods ( like calling business function, table IO etc..), now we are planning to replace E1- adapter with Business Services. We are using tools 8.98.11 and Application Release E812. Question is

  • Mail adapter = XI = CRM (using Proxy)

    Hi All, I have to pull several mailboxes using a sender mail adapter. The mails are automatically generated, containing: mailfrom, mailto, subject, body and 1 attachment. I need to save the data (mailfrom,mailto,subject,body,filename) into a table in

  • Update all rows in a table which has 8-10 million rows take for ever

    Hi All, Greetings! I have to update 8million rows on a table. Basically have to reset the batch_id with the current batch number. it contains 8-10 million rows and i have tried with bulk update and then also it takes long time. below is the table str

  • Saving Images to disk

    I'm going to be making some graph Images, and I'm curious about saving them to disk. I've considered using Quicktime for Java, because quicktime supports so many image types and I need this versatility. The main problem is that, either way, I don't k

  • I deleted Muse by mistake

    I was going to fast, and deleted Muse from my computer. I have paid for the subscription, and when i open CC program manager, it tells me my Muse is up to date, but I can't re-download it? any suggestions, I know this may not be a Adobe problem but c