Question Events

Hi All,
Can anyone please tell me the process that happens behind the following code.
*& Report  ZMY_TEST_PROGRAM
REPORT  ZMY_TEST_PROGRAM.
TABLES : KNA1,
         MARA.
SELECTION-SCREEN :BEGIN OF BLOCK SC1 WITH FRAME TITLE TEXT-001.
PARAMETERS : RD1 RADIOBUTTON GROUP RD1 DEFAULT 'X' USER-COMMAND ONLI,
             RD2 RADIOBUTTON GROUP RD1.
SELECTION-SCREEN END OF BLOCK SC1.
data : itab type standard table of mara initial size 10 with header line.
write 'i am fine'.
start-of-selection.
select * from mara into table itab where matnr = '0000001000'.
loop at itab.
write :/ itab-matnr.
endloop.
top-of-page.
write 'this is the header'.
start-of-selection.
select * from mara into table itab where matnr = '0000001001'.
loop at itab.
write :/ itab-matnr.
endloop.
In the above code the write statement "i am fine" falls under which event.
TOP-OF-PAGE is the output event.so how is the control going back to the Start-of-selection once it encounters the write statement.ie.if a write statement is encountered control goes to TOP_OF-PAGE.so how is it able to go back to Start-of-selection
Also how is the ABAP processor able to process both the Start-of-selection events.
i am able to get the output of all the write statements.
so can anyone tell me how the ABAP processor does that work internally.

Hi,
flow of events
load of program
INITIALIZATION. Before the selection screen is displayed.
AT SELECTION-SCREEN OUTPUT. Before painting the screen.
AT SELECTION-SCREEN. Used for validations..
START-OF-SELECTION. When pressed execute button in the selection-screen. If no selection-screen then executes automatically
END-OF-SELECTION. Generally used in the logical database. But in normal reporting triggers after start-of-selection. and is the last event triggered before displaying the report.
AT USER-COMMAND. when user presses button in the list. then this event is triggered
AT LINE-SELECTION. when double clicked on the list.
TOP-OF-PAGE. when first write statement is triggered in the program.
END-OF-PAGE. triggered at the end of the page..
In whatever order u give events flow in the above order  processor checks and processes them accordingly
write statement "i am fine" falls under start-of-selection event.
a start-of-selection event is automatically inserted before write statement
Regards

Similar Messages

  • Two questions: Event on a Date Picker and Read Only on a full page?

    Hello,
    I make use of this very informative board to develop an application but i have been unable to find info on these two topics. Sorry if it has been already discussed extensively.
    Using HTMLDB 2.2 for now.
    =>First question:
    I have a date picker item with an event
    onChange="resaStatusChange();"
    in the HTML Form Element Attribute field.
    The event is triggerring if i put a new data in the field but does not trigger if i use the picker.
    Is it a standart behaviour? Is there a way to trigger the event when new data is provided through the date picker?
    => Second question:
    One page in my application has to be used either to only display information or as a mixed displaying/entering data sheet.
    When the context is appropriate to use the page as a simple display (testing both global authorization and data to be displayed), is there a way to put a read only attribute on the full page instead of putting the read only conditions through each and every item of the page?
    Sorry if the questions are not clear and apologize for what should be newbie questions.
    Any link or info will be appreciated.
    Regards,
    Daniel Gureghian

    Hi Daniel,
    I'm not sure about your first question, but I can hopefully give you a helpfull answer for your second one.
    I'm handling it this way:
    var elInput = document.getElementsByTagName('input');
    var elTextArea = document.getElementsByTagName('textarea');
    var elSelect = document.getElementsByTagName('select');
    for (i = 0; i < elInput.length; i++)
      setReadOnly(elInput, true);
    for (i = 0; i < elTextArea.length; i++)
    setReadOnly(elTextArea[i], true);
    for (i = 0; i < elSelect.length; i++)
    setReadOnly(elSelect[i], true);
    function setReadOnly(pThis, pRead)
         if (pThis && pRead)
              pThis.disabled = pRead;
              pThis.style.emptyCells = "show";
              pThis.style.color = "black";
              pThis.style.backgroundColor = "#DDDDDD";
         else if (pThis && !pRead)
              pThis.disabled = pRead;
              pThis.style.emptyCells = "show";
              pThis.style.color = "black";
              pThis.style.backgroundColor = "#FFFFFF";
    I never used it on a whole page, only for regions. So maybe you have to make some changes.
    chrissy

  • XCode Question: Events on release builds only

    There are some scripts or copy files things I want to do, but I only want them to run on a release build.
    I have seen the "on installing" switches, but I can't figure out how to turn installing on. If I check those boxes, the scripts and copy files never trigger.

    Hi, I think maybe you wanted the Flash forum instead of the Flash Player forum. The Flash forum would be able to help you with what you are working with.
    eidnolb

  • Event and........s sub-event?

    Hi,
    i'm swith definitly to iPhoto to organize all my image images shot in this last 5 yeasr....
    now i have about 10k photos...
    Now a very easy question:
    Events is a very good feature and now i can organize my photo exactly how i want...by event/day !!!
    But i don't know how to organize event split on more days.....
    My last vacation in Palma di Majorca give me about 450photos split on 10days....
    with a digital camera is very easy shot much...
    How organize this evenbts?
    More events or a single big events?
    Is there a way to create events inside an events?
    Thanks
    Marco

    Marco
    Events are very limited. The are based only on time and date. You cannot have sub-events.
    For that use Folders and Albums.
    File -> New Folder Call it Palma
    New Album: Day one. Put the pics from Day one into the Album, then put that Album into the Folder.
    You can also make Smart Albums based on date.
    Also, click on the Magnifying Glass icon in the Search Window. Select Date: this way you can find any pic taken on a specific day, month or year.
    Regards
    TD

  • Claims authentication: "Server was unable to process request. --- Index was outside the bounds of the array"

    Hi there,
    I recently got a peculiar error when users tried to log-in into a SP 2010 portal using claims based authentication.
    The following error is logged in the event viewer of the SP server in question:
    Event ID 8306 - Claims authentication
    An exception occurred when trying to issue security token: Server was unable to process request. ---> Index was outside the bounds of the array.
    I also found an IIS warning entry with a similar message:
    Event ID 1309 - Web Event
    Exception type: FaultException
    Exception message: Server was unable to process request. ---> Index was outside the bounds of the array.
    I simply could not find an answer to why this happened, but an iisreset seemed to have fixed the issue. I was wondering if anyone here would know a possible root cause for this issue?
    Thanks in advance for your help.
    Regards,
    P.

    Hi,
    Thanks for posting your issue, Kindly browse below mentioned URLs to fix this issue
    http://underthehood.ironworks.com/2011/05/sharepoint-2010-an-exception-occurred-when-trying-to-issue-security-token-the-server-was-unable-to-p-1.html
    http://nearbaseline.com/blog/2011/01/claims-exception-occurred-issuing-a-security-token/
    I hope this is helpful to you, mark it as Helpful.
    If this works, Please mark it as Answered.
    Regards,
    Dharmendra Singh (MCPD-EA | MCTS)
    Blog : http://sharepoint-community.net/profile/DharmendraSingh

  • ISE with dot1x and Posture deployment in pararrel with certain users

    Hi,
    We want to deploy ISE in sequencial order, meaning that I will initially have all users authenticate/authorized with dot1x/MAB etc, then only on certain locations or users to have posture condition validation/verification while others not.
    Can someone please advise whether this approach is possible, as far I understand, once you have posture policies in place as authorization rule it will hit all the users. This may be possible where you can match the switch or the location as a seperate condition, but if all users are spread/mixed we just need to find a simple way how to do it or whether it is not possible..?

    We have modified the attached policy on rule 04 and 05 (from top) and add a new condition Device locationEqual "Switch1".According to this rule any user connected to Switch1 only do the posture and same user PCconnect any other switch (other than switch1), it should do only the dot1x/MAB (rule 1-3). But in our case user PC connect any other switch than switch1, it hit the ISE default policy(not included in this attachement) and also it pop-ups the NAC agent and do the posturing. Questions-why the PC/user is not hitting rule 1-3 and goes to default rule-why the PC/user is doing posture where there's no posture rule hitting.
    Hi,
    First of all, I would assume you configured the PC for machine or user authentication.
    So, when a user connects to the network using other switch but not switch1, it will get 2 hits:
    1. Computer authentication - this PC is part of Domain Computers
    2. Default rule - because you configured (domain) user authentication for dot1x requests that are received only from switch1!
    You haven't specified a rule for domain users alone (with no location condition) and with no posture.
    You have to add something like this:
    1. dot1x + Domain PC
    2. dot1x + Domain User + location + preposture
    3. dot1x + Domain User + location + posture compliant
    4. dot1x + Domain User (and no posture condition)
    To answer your second question, event though you 've excepted a certain user from posture, if NAC Agent is installed, it will popup and it will say that you're compliant, so practically it isn't doing posture
    (http://www.cisco.com/en/US/docs/security/ise/1.1/user_guide/ise_pos_pol.html)
    Generating a Posture Requirement The run-time services requests for the posture requirement for the  endpoint by looking up at the role to which the user belongs to and the  operating system on the client. If you do not have a policy associated  with the role, then the run-time services communicate to the NAC Agent  with an empty requirement. If you have a policy associated with the  role, then the run-time services run through the posture policies  through one or more requirements associated with the policies and for  each requirement through one or more conditions.
    If you want to rollout for posture, you could use exception rules (check the top section of authorization rules) or you could do only posture audit for your rules so that everyone can get network access event though they're not compliant.

  • Agilent X-Series Status Byte Register Subsystem VIs

    Hello!
    I am looking to see if there exists LV code to identify the status of the STATus:QUEStionable event register of the Agilent X-Series Status Byte Register Subsystem? I'm not exactly sure if I can simply query the instrumentation with the SCPI command "STAT:QUES:REF?"using a VISA Write followed by a Read. This being new to me, I think you must configure specific bits of the register (i.e., enable a particular bit[s], using the event enable register) before you can proceed with the query? At any rate, it's a proper sequencing set of commands which is required, just like mostly everything I presume
    Thank you in advance for your efforts!
    Sincerely,
    dan 

    send *esr?  to return the event register and *ese? to determine which events are enabled
    "Using a VISA Write followed by a Read?: "  --Yes this is the correct approach
    The Programmer's guide pg 32 Shows the STATus: subsytem commands to enable the event registers
    Jeff

  • Need Calc Script Desperately!

    I have no idea how to create these and have spent too much time searching online.  I need a calculation script for Text Field 33 x 50%...

    Place this code as the custom calculation script of the field in question:
    event.value = this.getField("Text Field 33").value * 0.5;

  • I have a question about the calendar on the ipad2. I have multiple calendars in different colors. Some of the events are filled in with color. Others are just listed with a colored dot in front of the event. Any ideas why events ar showing up differently?

    I have an ipad2 and my question is about the calendar. I set up multiple calendars with different colors. Some of the events show up in filled color. Others only show with a colored dot in front of the event. I can't figure out why some show up one way and others show up differently? Any thoughts?

    On mine the ones that show on a coloured background are all-day events, the ones with dots and just timed events.

  • Questions about BT Home Hub 4A event log - WIFI c...

    Hope someone can help please ?
    I had BT inifinity installed 2 weeks ago with the HH 4 (type A) and everything has worked - connection found, no problem.
    This week, my ipod touch was unable to join the network but the iphone 5, another ipod and a tablet could connect without a problem. The ipod touch managed to connect to another WIFI used at the property and my work wifi without a problem.
    I thought it maybe the ipod touch as it was quite old but that doesn't make sense since it connects fine to other networks.  I restored network settings and other options suggested by Apple but to no avail.
    I have turned my attention to the Hub. My laptop (older than the ipod touch) gets the connection no problem along with the other devices.  I went into the hub management page but I am not smart enough to decifer the event log so would like some help so I can fix this because I thought BT infinity was the better more reliable option?
    The ipod touch Wifi IP address is 00:25:00:b7:35:f6.
    On the event log, it shows STA before the address - but it shows STA before all the device IP addresses. Should I change this to DCHP ? or is this (Static ? alright)
    The Lease on all the devices on the event log is set to 1440 min. (1 day) is that alright too, what does it mean ?
    Do I have to keep renewing the lease ? How do I do that ? I read it can be set to 21 days ?
    Going back to the IP address on the ipod it shows the Hostname as 00:25:00:B7:35:f6-2 this is different to the IP address with the -2. Could that be a cause of the unable to join network or is it because I attempted to recreate the network on the ipod so its the second version of that host name ?
    Is there any setting I can change to fix this because I am concerned the same this will happen to the other devices and then the laptop....
    What do I need to do to be able to get my ipod touch to connect to the BT network setting ?
    I think its the hub 4A causing the 'block' on the ipod touch not the device and I think its maybe a matter of changing a setting - but then why was it all fine before when Infinity was first installed ?
    Lastly my laptop (7 Years old) seems to be attached to the 5GHZ Wireless channel - is that alright ? The other more recent devices are on the 2.4ghz channel (except the ipod touch which isn't on any !!)
    Is it alright to turn the hub on / off ? -I am resisting that because I don't want to make the situation worse. 
    Sorry but what does client disassociated mean and all the BLOCKS - do they relate to firewall ?
    Please can you review the event log and my questions ?
    Many thanks
    angie 2601 
    The time frame is 3.55am 8/8/2013 - 7.16 am 8/8/2013
    (Latest (7.16am) at the top
    Message
    07:16:39, 08AUG
    (1224785.050000) Admin login successful by 192.168.1.64 on HTTP (1224766.610000) Admin login FAILED by 192.168.1.64 on HTTP (1224648.050000) New GUIsession  from IP 192.168.1.64
    (1224466.770000) Device disconnected: Hostname: Unknown-d8:dl:cb:ec:a6:fe
    IP: 192.168.1.65 MAC: d8:d1:cb:ec:a6:fe
    wlan1: STA d8:d1:cb:ec:a6:fe IEEE 802.11: Client  disassociated
    (1224362.750000) lease for IP 192.168.1.65 renewed by host Unknown­ d8:d1:cb:ec:a6:fe (MAC d8:d1:cb:ec:a6:fe).lease duration:1440 min (1224362.750000) Device connected: Hostname:Unknown-d8:d1:cb:ec:a6:feiP:
    192.168.1.65 MAC:d8:dl:cb:ec:a6:fe lease time: 1440 min. link rate:90.0 Mbps
    (1224362.690000) Lease requested
    wlan1: STA d8:d1:cb:ec:a6:fe IEEE 802.11:Client associated
    (1224241.150000) lease for IP 192.168.1.64 renewed by host FAMILY (MAC
    00:13:02:de:6d:e6). Lease duration:1440 min
    (1224241.150000) Device connected: Hostname: FAMii.Y IP:192.168.1.64 MAC:
    00:13:02:de:6d:e6 Lease time: 1440 min. link rate: 54.0 Mbps
    (1224241.090Cl00) Lease requested
    wlan1TA  00:13:02:de:6d:e6 IEEE 802.11:Client associated
    OUT: BLOCK [9] Packet invalid in connection (TCP
    192.168.1.66:34905->31.13.72.38:443 on ppp1)
    (1223644.770000) Device disconnected: Hostname: Unknown-d8:dl:cb:ec:a6:fe
    IP: 192.168.1.65 MAC: d8:d1:cb:ec:a6:fe
    wlanl: STA d8:d1:cb:ec:a6:-fe IEEE 802.11:CHent diSassociated
    (1223489.390000) Lease for IP 192.168.1.65 renewed by host Unknown­ d8:d1:cb:ec:a6:fe (MAC d8:d1:cb:ec:a6:fe).lease duration:1440 min (1223489.380000) Device connected:Hostname:Unknown-d8:dl:cb:ec:a6:fe IP:
    192.168.1.65 MAC: d kd1:cb ec:-a6-:fe Lease time: 1440 min. Link  rare: 90.0 Mbps
    (1223489.330000) Lease requested
    wlan1: STA d8:d1:cb:ec:a6:fe IEEE 802.11: Client  associated wlan1TA d8:d1:cb:ec:a6:fe IEEE 802.11: Client disasSociated
    wlan1TA d8:d1:cb:ec:a6:fe IEEE 802.11:Client associated
    OUT;BLOCK [9] Packet i valid in connection (TCP
    192.168.1.66:34375->31.13.72.38:443 on pppl)
    l'N':BLOCK [16-} Remote administration {ICMP type 8 code 0
    117.1.42.94->86.182.228.205 on ppp1)
    IN: BLOCK [9] Packet invalid in connection (TCP
    31.13.72.33:443->86.182.228.205:44156 on ppp1) IN: BLOCK [9] Packet invalid in connection (TCP
    31.13.72.33:443->86.182.228.205:36615 on ppp1)
    OUT: BLOCK [9] Packet invalid  in connection (TCP
    192.1-68.1.68:49476->173.252.103.16:443 OR ppp1)
    BLOCKED 5 more  packets (because of Packet invalid in connection) OUT: BLOCK [9] Packet invalid  in connection (TCP
    192.168.1.68:49443->95.100.195.205:443 on ppp1)
    OUT:BLOCK {9] PaCket invalid in connection (TCP
    192.168.1.68:49438->95.100.194.217:443 on ppp1)
    IN:BLOCK [9] Packet invalid in connection (TCP
    95.100.194.217:443->86.182.228.205:49444 on ppp1)
    (1222111.810000) Lease for IP 192.168.1.68 renewed by host Unknown-
    70:56:81:46:bf:d9 (MAC 70:56:81:46:bf:d9).Lease duration:1440 min
    (1222111.810000) Device connected:Hostname:Unknown-70:56:81:46:bf:d9 IP:,
    192.168.1.68 MAC:70:56:8:t:46:bf:d9lease time:1440 min. Link rate:52.0 Mbps
    (1222111.750000) Lease requested  .-
    wlanO: STA 70:56:81:46:bf:d9 IEEE 802.11: Client  associated • (1222093.690000) Device dlsconn: Hostname:Unknown-
    00:25:00:b7:35:f6-2 IP: 192.168. MAC: 00:25:00:b7:35:f6 wlanoTA  00:25:00:b7:35:f6 IEEE 802.11:Client disassociated
    OUT:BLOCK [9] Packet invalid in connection (TCP
    192.168.1.66-:43272->31.13.72.33:443 on ppp1)
    221969.130000) lease for IP 192.168.1.67 renewed  by host Unknown-
    00:25:00:b7:35:f6-2 (MAC 00:25:00:b7:35:f6). lease duration:1440 min
    (1221969.130000} Devicconnected: Hostname·:Unknowwoo·:25:00:b7 35:f6-2
    IP: 192.168.1.67 MAC: 00:25:00:b7:35:f6 Lease time: 1440 min. Unk  rate: 54.0
    Mbps
    (1221969.070000) Lease requested
    wlanO: STA 00:25:00:b7:35:f6 IEEE 802.11:Client associated
    (1220365.290000) Device disconnected: Hostname:Unknown-
    00:25:00:b7:35:f6-2 IP: 192.168.1.67 MAC: 00:25:00:b7:35:f6 wlanOTA 00:25:00:b7:35:f6 IEEE 802.11:Client disassociated
    (1220348.230000) Lease for IP 192.168.1.67 renewed by host Unlmown-
    00:25:00:b7:35:f6-2 (MAC 00:25:00:b7:35:f6).lease duration: 1440 min
    (1220348.230000) Device connected: Hostname:Unknown-00:25:00:b7:35:f6-2
    IP: 192.168.1.67 MAC: 00:25:00:b7:35:f6 Lease time: 1440 min. Unk rate: 54.0
    Mbps
    (1220348.170000) lease requested
    wlanOTA 00:25:00:b7:35:f6 IEEE 802.11:Client associated
    IN: BLOCK f16] Remote administration (TCP
    123.151.42.61:12233->86.182.228.205:8080 on ppp1) OUT: BLOCK [9] Packet invalid  in connection (TCP
    :t92.Hi8.1.66:53813->31.13.72.33:443 on ppp1)
    OUT:BLOCK [9] Packet invalid in connection (TCP
    192.168.1.66:43989->31.13.72.33:443 on ppp1)
    IN: BLOCK [16] Remote administration (ICMP type 8 rode 0
    2.7.251.109.227->86.182.228.205 on pppl)
    (1216770.650000) Device disconnected:Hostname:Unknown-
    00:25:00:b7:35:f6-2 IP: 192.168.1.67 MAC: 00:25:00:b7:35:f6
    OUT:BLOCK [9j Packet invalid in connection (TCF
    192.168.1.67:49180->74.125.136.109:993 on ppp1)
    wlanOTA 00:25:00:b7:35:f6 IEEE 802.11:Client disassociated
    (1216753.280000) Lease for IP 192.168.1.67 renewed  by host Unknown-
    00:25:00:b7:35:f6-2 (MAC 00:25:00:b7:35:f6). lease duration:1440 min
    (1216753.270000) Device connected: Hostname: Unknown-00:25:00:b7:35:f6-2
    IP: 192.168.1.67 MAC: 00:25.:00-:.b7.:35:f6 Lease time: 1440 min. Unk  rate: 54.0
    Mbps
    (1216753.220000) lease requested
    wlanO: STA 00:25:00:b7:35:f6 IEEE 802.11:Client assodat
    OUT: BLOCK [9] Packet invalid in connection (TCP
    192.168.1.66:55944->23.21.78.229:443 on ppp1)
    OUT: BLOCK [9J  Packet invafid in connection (TCP
    192.168.1.66:34794->31.13.72.33:443 on ppp1)
    OUT:BLOCK [9] Packet invalid in connection (TCP
    192.168.1.66:41441->31.13.72.33:443 on ppp1)
    {1213176.020000) Device disconnected:.Hostname:Unknown-
    00:25:00:b7:35:f6-2 IP: 192.168.1.67 MAC:00:25:00:b7:35:f6 wlanO: STA 00:25:00:b7:35:f6 IEEE 802.11: Client disassociated
    (1213158.410000) Lease for IP 192.168.1.67 renewed  by host Unknown-
    00:25:00:b7:35:f6-2 (MAC 00:25:00:b7:35:f6). lease duration:1440 min                           _./:\ (1213158.400000) Device connected:Hostname:Unknown-00:25:00:b7:35:ftt.Y IP: 192.168.1.67 MAC: 00:25:00:b7:35:f6 Lease time: 1440 min.Unk rate: 54.0
    Mbps
    (1213158.340000) Lease requested
    wlanO: STA 00:25:00:b7:35:f6 IEEE 802.11: Client associated
    OUT:BLOCK (9] Packet invalid in connection (TCP
    192.168.1.66:59767->176.34.180.243:443 on ppp1) OUT;BLOCK [9] P.acket invalid in connection {TCP
    192.168.1.66:56075->31.13.72.33:443 on ppp1) OUT: BLOCK [9] Packet invalid  in connection (TCP
    192.168.1.66 581:1:0->31.13.72.33:443 on ppp1)
    BL.OCKED 2 more packets (because of Packet invalid in connection) OUT:BLOCK [9] Packet invalid in connection (TCP
    192.168.1.66:56251->31.13.72.33:443 on ppp1)
    OUT:BLOCK [9] Packet invalid in connection (TCP
    192.168.1.66:36959->31.13.72.33:443 on ppp1)
    BlOCKED 1more packets (because of Packet invalid in connection)

    It could be that the Ipod touch is having problems with both the 2.4GHz and 5GHz frequencies being named the same. If you give them separate SSids it may help. ie add a 5 to the 5GHz SSid.
    If you do this you will need to re-connect all your devices that can see both frequencies to both SSids so that they will swap between the frequencies seamlessly when ever they need to
    See link how to change SSid.
    http://bt.custhelp.com/app/answers/detail/a_id/445​04/related/1/session/L2F2LzEvdGltZS8xMzc1OTY2ODIxL​...
    Once you have changed the SSid I would delete the network connection on the Ipod touch and start again.

  • MDM iView resultset problem and question about eventing

    Hi experts,
    I created a MDM iView resultset for my main table as search table (comparison is not supported). When I click on preview I get an empty table ("Found <Tablename>: 0 of 10", table contains 10 entries at the moment). I tried the same with a subtable and everything works fine (all entries have been in the preview table). Any ideas why I don't get a result?
    My 2nd question: can I choose the parameter name in eventing (EPCF) on my own? So if I have Vendor_Id as field can I use vendorid as parameter name? Do I have to define anything in the listener iView (e.g. in detail iView for an event from resultset iView)? Maybe you have a useful tutorial link (please not SAP help section)?
    Thanks for your answers.
    Regards, bd

    It is possible to retrieve the number of rows from a resultset --
    Statement stmt= con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
                                        ResultSet.CONCUR_READONLY);
    ResultSet rs= stmt.executeQuery("<your select query here>");
    int totalRows;
    if (rs.last()) // can it move to the last row?
       totalRows= rs.getRow(); // get its row number
    else
       totalRows= 0; // no rows in the resultset
    rs.first() // set the cursor back to the startNote that the resultset has to be scrollable (TYPE_SCROLL_INSENSITIVE).
    kind regards,
    Jos

  • Questions on events in a multi-class GUI

    I have a GUI application that is constructed as follows:
    1. Main Class - Actually creates the JFrame, contains main method, etc.
    2. MenuBar Class - Constructor creates a new JMenuBar structure and populates it with various JMenus and JMenuItems. A new instance of this class is instantiated in the Main Class to be used in the setMenuBar() method.
    3. ContentPane Class - Constructor creates a vertical JSplitPane. A new instance of this class is instantiated in the Main Class to be used in the setContentPane() method.
    4. BottomPane Class - Constructor creates a JPanel and populates it with various stuff. A new instance of this class is instantiated in the Content Pane Class to be used as the bottom pane in the vertical JSplitPane.
    5. TopPane Class - Constructor creates a horizontal JSplitPane and populates the left pane with a JScrollPane containing a JList. A new instance of this class is instantiated in the Content Pane Class to be used as the top pane in the vertical JSplitPane.
    6. TabbedPane Class - Constructor creates a JTabbedPane. A new instance of this class is instantiated in the Top Pane Class to be used as the right pane in the horizontal JSplitPane.
    7. DisplayPane Class - Constructor creates a JPanel. A new instance of this class is instantiated in the Tabbed Pane Class as the first tab. The user has the ability to click at points in this pane and a dialog box will pop up prompting the user for a string. Once the user enters something and clicks "OK", an instance of a custom Java2D component that I've created will be added to the DisplayPane where the user had clicked, with the string the user inputted being used as its name. The user can then drag the component around, enter a key combination to display all the names, etc.
    8. Custom Java2D Component Class - Constructor creates my custom Java2D component. Instances of this are added to the Display Pane Class, as I have described.
    Now, originally, I was going to ask "How do you work with events between these multiple classes?" but I have solved half of that problem myself with the following class:
    9. Listener Class - A new instance of this class is declared in the constructor of the Main Class, and is thus passed down through the GUI hierachy via the constructors of the various classes. I then use the addActionListener() method on various components in the other classes, and then the Listener Class can capture an event using the getActionCommand() method to figure out what fired the event.
    So that covers the "How do I capture events in multiple classes?" question. Now I'm left with "How do I affect changes on those classes based on events?"
    For example: In my MenuBar class, I have a "Save" menu item. When this is clicked, I want to declare a new JFileChooser and then use the showSaveDialog() method, which throws up a dialog for saving a file. The problem is, the showSaveDialog() method takes a Component which is the parent frame. Obviously the Listener Class is not a frame. I want to use the Main Class as the parent frame. How would I do this sort of thing?
    Another example: In my MenuBar class, I have a "New" menu item. For now, I want this to invoke a method in the DisplayPane Class that erases all of my custom Java2D components that have been made, thus giving the user a clean slate. How would I give my Listener Class access to that method?
    A final example: Every time the user adds one of my custom Java2D components, I want that component's name to be added to the JList that is in my TopPane class. Vice versa with deleting a component: its name should be removed from the JList. How would I listen for new components being added? (A change listener on the pane? One on the ArrayList<> that contains all of the components? Something else?) And, of course, how would I give the Listener Class the ability to change the contents of the JList?
    One idea I've come up with so far is to instantiate a new instance of each of my GUI classes in the Listener class, but that doesn't really make much sense. Wouldn't those be new instances that are totally separate from the instances the rest of my program is using? Another thought is to make the Listener Class an internal class inside the Main Class so that it can use the accessor methods of the GUI classes, but a.) I would like to avoid stuffing everything in one class and b.) this brings up the question of "How would I get an accessor method that is in a class that is two or three deep in the hierarchy?" (.getSomething().getSomethingInsideThat().getSomethingInsideTheInsideThing()?)
    Help with answering any or all of my questions would be much appreciated.

    Hrm. At the moment, for my first attempt, I'm doing something similar, it just strikes me as quite unwieldy.
    Start of Listener class, with method for setting what it listens to. (I can't use a constructor for this because the MenuBar and the ContentPane take an instance of
    this Listener class in through their constructors. You can't pass the Listener in through their constructors while simultaneously passing them in through this
    Listener's constructor. That would be an endless cycle of failure. So I just instantiate an instance of this Listener class, then pass it in through the MenuBar and
    ContentPane constructors when I instantiate instances of them, and then call this setListensTo() method.)
    public class Listener implements ActionListener
      private MenuBar menuBar;
      private ContentPane contentPane;
      public void setListensTo(MenuBar menuBar, ContentPane contentPane)
        this.menuBar = menuBar;
        this.contentPane = contentPane;
      }The part of my actionPerformed() method that does some rudimentary saving, which I will make more complicated later:
    else if (evt.getActionCommand() == "saveMenuItem")
      JFileChooser fileChooser = new JFileChooser();
      int returnVal = fileChooser.showSaveDialog(menuBar.getTopLevelAncestor());
      if (returnVal == JFileChooser.APPROVE_OPTION)
        File file = fileChooser.getSelectedFile();
        ArrayList<Node> nodes = contentPaneClass.getTopPaneClass().getTabbedPane().getDisplayPane().getNodes();
        try
          BufferedWriter out = new BufferedWriter(new FileWriter(file));
          for (int i = 0; i < nodes.size(); i++)
            Node node = nodes.get(i);
            out.write(node.getIndex() + "," + node.getXPos() + "," + node.getYPos() + "," + node.getName());
            out.newLine();
          out.close();
        catch (IOException e)
          //To be added                    
    }That part that seems unwieldy is the
    ArrayList<Node> nodes = contentPaneClass.getTopPaneClass().getTabbedPane().getDisplayPane().getNodes();The reason I'm using a separate Listener class is because if I put, say, the actions for the MenuBar in the MenuBar class, and then want to save stuff in the JPanel
    at the bottom of the hierachy, I would have to go up from the MenuBar into the JFrame, and then back down the hierachy to the JPanel, and vice versa. Kind of like
    walking up a hill and then down the other side. I imagine this would be even more unwieldy than what I'm doing now.
    On the plus side, I am making progress, so thanks all for the help so far!

  • Training and Event module questions.

    Hi .
    I have some questions regarding Training and Event Management module.
    1. IS there a way to configure a custom attendee type for this module ?
    2. If no is there a way to rename a existing attendee type. I have a requirement to create a group of attendees type of External Person. I know i can use Company attendee type for grouping external person. But i need to change this Company to Group for displaying purposes. I know i can change the Company via T7778O table but won't it lead to bad consequences ?
    3. Is there a way to hide tabstrips on PVOO screen ? i have a requirement to keep only Company tabstrip others are not relevant for my scenario.
    That's all for now.
    Thanks in advance.
    Edited by: kernel.panic on Dec 22, 2010 8:47 AM

    Hi,
    thanks this one is ok, the one which I can not find is the info message for when the maximum capacity of the attendee list is reached:
    'Optimum capacity reached, only essential or wait list bookings possible' This one I want to change into a warning message.
    br,
    Ovidiu
    And I have a new question as well
    In the Attendee List layout is it possible to add columns which are not in the column set from customizing e.g. Personnel subarea,
    Employee subgroup, Employee group etc?
    Thanks
    br,
    Ovidiu
    Edited by: Ovidiu Moldovan on Apr 20, 2010 3:51 PM

  • Question: Inadvertently a visiting toddler gained access to my computer during a visit. He's obviously fiddled with something as I can no longer use my arrow keys to navigate through my albums or events on iPhoto. Please help!

    Question: Inadvertently a visiting toddler gained access to my computer during a visit. He's obviously fiddled with something as I can no longer use my arrow keys to navigate through my albums or events on iPhoto. Only one pic shows up in the album view - I can't see any thumbnails. To see the other pics I have to use the scroll bar on the right hand side of the window. Please help!

    Depeding on your version of iPhoto: On the left (iPhoto 11) or right (earlier versions) of the lower frame of the iPhoto Window you'll see a slider. Drag it left.
    Regards
    TD

  • Question about Events stored on an external drive

    Hello guys! I recently freed up a TON of space on my iMac by adding an external hard drive and you guys advised me on how to get iMovie '08 to store my Events there.
    Question: I'm going to Rome Italy tomorrow and I'm going to be doing a ton of video footage. My Macbook doesn't have the hard drive space to hold what I'm going to be shooting.
    So, my question is......considering that I'm using this external drive to store Events from my iMac will I be able to to use that same external drive on this trip to manage Events on my MacBook?
    In other words, I just want to make sure that I don't confuse either version of iMovie that I have operating on these two different machines. Can I use this same external hard drive to manage Events from both machines?
    Thanks in advance for the speedy assistance. I'm leaving tomorrow and need to get this issue nailed down.
    Thanks!
    Tony

    I actually have no set-up to test my speculations but...:
    when you tell iM08 to store Events on some ext. drive, it creates on 'Top Level' of that drive the 'iMovie Events' folder..
    so, when you do that with a second Mac/iMovie... I guess, it will confuse the file management.. (=you can not create two indentically named folders... ) ... and, I guess, you can not create/select a sub-folder for the Events...
    best practise would be to partition the drive.. but that isn't possible without erasing any content on your drive..
    Plan B) invest 100$ for a 2nd drive.. ? (last week offer: 79€ for 500 gigs.. no bad... )

Maybe you are looking for

  • How to modify a static value to variable value

    how to change a static variable to no-static variable, the code you see is to validate an xml file, if I change this line private static final String XML = "xml/laPartieWord.xml";to String XML = "xml/laPartieWord.xml";I m getting error " Cannot make

  • IMessage is not working on my phone. Is this a system issue or individual phone issue?

    My iPhone 4S is not allowing me to send any iMessages. It will say "not delivered" and send as a text. Is this an individual phone issue or system issue? I checked my settings and they are all correct.

  • Wbs elements allowed on each level

    Hi We are migrating  Projects from SAP 4.6 data to SAP 4.7. The WBS elments in 4.6 has more than 99 WBS elementson level 1 and/or level 2.  can we change the max number of WBS elemnts allowed in 4.7 from 99  to  higher number If so please let me know

  • My ipad mini with retina's Battary life too short

    I have used kindle for reading e-book. My ipad mini with retina is used the battary 1% per 4 minutes. Is it normal case or not? I think It is abnormal because three weeks after I had got the ipad. Its battary life is very good. It may be10 % per hour

  • Problem syncing iPhone 4S w/ iCal after Mountain Lion upgrade

    I just upgraded to Mountain Lion from Snow Leopard (I think?) and now my iPhone calendar entries will not show up in iCal.  They are not just recurring events, it seems that all iPhone events that were added after this point are not syncing with iCal