Problem with a float atribute

I have a problem when I try to divide 2 integer:
int a = 854;
int b = 1000;
float c = a/b;
and the response is c = 0;
How can I get the response c = 0.854;
Thank you,
aclaudia1

thanks,
it works

Similar Messages

  • Problems with the floating lens.

    Hello Nokia,
    My Lumia 920 has a very wierd problem with the floating lens. When I tilt the device up it blurrs the image for a sec or two and it makes a squirk sound which also records on the footage.
    Here is a video made with my Lumia 920.
    http://youtu.be/jlzzOBlAT6Q
    I sent my phone for a replacement, but I just wanted to let you know that this could happen and maybe stimulate those little chinese people in your factories to do a better job.

    Hello Nokia,
    My Lumia 920 has a very wierd problem with the floating lens. When I tilt the device up it blurrs the image for a sec or two and it makes a squirk sound which also records on the footage.
    Here is a video made with my Lumia 920.
    http://youtu.be/jlzzOBlAT6Q
    I sent my phone for a replacement, but I just wanted to let you know that this could happen and maybe stimulate those little chinese people in your factories to do a better job.

  • Programming problems with INT / FLOAT

    I got a problem with datatypes float and int.
    I'm just developing a c-program on HP-UX with the gcc-compiler. 'cause i have not ever been done an ORACLE-access before, i has started with the "cdemo2.c" - example from the oracle-demo-dircetory in version 8.0.4.
    in the DB there's a column with NUMBER-TYPE, but when i call the oci-function (or what ever it is) "odescr()", the variable "scale" (which is supposed to differentiate between FLOAT_TYPE and INT_TYPE) always is set to "0". this variable should be set to anything else but "0" if a FLOAT_TYPE is detected, but it isn't.
    what I do wrong ???
    How can I know the exact datatype, when a NUMBER_TYPE in the DB appears ???
    if there is a better way to realize an oracle-access in C, please don't wait to tell it to me
    many thanks
    null

    You basically got it. Another approach is to always work on the rightmost digit; that way you'll always be dividing, mod'ing, or multiplying by 10.
    You don't need to know the length of anything to use a for loop. Remember that a for loop has 4 parts: the initialization, the conditional, the "update", and the body. (There are probably more correct names for these that I can't recall right now.) The conditional and the update tend to be length checks and increments only because for loops are commonly used over arrays or strings, but they don't have to be.
    Another hint: how do you know when you're done pulling the digits out of the source number? What is the value of the source number when you're done?

  • Problem with TLF - floating an inline image

    I am running the latest version of Flash Builder 4 (4.0.1).  The problem that I having:
    When I use an InlineGraphicsElement if aTextFlow (in a RichEditableText component), if I set a value for the "float" attribute of an <img> element; the image is not visible.  Without the float attribute, I see the image.
    Is this a version problem with TLF?  How do I know which version of TLF that I'm using?  How do I install the correct version of TLF?
    Thanks for the help.
         Oz
    Some code fragments:
    The TextFlow string with "float":
    <div color="#444444" fontFamily="Times New Roman" fontSize="20" paragraphSpaceAfter="15" textIndent="10">
    <p><span color="0xff0000" >Alice, </span><span>really, was </span><span color="0xff0000" >beginning </span><span>to </span><span color="0xff00" >get very </span><span>tired of </span><span color="0xff00" >sitting </span><span>by her </span><span color="0xff00" >sister </span><span>on the </span><span color="0xff00" >bank, </span><span>and of </span><span color="0xff00" >having nothing </span><span>to do:  once or twice she had peeped into the book her </span><span color="0xff00" >sister </span><span>was reading, but it had no </span><span color="0x888800" >pictures </span><span>or </span><span color="0xffff" >conversations </span><span>in it, `and what is the use of a book,' thought </span><span color="0xff0000" >Alice `</span><span>without </span><span color="0x888800" >pictures </span><span>or </span><span color="0xff00" >conversation?'</span></p>
    <p>
    <img float="left" width="100" source="assets/library/alice/images/White Rabbit.png" height="100"/>
    <span>So she was </span><span color="0xffff" >considering </span><span>in her own mind</span><span>(</span><span>as well as she could, for the hot day made her feel </span><span color="0xff00" >very </span><span>sleepy and stupid), whether the pleasure of making a daisy-chain would be </span><span color="0x880000" >worth </span><span>the trouble of getting up and picking the daisies, when suddenly a White </span><span color="0xff00" >Rabbit </span><span>with pink eyes ran close by her.</span></p>
    </div>
    Without "float":
    <div color="#444444" fontFamily="Times New Roman" fontSize="20" paragraphSpaceAfter="15" textIndent="10">
    <p><span color="0xff0000" >Alice, </span><span>really, was </span><span color="0xff0000" >beginning </span><span>to </span><span color="0xff00" >get very </span><span>tired of </span><span color="0xff00" >sitting </span><span>by her </span><span color="0xff00" >sister </span><span>on the </span><span color="0xff00" >bank, </span><span>and of </span><span color="0xff00" >having nothing </span><span>to do:  once or twice she had peeped into the book her </span><span color="0xff00" >sister </span><span>was reading, but it had no </span><span color="0x888800" >pictures </span><span>or </span><span color="0xffff" >conversations </span><span>in it, `and what is the use of a book,' thought </span><span color="0xff0000" >Alice `</span><span>without </span><span color="0x888800" >pictures </span><span>or </span><span color="0xff00" >conversation?'</span></p>
    <p>
    <img width="100" source="assets/library/alice/images/White Rabbit.png" height="100"/>
    <span>So she was </span><span color="0xffff" >considering </span><span>in her own mind</span><span>(</span><span>as well as she could, for the hot day made her feel </span><span color="0xff00" >very </span><span>sleepy and stupid), whether the pleasure of making a daisy-chain would be </span><span color="0x880000" >worth </span><span>the trouble of getting up and picking the daisies, when suddenly a White </span><span color="0xff00" >Rabbit </span><span>with pink eyes ran close by her.</span></p>
    </div>
    A bit of MXML code:
        <s:Group id="myGroup" width="100%" height="100%">
            <s:RichEditableText id="myRichText" lineBreak="toFit">
            </s:RichEditableText>
            <!--- Do not set the height of the RichEditableText - since it seems to prevent the appearance of the vertical scroll bars -->
        </s:Group>
    And some Actionscript that adds components:
                scroller = new SxScroller();
                scroller.dx = dxScroller;
                scroller.dy = dyScroller;
                scroller.addEventListener(FlexEvent.CREATION_COMPLETE,scrollerEvent);
                scroller.addEventListener(FlexEvent.UPDATE_COMPLETE,scrollerEvent);
                richText = scroller.richText;
                richText.editable = false;  // textCharacter.enableEdit; // probably false.  TODO:  support true???
                richText.selectable = true; // required
                richText.width = dxRichText;
    And finally the import of a TextFlow string:
    richText.textFlow = TextFlowUtil.importFromString(textFlowString, WhiteSpaceCollapse.PRESERVE);

    On the TextFlow forum I found the answer:
    Use Flash Builder Hero, since it support TLF 2.0 out-of-the-box.  The InlineGraphics support several valuable attributes, including float="left" etc.
    Beautiful.

  • CSS problem with the clear property

    This is my actual page
    http://www.martcol.co.uk/abba/
    and I want to swap the paragraphs around. This is what I come up
    with
    http://www.martcol.co.uk/abba/test/test01.php
    I reckon I am getting muddle with the whole clearing the
    float thing.
    Many thanks
    Martin
    Actually, I think it only breaks up in Firefox - bear in mind
    I only tested in IE6 and FF

    http://martcol.co.uk/abba/pages/patch.php
    Oh dear, another problem with my floated elements and the
    clear property....
    Martin
    I think I have this now. Not sure why but picking away at it
    has it fixed.

  • Problem with Float.toString

    Hi,
    I have a small problem with wrapper class Float.
    For example
    float f = 99999999999999999f;
    f.toString(); returns a mentioned in the api doc: 9.9999999999999999E16
    while I wanted the original 17 times a 9,
    how can I achieve this??
    THX

    I tried to use the DecimalFormat class with the patter 17 * #, but the string it prints is no longer the same as in the original Float (17 * 9), now I get 17 chars but they are no all 9

  • Problem with floated elements in IE5.5

    I've apparently got a problem with a right sidebar float
    being dropped in a primitive version of IE and I can't figure out a
    remedy, as none are suggested in dwcs3's browser compatibility
    function. The site is lindafarronknapp.com... if anyone has any
    suggestions I would more than appreciate it...

    Thank you for the replies. What was happening is that the other audio files were being onverted by PPPro. This one was not. I moved the file to the desktop and once again placed it into the project. This time the yellow conversion line on the bottom right corner went to work and it works fine. It was some type of glitch with that one file. Thanks again. Roman

  • Please help with column float problem in IE8

    Hi there,
    Sorry to be so pushy - but I am desperate for help!!
    Having serious problems with my site in some PC's showing Internet Explorer 8. My right column floated right is moving down the page underneath the left column..
    It shows fine on IE8 on my PC - however on my clients PC (vista with IE8) it is showing up as mentioned above. Is there a fix for this.
    Here is my link http://www.dooks.com/pgs/welcome.html
    The css is all there! If you need anything please let me know as I need to get this sorted - I have had serious issues with this site that I have never had before with other sites and am starting to think there is a bug in my software. I redid the index page and this one page (linked above) to see what my problems are - so help with query v appreciated.
    Many thanks,
    Karen

    Lawrence_Cramer wrote:
    A point to keep in mind is that IE8 is still in Beta.
    Not anymore.
    http://www.microsoft.com/Presspass/press/2009/mar09/03-18IE8AvailablePR.mspx
    "REDMOND, Wash. — March 18, 2009 — Today Microsoft Corp. announced the availability of Windows Internet Explorer 8, the new Web browser that offers..."
    Mark A. Boyd
    Keep-On-Learnin' :-)

  • The Problems With Logic (as I see them) - PART TWO!

    Hello again,
    It seems to be a tradition now that as I compose on a track, I keep a text editor open so that I can jot down all the annoyances and problems that I encounter during my creative process... Anyone who missed the previous edition of this topic, please visit PART ONE, here:
    http://discussions.apple.com/message.jspa?messageID=3605456#3605456
    That said, here I give you "The Problems With Logic Part II":
    1. Logic should clear the playback buffer everytime you play. Quite often you start playing and there is trailing reverb/note events from various audio instruments and plug-ins.
    2. The sample edtor "save selection as" has no memory of where you previously were in the file browser.
    3. If you double click on a wave form, the sample editor opens up with the wave form you double clicked on... Great.. But now, if you go and double click on another wave form somewhere, it just takes you back to the sample editor with the same previous wave form selected (not great). This is incredibly annoying if you are attempting to save out certain edits-- Quite often you will end up saving 5 or 6 of the same exact waveform, thinking you were saving each individual one. GRR!
    4. Key commands.. if you try to assign a key command to something that is already used by another feature, you are presented with a window warning you that it already exists.. If you click cancel, then you can no longer enter any keys in the key field.. You are forced to close the key commands preferences window and start over.
    5. Key command window: You should be able to search by command.. For example, if I want to find out what "o" is assigned to, I should be able to search by O-- Further, you should be able to sort the key commands by clicking the column titles "key", "command" -- or "midi"... After all, we can sort by name, date, size, etc in the finder by clicking on these column titles.
    6. Tempo Tap feature-- I am quite confused by this. There should be a simple way to tap and define a tempo. When ever i try to do this, the tempo is only temporarily changed until I stop playing, and most of the time I get error alerts about trying to sync audio and midi (mind you, when there are absolutely no parts in the entire arrange window). The manual states that with "tempo recording" checked on the tempo interpreter window, that the taps will record tempo changes, but this does not work. I tried doing this, tapping the key command I defined to tempo tap (ctrl-shift-t), and I was tapping at various speeds-- many taps fast.. and Logic recorded tempos of 99-101bpm.. I was tapping atleast around 175-180bpm. I then tried tapping slowing, and Logic recorded tempos of 99-101 again... so this feature obviously is full of bugs.
    7. When loading songs, as soon as various plugins such as Kontakt, exs24 begin loading samples, it brings logic to the front. If you're working in the background in other applications while waiting for your songs to load, you are rudely interrupted from what you're doing (such as, selecting from a menu, typing a document, etc) only to be forced to watch a status bar fill up.. and then all key presses at that point become error beeps.
    8. Logic's sample memory easily becomes messed up and crazy. Quite often when using AU instruments such as BFD, Culture, and even Synthogy's Ivory. I will switch to that particular track to play on my keyboard, and each sample will be full of horrible pops and clicks-- the kind that destroy speakers. Other times, in a sample of a string for instance, all of a sudden after one second will be a pop and then the sample will be playing at a completely different pitch... I have to remove the AU instrument and reload it at this point.. This happens quite often. Logic should offer a 'buffer reset' so that you can just flash plugins but they reload whatever preset they were set to.
    9. Volume faders resolution are lame! There is no reason why you shouldnt be able to access +1.0, +1.1, +1.2, +1.3, +1.4, +1.5, +1.6, +1.7, +1.8, +1.9... Further the display is only so wide and you can't even read the decimal values for numbers -10 and lower. They just appear as 10.
    10. When a movie is open, and you are viewing the video output via FIREWIRE, there is a mini-floating window which contains the smpte, position, and movie start information-- However you cannot modify any of these values. You have to switch video output back to "WINDOW" to change the start position of the movie. This is obviously a bug.
    11. Changing the movie's start time is very user unfriendly. There should be a simple way to specify to start at a moment of time relative to SMPTE-- So you can just say "+9:15" for example, and it would take you in 9 minutes and 15 seconds, rather than how it is now where you have to think backwards from SMPTE code and subtract.
    12. You cannot view video as a window AND output to firewire. There is no reason why you shouldn't be able to do this. For example, if I wanted to output my video to a monitor in a vocal booth-- I can do this.. but I can't see what the vocalist is seeing on my own screen! This is just nonsense. You should be able to output to the screen (desktop mode or floating window) as well as an external firewire device.
    13. Saving a song with a movie open should mean that when you load that song, the movie should be up and exactly as it was prior to saving. As it is now you have to select "open movie again".
    14. There is still definitely a bug in track automation-- this was really bad back in version 4, but there is still something not quite right here where starting playback will not always guarantee that the automation data is being read.. And in my experiences it results in volumes being incorrect until you stop and play again, and in some cases it will not work at all unless you plot some automation points. This is an intermittent issue-- but quite often activated by placing an audio region from the audio window on a track (SEE VIDEO).
    WATCH VIDEO OF THIS BUG:
    http://collinatorstudios.com/www/logicbugs/logicautomationbug.mov
    15. In the arrange window, sometimes when zoomed in tightly, all parts on a track are selected, and you think that only the part that you are looking at is selected.. you move this part, and now all of your parts are off. Logic should have some kind of visual aid to let you know when ever you are moving multiple selections... Something like, the parts you are moving will highlight a dfferent color or something... This is a similar problem I have with the loop area of the screen.. You can accidentally turn it on when in the matrix window, and have no idea unless you look down at the transport, but with me for example, my transport is at the very bottom of the screen and I am not looking there most of the time.
    16. Automation data, when two points are semi-close to each other, suddenly the value of the data is no longer shown.. I can understand that when you are zoomed out, and there is simply no space for this to visually appear, that's appropriate. But as it is now, it doesn't display this information when there is plenty of space for it to be visible.
    17. Logic should let you set audio track inputs to the various outputs (1-2, 3-4, etc) and buses.
    18. clicking on a track selects ALL parts. This is so so so annoying. How many times have I been editing voice over, and selecting a track, thinking I am shrinking the length of a part, and to find that ALL parts have been shrunk.. SO ANNOYING!!!! This needs to not happen, and there should be a simple way to right-click a track and it will have an option "select all regions"... also, when you click on a track and all parts are selected, if you horizontally zoom, logic zooms into the beginning of the track, rather than the song locator. I don't know what the LOGIC behind this is, but it's not very helpful, it actually is very frustrating.. Zooming should always move towards the song locator position.
    19. EXS 24 should have a "reverse/backwards" button so that samples played are backwards.
    20. Logic should offer a way to globally increase or decrease a specific automation type (especially volume) globally for all tracks... So if you have detailed crescendos that start at -3.8 and end at +1.6, you can add 3db to this and it will now be at 0.8 and end at 4.6.
    21. If you have multiple tracks of the same track (such as three Audio track #1's)-- say you are recording guitar parts, and just copying the track and muting the previous track as a method of maintaining multiple takes for later auditioning. If you draw automation volume data on this track (it appears on all 3 tracks), and then if you delete the audio from one of the muted tracks and tell logic to KEEP it, suddenly all automation data is gone. GRR!!!
    22. Several times I have opened Kontakt, and attempted to load an instrument while outputting a movie via firewire video to my monitor. As soon as I try to load the instrument, the firewire video output on my monitor goes crazy, and then comes back on.. Logic then crashes. This has happened 3 times randomly...
    23. UNDO does not work on every function. for example, if you change an output to bus 1 instead of 1-2, you cannot undo this. Undo should undo whatever the last command was, no matter what it was. This is what the word LOGICal is supposed to represent.
    24. Floating windows (as in plugin windows) should close with apple-w!!!
    25. *BUG* If you are in a part that is say 10 measures long, zoom in horizontally 100% in the matrix window-- You then isolate one specific quarter note pitch in the middle of this measure, and have cycle turned on, looping over this one quarter note, if you are not looking at this note event/loop region when you hit play, the display will jump to the beginning of the part and never show you this note event as it loops. However if you have the note event on screen when you hit play, then it will behave properly. This makes it extremely difficult and frustrating to perform detailed hyper-draw work. (SEE VIDEO)
    WATCH VIDEO OF THIS BUG:
    http://collinatorstudios.com/www/logicbugs/logicloopbug.mov
    26. *BUG* Host Automation is not accurate. I assigned Kontakt's tune knob to C#000, and If I place a dip, the knob begins to move way before the automation data is even present.... So basically what I was trying to do, can't even be accomplished because Logic screws everything up by pitching the instrument too early... Such a shame.. By the way, I previously mentioned the importance of being able to display part data in the arrange window as matrix data (horizontal lines) rather than score data. Someone argued what good this would do-- Well this is a perfect example, if I am attempting to affect a particular section of a note with automation, I can't possible visually see where this is because the length is not described by the current score representation. Having a horizontal representation would solve this problem... (SEE VIDEO)
    WATCH VIDEO OF THIS BUG:
    http://collinatorstudios.com/www/logicbugs/logicctrlchngbug.mov
    27. There should be a way to convert stereo samples to mono in the sample editor.
    28. When you view "as text" in the environmentt, you cannot drag an object to the arrange window-- Such as to create a bus track.. Now mind you I don't know why you can't just select "BUS" when editing a track in the arrange window in the first place, however there is no reason why 'view as text' should behave differently than when it's viewed as icons.
    29. When you drag a bus from the environment to the arrange window, it replaces whatever track was there. It should ADD a track instead of replace-- atleast there should be a preference for how this behaves.
    30. Occasionally when dragging a bus from the environment, there is some visual garbage in the track automation (see screenshot).
    31. There should be a way to LOAD and SAVE selections in the arrange window. Quite often when editing audio from a countless number of parts/regions, it becomes painful when you have to select and move 100s of audio files. There should be a way that you can just select a ton of regions and save that selection, and reload it at anytime. There are a few 'select' tools/options under the edit window, however they are song specific-- not track specific. So they are completely usesless for what I need.
    32. Logic should offer a feature to collect sysex data from midi devices so that patch names show up and can be selected via program change.
    33. When no track or part is selected, and you vertically zoom in, Logic should zoom into the center most track.. It behaves very oddly and zooms in more towards the top. This becomes extremely annoying when dealing with a sequence involving 100 tracks, and a part is selected but you scroll far below where the part is.. When you begin to zoom in, it takes you towards the selected part, yet it's not displayed on the screen and you have no reference for what you are even looking at. The rule should be this: If the part is on the screen, zooming vertically will bring you to it. If it's off the screen, you will zoom into the center track of whatever is currently on the screen.
    34. I mentioned this in a thread earlier... http://discussions.apple.com/thread.jspa?threadID=752485&tstart=0
    There is a bug when using the transform tool involving the 'position' variable. In my example, I was attempting to reverse the time placement of three chords, that occured in a part somewhere in the middle of my song. By selecting the measure start and end of this part, Logic was unable to select or operate with the transform tool (and I tried a variety of transform options). If I moved this part to the beginning of the song, then the transform tool would suddenly work. After some research, I found online someone had said "Position Time position of the event, referenced to the start of the MIDI Region (not of the song)."--- But if I still doubt this is true, because I then placed the part on a new track with no other data, and placed it in the middle of the sequence and in the transform tool under position I selected '1 1 1 1' to '5 5 5 5' as well i tried setting the position to 'all', and none of this worked. This obviously is a bug... If it's not then it's a very serious design flaw. The position should relate to measure numbers of a song, and nothing else.
    WATCH VIDEO OF THIS BUG:
    http://collinatorstudios.com/video/transform.mov
    That is all for now...
    For those who firmly agree with me and all of the points that I have brought up now and in the past, I encourage you to contact Peggie Louie, (the Logic HR department contact) at (408) 996-1010 and suggest that she hire me as a consultant to help eliminate Logic's many annoyances. I have tried to pursue this heavily in the past, but sadly I was completely ignored by her on all levels. Maybe you all can help make a difference?
    Fighting the good fight,
    Patrick J. Collins
    http://collinatorstudios.com

    11. Changing the movie's start time is very user
    unfriendly. There should be a simple way to specify
    to start at a moment of time relative to SMPTE-- So
    you can just say "+9:15" for example, and it would
    take you in 9 minutes and 15 seconds, rather than how
    it is now where you have to think backwards from
    SMPTE code and subtract.
    For this one I'd suggest getting SMPTE calculator. Entering timecode numbers and having to add and subtract is not so difficult, and AFAIC part of a composer's gig. But what I would add, instead, is that it would be fantastic if Logic provided a timecode calculator (edit: even if it was in the form of a custom Logic widget).
    13. Saving a song with a movie open should mean that
    when you load that song, the movie should be up and
    exactly as it was prior to saving. As it is now you
    have to select "open movie again".
    This doesn't always happen. I've struggled with this for a long time, and I don't know why sometimes the movie will load and not other times. I would also add here that Logic should show the file pathname to the movie. Somewhere...
    18. clicking on a track selects ALL parts. This is
    so so so annoying.
    You can prevent this from happening if you have cycle turned on and set to a set of locators that "contain" the parts you might want to select en masse. I always work with cycle=on so this is not a problem.
    21. If you have multiple tracks of the same track
    (such as three Audio track #1's)-- say you are
    recording guitar parts, and just copying the track
    and muting the previous track as a method of
    maintaining multiple takes for later auditioning. If
    you draw automation volume data on this track (it
    appears on all 3 tracks), and then if you delete the
    audio from one of the muted tracks and tell logic to
    KEEP it, suddenly all automation data is gone.
    GRR!!!
    Never had that happen. In my experience, telling Logic to keep the data always works.
    23. UNDO does not work on every function. for
    example, if you change an output to bus 1 instead of
    1-2, you cannot undo this. Undo should undo whatever
    the last command was, no matter what it was. This is
    what the word LOGICal is supposed to represent.
    Undo in Logic is highly problematic for other reasons. Here, I think there should be a specific Environment Undo, just like there's a separate undo for audio edits.
    29. When you drag a bus from the environment to the
    arrange window, it replaces whatever track was there.
    It should ADD a track instead of replace-- atleast
    there should be a preference for how this behaves.
    Right. This is a matter of personal preference. But still there are other ways to get an object assigned to a track. The "thru tool", for instance. No dragging required.
    32. Logic should offer a feature to collect sysex
    data from midi devices so that patch names show up
    and can be selected via program change.
    My guess: considering how much sheer time it takes to write this kind of software, let alone debug it with every conceivable device, it's not likely this is going to happen.
    That is all for now...
    For those who firmly agree with me and all of the
    points that I have brought up now and in the past, I
    encourage you to contact Peggie Louie, (the Logic HR
    department contact) at (408) 996-1010 and suggest
    that she hire me as a consultant to help eliminate
    Logic's many annoyances. I have tried to pursue this
    heavily in the past, but sadly I was completely
    ignored by her on all levels. Maybe you all can help
    make a difference?
    Wait in line buddy!
    (LOL)
    I must say, I'm very impressed with your list and attention to detail. And I feel your pain, trust me. But many of the things you've listed are feature requests and not bugs. And some of the behaviors you've described I have yet to run across. So this is typical with Logic, that it can be operated in so many diverse ways that no two people run it in the same way, nor would two people conceive the program's capabilities in the same way. But I digress...
    I also think there's a certain amount of Logic convention that I don't think you've adopted yet, hence your wish for behaviors that don't yet exist.
    I don't disagree with most of your feature requests, and I'm (quite unfortunately) able to say that I'm familiar with most of these bugs and about 9 dozen more. But again, it's important to distinguish between bug, feature request, time to RTFM, and errant behavior that's experienced by a very limited number of users.
    There's no doubt that this program has its problems. In particular, your #1 re the playback buffer. And I'm glad you've brought many of the bugs into the light for people to read. Good work.

  • Problems with inserting elements into vectors

    Hi,
    I have a problem with the setElementAt() method for vectors.
    I want to initialise a vector that is same size as a previous vector declared in my program and insert float 0.0 in all the positions.
    The code below is a for loop to do just this where count is the size of the previous vector.
    for(int i=0;i<count; i++)
                   vLargest.setElementAt(zero,i);
              }i have declared zero as a float
    float zero = 0.0f;
    the error that i'm getting is that it that the vector cannot be applied to a float.
    Can anybody tell me what i'm doing wrong?
    Thanks

    Yes you need to store Objects in your Vector not primitives.
    float is not an Object it is a primitive. But Float is an object.

  • The problems with Logic (as I see them)

    Hello Everyone,
    Please keep in mind that I am writing this with the intention of expressing my frustrations, and what I feel would make Logic a better program. I realize not everyone will agree with the importance of what I say, but I am a firm believer of HAVING THE OPTIONS. Let the users choose what works for them and how they can best accomplish the tasks that they need to with their individual workflow.
    That being said, here is my list of Logic's faults and why I often call Logic "Illogic".
    General:
    * Logic should have a feature to automatically save your song every X number of minutes. Final Cut Pro does this, why doesn't Logic? It should prompt you "Logic can automatically save your project if you save it" (assuming the current file is 'autoload') to remind users that they should create a project name and save their work.
    * There should be a preference option for all windows to open as 'float'. Once upon a time holding option while double clicking parts would open them as a float (though having to hold down option every time in my opinion is an inconvenience, because I personally ALWAYS want my windows open as a float), however.. now in 7.2 that does not seem to work anymore. So, theoretically after you set your prefence to 'always float', then the when you hold option or control and click on a particular window, it will bring that window to the foreground...
    * The loop region at the top of the screen is larger than the time-line ruler tab. This is the #1 annoying thing about logic. so many times, I click on an area of the ruler tab to start playing at a specific section.. and somehow I ACCIDENTALLY click on the loop area... If I could ask for ANYTHING it would be that there is an option to disable LOOPING turning on and off from clicking up there. My 2nd request would be that the ruler tab be re-sizeable so that it can be larger than the loop area. This is especially the case for the matrix window where it default opens up to a sizing where the actual time line is so tiny, and the loop region is HUGE.... Every time I open a matrix window I have to resize this and again the loop area is 2x as big as the timeline area, so I end up wasting screen space just to avoid the annoying loop feature being trued on. My suggestion is, require that the loop button on the transport be the only way to turn on the loop feature (other than key commands), and only when it's turned on can loop points to be set. Why is the loop area so big anyway?!?!
    * Logic should offer a TALK BACK MIC button which will utilize the built-in apple microphone or iSight microphone and allow that to be sent to the audio interface. This would be an extremely useful feature for studio recording setups.
    * Starting logic takes approximately 5 minutes for me. It says "scanning exs24 instruments" for the majority of the time, and I admit my sample library is huge. however, my sample library has not changed in over a year. Why does logic have to continuously scan it??? Can it not make a reference of how many files, compare and if its larger-- then scan???
    Song Loading:
    * When audio files are not found during loading a song, it asks you the first time what you want to do "search", "manual", and "skip"... if you click "skip", and then it finds another missing file, it no longer presents you with the "SKIP" option.. but forces you to either search or skip all.. Let's say you have a project that used 5 audio files that are all missing because you had them on a different hard drive, but have copied the data somewhere else. The first two files it asks for you don't need.. but you know where the 3rd file is.. So your plan is to skip the first two files and then click manually for the 3rd.. but oh.. YOU CAN'T DO THAT! You have to find your first 2 files if you want to even have the option to locate your 3rd file... Unless you are planning to locate the files within the audio window-- but still, Logic should not be so unfriendly.
    Further, If you choose "manual", and what you're looking for isn't where you thought it was-- You realize you actually want to search for it.. So you click cancel and guess what.. It assumes you want to skip it, and so you either have to reload your project again, or deal with this in the audio window. Bottom line is this window should always have "Search", "Manual", "Skip", and "Skip All".
    * When you open another project, Logic DUMPS all of the audio instrument data in memory. This is one of the worst things about logic. If you are working between multiple files-- such as when scoring a film, and you are using different files for different cues, then this becomes a complete nightmare and a waste of your time. Logic should be assessing "What instruments are in common between these two projects"... And utilizing all audio instruments to the best of the machine's memory capacity. There is no reason for Logic to behave like this.. I've had to revert back to previous versions of the same song because some data was different, and I am just trying to visually compare various settings one from the other.. Just clicking from one project's window to the other requires me to have to wait 3-4 minutes while Logic loads all these audio instruments (WHICH ARE IDENTICAL IN BOTH PROJECTS BY THE WAY!!!).. This is just incredibly dumb, and creatively stifling.
    * BUG * -- Mind you, if you have two projects open, and you close one.. Logic begins loading all the audio instruments of the remaining project.. If you close that project as it's loading audio instruments, Logic will crash.
    Matrix Stuff:
    * BUG * If you have a part with lots of notes, and you begin to make a selection and scroll horizontally through all the content until then entire part is covered in the selection... After you release the mouse button and make this selection, quite often many random notes are unselected. This can be demonstrated by watching the following quicktime move:
    http://www.collinatorstudios.com/video/logicbug.mov
    * When you select a single note in the matrix window, it sounds.. This is a GREAT feature... However, when you make a selection of multiple of notes, they all sound at the same time.. This is just plain dumb. It once blew up my speakers... There is NO reason why a multiple selection would need to sound.. It's just dumb.. bad for your speakers, bad for your ears. The rule should be, if selection box = yes, then sound = no... else, sound = yes.
    * When viewing the matrix window while recording, all note events disappear until after recording stops. This is highly annoying (and illogical) as it causes confusion if you are relying on watching the note events in that part to know where you are supposed to come in.
    * The grid cannot be set to divisions other than 2 or 3. Musicians use 5 and 7!!! And also, can logic please offer an option to display the grid as NOTE symbols... It is much more musician friendly to see a 16th note with a 3 over it than "24". 24 means nothing to me as a musician.
    * Quantizing should allow custom input for tuplets.. So that users can quantize odd figures such as 13:4 for example.
    * If you move the song locator to a specific time location in the arrange window, and then double click a part to open it in the matrix window, the window is not opened to the locator's position. Thus causing annoyance and confusion as far as what the user is even looking at.
    * During horizontal scrolling of the window, the locator temporarily disappears, making it difficult to find where the locator is-- which usually is a marker for us to know what we are trying to find-- ESPECIALLY WHEN YOU OPEN A WINDOW AND IT'S NOT EVEN DISPLAYING THE SONG LOCATOR'S POSITION!!!
    * If you have two parts on the same arrange track, adjacent to each other and you enter the matrix window of the first part.. (assuming the link/chain icon is lit) When you scroll to the end of the note data, logic automatically takes you to the next part... The problem with this as it is, is that it does not take you to the FIRST note event of the text part, but rather continues to align the song locater with where ever it previously was (so you end up viewing somewhere further down in the next part).. To clarify, say you have a part what begins at MM-7 and ends at MM-14, the 2nd part begins at MM-15 and ends at MM-22.. If you begin scrolling the song locator past measure 15, then suddenly you see measure 22. When you really should be seeing measure 15. This is confusing and weird.
    * Every time you enter the matrix window of a part, the chain/link button is on. For me, this is incredibly annoying. There should be a way to set this so that the button's default is OFF...
    * When you move the mouse around the matrix window, whatever pitch corresponds to the vertical location of the mouse--- that particular key of the piano keyboard on the left side of the window should highlight so you could clearly see what note you are hovering over.. Logic tries to help with this by offering things like contrast options for C D E, but this clearly would be much more helpful.
    * With the velocity tool you can (MOST OFTEN ON ACCIDENT) double click on empty space in the window and cause all note events in all parts to appear on the screen-- Yet once you do this, you can't double click on a particular part's note to only display that part again. You have to switch to the arrow tool to do this. This is inconsistent and ILLOGICAL...
    ON A SIDE NOTE: PLEASE ENABLE A FUNCTION TO DISABLE THIS "ALL NOTES OF ALL PARTS APPEAR" when double clicking on empty space feature! I want NOTHING to happen when I double click within the matrix window... Make it a button within the window or just an option in the drop down menu only. * BY THE WAY * When you DO double click the background of the matrix window and multiple parts appear.. If you move notes of one part to match it up with other, it is incredibly slow. there is a 1-2 second pause each time you move a note move.. My g5 fan goes on each time I do this.. I'm sorry, there shouldn't be anything too CPU intensive to accomplish this simple task!!! I am only viewing 2 parts at the same time and it's slowing down my cpu...
    * Occasionally when I adjust note lengths, I accidentally double click on an actual note.. This opens the event list editor, and there is an intermittent bug where this note sounds-- and for some reason when the event list opens, the note sounds on top of itself a million times, so the result is a super loud flanged note which again, almost blows up my speakers and hurts my ears... PERSONALLY, I would like an option that DISABLES the note event list from opening by double clicking. Preferences currently has "double clicking a midi region opens: <selectable>"--- why not also have "double clicking a NOTE in matrix window does: <selectable>"-- and please allow "DO NOTHING" to be one of the options.
    * Why does the finger tool only change the end position of the note event??? Should this not be replaced with the bracket tool which appears automatically when using the arrow tool on closely zoomed in notes? This finger tool seems like an outdated old logic feature which has been replaced and improved upon. What would be nice is to have this bracket tool where we can be assured we are altering note start and end positions without moving things.
    * In the hyper-draw >> note velocity section--- This is highly annoying to work with... It's far from user friendly. first of all, to move a note's velocity position, you have to click on the "ball".. if you click on the line, it does nothing.. Because the ball is so small to begin with, quite often the user is going to miss the ball and somehow begin to "START LINE"-- Which is weird because it's activated by holding the mouse button down briefly. There really should be a "line tool" for this, because "START LINE" is too easily accidentally activated-- this is frustrating for the user. Most important though, these 'velocity markings' should be adjustable by clicking on the line as well-- not just the ball.. there should be a 2-3% area around each ball/line which logic will recognize as part of the ball/line so that it can easily be moved. I also feel that there should be some specific features for this section, such as a way to select multiple note velocities and apply a random pattern to them, or apply a logarithmic curve to the line tool. Yes, you can accomplish this stuff somewhat with the transform tool-- but this way would be more user friendly, and allow a lot more creative flow.
    Event list/Tempo list:
    * When one event is selected, by moving down X number, holding shift+clicking SHOULD select all events between those two points. However, the shift key for some reason acts as the OPTION key does in the finder-- (meaning it will only add one additional selection at a time).. This is highly inconsistent with the actual behavior of a Mac... Open a finder window and hold shift and click on items that are not vertically next to each other and a group is selected... Now do it in logic, and it causes GREAT frustration and annoyance. What happens if you have a million note events that you want to erase? You have to go page by page and click with shift on each one?? Or drag a selection and wait for logic to scroll you to where you want to go?????????? No thanks.
    Arrange stuff:
    * "REGIONAL CONTENT" (meaning the visual representation of note events) does not accurately depict the event data as note lengths cannot be visually identified. Everything shows up as a generic quarter note... My #1 suggestion is that regional content should be customizable so that you can view it in a miniature matrix data style. The biggest problem for me is that I cannot see where my notes end-- I can only see where they start, this makes it very difficult to identify what I am looking at.
    * Track automation data should only be inputable by the pencil tool. I cannot mention how many times automation data has accidentally altered when using the arrow tool. The pencil tool should allow you to raise and lower the lines reflecting automation data... What is the point using the pencil tool for automation if it's only function is to create "points" yet you can also create points with the arrow tool..??? Pencil tool should act as the arrow tool does in the sense that it raises or lowers automation data.
    * Recording preferences do not offer the option to automatically merge new part with existing part when a region is NOT selected. How annoying is it to have to select a part every time you want to record something just so it will be included in that original part!
    * Ruler at the top of the screen should also give an option for tuplets. 5, 7, etc.
    * When in record mode, if you click on the ruler to another time position, all audio instruments cut out and it takes approximately 3-4 seconds before tracks begin playing audio. This becomes very annoying if you are trying to do a pick up and want to just start 1 measure before hand.
    * There should be a way to EASILY (without having to cable two tracks together in the environment) temporarily link multiple tracks together so that automation data will be duplicated. So theoretically you can link 3-4 tracks together, and by adding automation data to one, you are adding it to all 4.
    * If a part is soloed, and you hit record. The part stops being soloed and you can no longer hear it. This makes it impossible to record a pick up on a soloed track unless it's locked, but it shouldn't need to be locked.
    * When you are zoomed in tightly, and you are trying to align notes within two parts on different tracks (meaning using the PSEUDO NOTATION DATA that appears in the part to align), there needs to be a VERTICAL line that snaps to the note closest to the mouse cursor. When trying to do this in parts that are a far vertical distance apart, it becomes VERY difficult to eye this alignment. Logic does this with automation data.. but for some reason they left it out for actual part alignment...
    * There should be a way to force the downbeat of a measure to occur at any given moment... What I mean by this, is composing for film is an absolute PAIN in Logic. Scenes, last for odd amounts of time, and Logic's reference manual claims that you can solve this by using various tempo tricks, however it is ineffective for the most part. What Logic needs is the ability where you can click on a drop down menu item within the arrange window and FORCE that where ever the song locator is, the rest of the measure is eliminated and a new measure downbeat occurs right there. This will allow you to always have new scenes on the downbeat of a measure without having to mess with your tempo and meter.
    Hyper Edit Window:
    * I can't even begin to comment on this... The hyper edit window is one of the worst things I have ever seen in a music/audio program. It is a horrible interface, you can't get it to do anything correctly without messing everything up. This thing needs a complete overhaul... I mean, just try to create a simple crescendo with note velocity and it will take you all night.. Try to add pitch bend data, and it adds note velocity data as well.. It's a total nightmare, and I would love to hear someone's practical application of this window.
    Score Window:
    * The method that the song position locator moves along with the notation is very strange. It is not at all how a person's eyes function when reading music. A much more logical approach to this would be for a transparent colored block of some type to highlight an entire measure, and each note head will glow as it sounds. The current way is so strange, it speeds up and slows down-- makes absolutely no sense, and it is more disruptive than anything.
    * When the Hyper Draw > note velocity area is exposed, if you use the velocity tool to increase/decrease a particular note's volume, the data in the hyper draw window does not update in real-time as you use the velocity tool. This behavior is inconsistent with the matrix > hyper draw's note velocity section-- where as in that area, the velocity ball/lines do update in realtime.
    EXS24:
    * when you are in many levels of subdirectories and you are auditioning instruments, it becomes very time consuming and annoying to have to continually trace through all the subdirectory paths. There should be a feature directly under the load instrument window that takes you to the subdirectory of the current instrument.
    * Seems when SONG SETTING > MIDI > "chase" is turned on... When starting sequences using audio instruments, (I am using a harp sample within the exs24), there is a latency hiccup upon starting, which is very disruptive when trying to listen to a short isolated moment in a composition. And I do want to chase note events in general-- but this present situation makes it difficult for me to work. I would suggest that you can specify tracks to exclude chasing.. Or fix the latency hiccup issue.
    Thank you.
    -Patrick
    http://collinatorstudios.com

    this is excellent patrick. can you number your points so that the thread can be discussed?
    1. yes
    2. ok
    3. great idea
    4. even better idea. you could set something up with aggreagate device i suppose but it would be better to have the feature to hand.
    5. you need to look into your project manager prefs. scan the paths and the links to the audio files will be saved meaning they will load up in a fraction of the time.
    6. yes this is nuts. you can skip all and sort it out with PM but then you shouldn't have to.
    7. this exists already. perhaps it ought to be a default but you need to set your esx prefs to 'keep common samples in memeory when switching songs'. then it will do just as you wish it to. you can also use the au lab in the devlopers kit which will allow you to load in au units etc seperately from logic, which logic can then access. this is a good way of getting around the 4 GB memory limit with logic too.
    8. ok, don't know about this bug.
    9. yep happens here too.
    10. doesn't worry me this one. you can turn off midi out.
    11. yes this is silly.
    12. well, i think this is something we can get used to. i am a musician and i am used to seeing '24'.
    13. you can already set up groove templates to allow for quantizing irrational tuplets. i do it all the time. i would like to see step input for irrational tuplets though.
    14. yes this is silly. the button for the KC 'content catch' is getting very worn out.
    15. ok.
    16. not sure i understand this one.
    17. yes this drives me nuts too. i have to lock screensets to get this to stay off.
    18. you can use KCs for 'go into/out of sequence' - but yeah.
    19. ok
    20. there are a couple of features that use old technology that cause hangs and poor performance. score is a good example of that. maybe the matrix is too. the score is being updated we assume with newer technology maybe the matrix will too.
    21. there are probably better ways of adjusting velocity than using matrix or hperdraw velocity. have you tried holding control-option and click dragging a note in score?
    22. as i pointed out in 20, this is an old feature. you could change things to be consistent with modern macs and annoy long term users such as myself, or leave them and let them be inconsistent to confuse newbies. i think depending on what it is we oldies could upgrade our work habits.
    23. this one doesn't worry me so much.
    24. good point (no pun intended).
    25. well, i find the opposite - that merging new parts to objects i have accidentally selected to be annoying. perhaps more detailed prefs?
    26. yep.
    27. this will be down to your audio settings. you can improve this lag but it will be dependant on the capabilities of your system.
    28. i don't know why this feature doesn't work in logic. it is supposed to have ti already and i just don't understand why it doesn't. maybe it will be fixed in the next upgrade.
    29. agreed.
    30. ok - i have other work flows for this but it would be nice.
    31. i don't agree that logic is a pain to score with to film, i do it nearly everyday. but you are discribing an interesting feature which might be worth discussing more. i think you might find yourself getting alarming and unmiscal results doing this that will end up having to be sorted out the conventional way. but its a good idea.
    32. oh yes.
    33. yeah - this could be improved.
    34. ok, well i wouldn't go about it this way, but yeah there is generally sticky spots with regards to updating of information al around logic.
    25. very very good idea.
    26. there are lots of problems with the chase function. very annoying. i certainly agree with this.
    in general, some of these could well be done as their own threads. some of the missing functionality may exist. if you can confirm a bug then you are on stronger ground when you submit feedback. but this list is full of fantastic ideas.

  • HELP!! asa 5505 8.4(5) problem with port forwarding-smtp

    Hi I am having a big problem with port forwarding on my asa. I am trying to forward smtp through the asa  to my mail server.
    my mail server ip is 10.0.0.2 and my outside interface is 80.80.80.80 , the ASA is setup with pppoe (I get internet access no problem and that seems fine)
    When I run a trace i get "(ACL-Drop) - flow is deied by configured rule"
    below is my config file , any help would be appreciated
    Result of the command: "show running-config"
    : Saved
    ASA Version 8.4(5)
    hostname ciscoasa
    domain-name domain.local
    enable password mXa5sNUu4rCZ.t5y encrypted
    passwd 2KFQnbNIdI.2KYOU encrypted
    names
    interface Ethernet0/0
    switchport access vlan 2
    interface Ethernet0/1
    interface Ethernet0/2
    interface Ethernet0/3
    interface Ethernet0/4
    interface Ethernet0/5
    interface Ethernet0/6
    interface Ethernet0/7
    interface Vlan1
    nameif inside
    security-level 100
    ip address 10.0.0.1 255.255.255.0
    interface Vlan2
    nameif outside
    security-level 0
    pppoe client vpdn group ISPDsl
    ip address 80.80.80.80 255.255.255.255 pppoe setroute
    ftp mode passive
    dns server-group DefaultDNS
    domain-name domain.local
    same-security-traffic permit intra-interface
    object network obj_any
    subnet 0.0.0.0 0.0.0.0
    object network Server_SMTP
    host 10.0.0.2
    access-list outside_access_in extended permit tcp any object server_SMTP eq smtp
    pager lines 24
    logging asdm informational
    mtu inside 1500
    mtu outside 1500
    icmp unreachable rate-limit 1 burst-size 1
    no asdm history enable
    arp timeout 14400
    no arp permit-nonconnected
    object network obj_any
    nat (inside,outside) dynamic interface
    object network server_SMTP
    nat (inside,outside) static interface service tcp smtp smtp
    nat (inside,outside) after-auto source dynamic any interface
    access-group outside_access_in in interface outside
    timeout xlate 3:00:00
    timeout pat-xlate 0:00:30
    timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02
    timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00
    timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00
    timeout sip-provisional-media 0:02:00 uauth 0:05:00 absolute
    timeout tcp-proxy-reassembly 0:01:00
    timeout floating-conn 0:00:00
    dynamic-access-policy-record DfltAccessPolicy
    user-identity default-domain LOCAL
    http server enable
    http 10.0.0.0 255.255.255.0 inside
    no snmp-server location
    no snmp-server contact
    snmp-server enable traps snmp authentication linkup linkdown coldstart warmstart
    telnet timeout 5
    ssh timeout 5
    ssh key-exchange group dh-group1-sha1
    console timeout 0
    vpdn group ISP request dialout pppoe
    vpdn group ISP localname [email protected]
    vpdn group ISP ppp authentication chap
    vpdn username [email protected] password *****
    dhcpd auto_config outside
    threat-detection basic-threat
    threat-detection statistics access-list
    no threat-detection statistics tcp-intercept
    webvpn
    class-map inspection_default
    match default-inspection-traffic
    policy-map type inspect dns preset_dns_map
    parameters
      message-length maximum client auto
      message-length maximum 512
    policy-map global_policy
    class inspection_default
      inspect dns preset_dns_map
      inspect ftp
      inspect h323 h225
      inspect h323 ras
      inspect rsh
      inspect rtsp
      inspect sqlnet
      inspect skinny 
      inspect sunrpc
      inspect xdmcp
      inspect sip 
      inspect netbios
      inspect tftp
      inspect ip-options
    service-policy global_policy global
    prompt hostname context
    no call-home reporting anonymous
    Cryptochecksum:c5570d7ddffd46c528a76e515e65f366
    : end

    Hi Jennifer
    I have removed that nat line as suggested but still no joy.
    here is my current config
    Result of the command: "show running-config"
    : Saved
    ASA Version 8.4(5)
    hostname ciscoasa
    domain-name domain.local
    enable password mXa5sNUu4rCZ.t5y encrypted
    passwd 2KFQnbNIdI.2KYOU encrypted
    names
    interface Ethernet0/0
    switchport access vlan 2
    interface Ethernet0/1
    interface Ethernet0/2
    interface Ethernet0/3
    interface Ethernet0/4
    interface Ethernet0/5
    interface Ethernet0/6
    interface Ethernet0/7
    interface Vlan1
    nameif inside
    security-level 100
    ip address 10.0.0.1 255.255.255.0
    interface Vlan2
    nameif outside
    security-level 0
    pppoe client vpdn group ISP
    ip address 80.80.80.80 255.255.255.255 pppoe setroute
    ftp mode passive
    dns server-group DefaultDNS
    domain-name domain.local
    same-security-traffic permit intra-interface
    object network obj_any
    subnet 0.0.0.0 0.0.0.0
    object network Server_Mail
    host 10.0.0.2
    access-list outside_access_in extended permit tcp any object Server_Mail eq smtp
    pager lines 24
    logging asdm informational
    mtu inside 1500
    mtu outside 1500
    icmp unreachable rate-limit 1 burst-size 1
    no asdm history enable
    arp timeout 14400
    no arp permit-nonconnected
    object network obj_any
    nat (inside,outside) dynamic interface
    object network Server_Mail
    nat (inside,outside) static interface service tcp smtp smtp
    access-group outside_access_in in interface outside
    timeout xlate 3:00:00
    timeout pat-xlate 0:00:30
    timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02
    timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00
    timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00
    timeout sip-provisional-media 0:02:00 uauth 0:05:00 absolute
    timeout tcp-proxy-reassembly 0:01:00
    timeout floating-conn 0:00:00
    dynamic-access-policy-record DfltAccessPolicy
    user-identity default-domain LOCAL
    http server enable
    http 10.0.0.0 255.255.255.0 inside
    no snmp-server location
    no snmp-server contact
    snmp-server enable traps snmp authentication linkup linkdown coldstart warmstart
    telnet timeout 5
    ssh timeout 5
    ssh key-exchange group dh-group1-sha1
    console timeout 0
    vpdn group ISP request dialout pppoe
    vpdn group ISP localname [email protected]
    vpdn group ISP ppp authentication chap
    vpdn username [email protected] password *****
    dhcpd auto_config outside
    threat-detection basic-threat
    threat-detection statistics access-list
    no threat-detection statistics tcp-intercept
    webvpn
    class-map inspection_default
    match default-inspection-traffic
    policy-map type inspect dns preset_dns_map
    parameters
      message-length maximum client auto
      message-length maximum 512
    policy-map global_policy
    class inspection_default
      inspect dns preset_dns_map
      inspect ftp
      inspect h323 h225
      inspect h323 ras
      inspect rsh
      inspect rtsp
      inspect esmtp
      inspect sqlnet
      inspect skinny 
      inspect sunrpc
      inspect xdmcp
      inspect sip 
      inspect netbios
      inspect tftp
      inspect ip-options
    service-policy global_policy global
    prompt hostname context
    no call-home reporting anonymous
    Cryptochecksum:f3bd954d1f9499595aab4f9da8c15795
    : end
    also here is the packet trace
    and my acl
    Thanks

  • Problem with writing and reading using serialization

    I am having a problem with writing and reading an object that has another object in it. The purpose of the class is to write a order that has multiple items in it. And there will be several orders. This is for an IB project, where one of the requirements is to utilize a hierarchical composite data structure. That is, it is "one that contains more than one element and at least one of the elements is a composite data structure. Examples are, an array or linked list of records, a record that has one field that is another record, or an array". The code is shown below:
    The error produced is
    java.lang.NullPointerException
         at SamsonRubberIndustries.CustomerOrderDetails.createCustOrdDetailsScreen(CustomerOrderDetails.java:150)
         at SamsonRubberIndustries.CustomerOrderDetails$1.run(CustomerOrderDetails.java:78)
         at java.awt.event.InvocationEvent.dispatch(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    public class CustOrdObject implements Serializable {
         public int CustID;
         public int CustOrderID;
         public Object OrderDate;
         public InnerCustOrdObject[] innerCustOrdObj;
         public float GrandTotal;
         public int MaxItems;
         public CustOrdObject() {}
         public CustOrdObject(InnerCustOrdObject[] innerCustOrdObj,
    int CustID, int CustOrderID, Object OrderDate,
    float GrandTotal, int innerarrlength, int innerarrpos, int MaxItems) {
              this.CustID = CustID;
              this.CustOrderID = CustOrderID;
              this.OrderDate = OrderDate;
              this.GrandTotal = GrandTotal;          
              this.MaxItems = MaxItems;
              this.innerCustOrdObj = new InnerCustOrdObject[MaxItems];
         public InnerCustOrdObject[] getInnerCustOrdObj() {
              return innerCustOrdObj;
         public void setInnerCustOrdObj(InnerCustOrdObject[] innerCustOrdObj) {
              this.innerCustOrdObj = innerCustOrdObj;
         public int getCustID() {
              return CustID;
         public void setCustID(int custID) {
              CustID = custID;
         public int getCustOrderID() {
              return CustOrderID;
         public void setCustOrderID(int custOrderID) {
              CustOrderID = custOrderID;
         public Object getOrderDate() {
              return OrderDate;
         public void setOrderDate(Object orderDate) {
              OrderDate = orderDate;
         public void setGrandTotal(float grandTotal) {
              GrandTotal = grandTotal;
         public float getGrandTotal() {
              return GrandTotal;
         public int getMaxItems() {
              return MaxItems;
         public void setMaxItems(int maxItems) {
              MaxItems = maxItems;
    public class InnerCustOrdObject implements Serializable{
         public int ItemNumber;
         public float UnitPrice;
         public int QuantityRequired;
         public float TotalPrice;
         public InnerCustOrdObject() {}
         public InnerCustOrdObject(int ItemNumber, float
    UnitPrice, int QuantityRequired, float TotalPrice){
              this.ItemNumber = ItemNumber;
              this.UnitPrice = UnitPrice;
              this.QuantityRequired = QuantityRequired;
              this.TotalPrice = TotalPrice;
         public int getItemNumber() {
              return ItemNumber;
         public void setItemNumber(int itemNumber) {
              ItemNumber = itemNumber;
         public int getQuantityRequired() {
              return QuantityRequired;
         public void setQuantityRequired(int quantityRequired) {
              QuantityRequired = quantityRequired;
         public float getTotalPrice() {
              return TotalPrice;
         public void setTotalPrice(float totalPrice) {
              TotalPrice = totalPrice;
         public float getUnitPrice() {
              return UnitPrice;
         public void setUnitPrice(float unitPrice) {
              UnitPrice = unitPrice;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    import javax.swing.*;
    import javax.swing.table.DefaultTableCellRenderer;
    import javax.swing.table.DefaultTableModel;
    public class CustomerOrderDetails extends CommonFeatures{
         //TODO
         private static int MAX_ORDERS = 200;
         private static int MAX_ORDERITEMS = 100;
         private static int MaxRecord;
         private static int CurrentRecord = 1;
         private static int currentItem;
         private static int MaxItems;
         private static boolean FileExists, recFileExists;
         private static CustOrdObject[] orderDetails = new CustOrdObject[MAX_ORDERS];
         private static InnerCustOrdObject[] innerCustOrdObj = new InnerCustOrdObject[MAX_ORDERITEMS];     
         private static File OrderDetailsFile = new File("CustOrdDetails.dat");
         private static File OrdRecordNumStore = new File("OrdRecordNumStore.txt");
         private static PrintWriter writeFile;
         private static BufferedReader readFile;
         private static ObjectOutputStream objOut;
         private static ObjectInputStream objIn;
         //Set format for date
         SimpleDateFormat simpleDF = new SimpleDateFormat("dd MM yyyy");
         //--<BEGINNING>--Declaring Interface Variables------------------------------------------//
         private JPanel innertoppanel, innercenterpanel, innerbottompanel, innerrightpanel, innerleftpanel;
         private JLabel CustIDLbl, CustOrderIDLbl, OrderedDateLbl, GrandTotLbl, ItemNumberLbl,UnitPriceLbl, QuantityReqLbl, TotPriceLbl;
         private JTextField CustIDTxt, CustOrderIDTxt, OrderedDateTxt, GrandTotTxt, ItemNumberTxt, UnitPriceTxt, QuantityReqTxt, TotPriceTxt;
         private JButton addrecordbtn, savebtn, externalprevbtn, externalnextbtn, internalprevbtn, internalnextbtn, gotorecordbtn, additemreqbtn;
         //--<END>--Declaring Interface Variables------------------------------------------------//
         public static void main(String[] args) {
              final CustomerOrderDetails COD = new CustomerOrderDetails();
              java.awt.EventQueue.invokeLater(new Runnable() {
                   public void run() {
                        try {
                             UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
                             COD.createCustOrdDetailsScreen();
                        } catch (Exception eb) {
                             eb.printStackTrace();
         //--<BEGINNING>--Creating CustomerOrderDetails Screen---------------------------------------//
         public JFrame createCustOrdDetailsScreen() {
              createDefaultFrame();
              mainframe.setSize(800,500);
              createContainerPanel();
              containerpanel.add(createCustOrdDetailsTitle(), BorderLayout.NORTH);
              containerpanel.add(createCustOrdDetailsMainPanel(), BorderLayout.CENTER);
              //containerpanel.add(createCustOrdDetailsLeftNavButtons(), BorderLayout.WEST);
              //containerpanel.add(createCustOrdDetailsRightNavButtons(), BorderLayout.EAST);
              containerpanel.add(createCustOrdDetailsButtons(), BorderLayout.SOUTH);
              mainframe.setContentPane(containerpanel);
              mainframe.setLocationRelativeTo(null);
              mainframe.setVisible(true);
              //--<BEGINNING>--Checks to see whether CRecordNumberStore file exists-------------------------------//
              if (OrdRecordNumStore.exists() == true) {
                   recFileExists = true;
              }else {
                   recFileExists = false;
              if (recFileExists == true) {
                   MaxRecord = readRecordNumber();
                   CurrentRecord = MaxRecord;
                   //readOrder();
                   //readInnerOrderRecord(CurrentRecord);
                   System.out.println("Current Record " +CurrentRecord);
                   System.out.println("Max Record " +MaxRecord);
              }else{
                   MaxRecord = 1;
                   writeRecordNumber(MaxRecord);
                   CustOrderIDTxt.setText(""+MaxRecord);
                   System.out.println("Current Record " +CurrentRecord);
                   System.out.println("Max Record " +MaxRecord);
              //--<END>--Checks to see whether CRecordNumberStore file exists--------------------------------------//
              if(readOrder() != null){
                   orderDetails = (CustOrdObject[]) readOrder();
                 innerCustOrdObj = orderDetails[CurrentRecord].getInnerCustOrdObj();
                   MaxItems = orderDetails[CurrentRecord].getMaxItems();
                   if(CurrentRecord > 1 && CurrentRecord < MaxRecord){
                        externalnextbtn.setEnabled(true);
                        externalprevbtn.setEnabled(true);
                   if(CurrentRecord >= MaxRecord){
                        externalnextbtn.setEnabled(false);
                   getFieldText(CurrentRecord-1);
              }else{
                   orderDetails[CurrentRecord] = new CustOrdObject();
                   currentItem = 1;
              return mainframe;
         //--<END>--Creating CustomerOrderDetails Screen---------------------------------------------//
         public JPanel createCustOrdDetailsTitle(){
              createTitlePanel();
              titlepanel.setBackground(TxtfontColor);
              label.setText("- Customer Order Details -");
              labelpanel.setBackground(TxtfontColor);
              label.setForeground(Color.white);
              createbuttonpanel();
              buttonpanel.setBackground(TxtfontColor) ;
              buttonpanel.add(createReturnToMainMenuButton());
              titlepanel.add(labelpanel, BorderLayout.WEST);
              titlepanel.add(buttonpanel, BorderLayout.EAST);
              return titlepanel;
         public JPanel createCustOrdDetailsMainPanel(){
              createmainpanel();
              mainpanel.setBackground(TxtfontColor);
              mainpanel.setLayout(new BorderLayout());          
              mainpanel.setBorder(BorderFactory.createTitledBorder(""));
              mainpanel.add(createInnerTopPanel(), BorderLayout.NORTH);
              mainpanel.add(createInnerCenterPanel(), BorderLayout.CENTER);
              mainpanel.add(createInnerBottomPanel(), BorderLayout.SOUTH);
              mainpanel.add(createInnerRightPanel(), BorderLayout.EAST);
              mainpanel.add(createInnerLeftPanel(), BorderLayout.WEST);
              return mainpanel;
         public JPanel createInnerTopPanel(){
              innertoppanel = new JPanel(new GridBagLayout());
              innertoppanel.setBackground(TxtfontColor);
              GridBagConstraints GBC = new GridBagConstraints();
              GBC.fill = GridBagConstraints.HORIZONTAL;
              //Setting Font Type and Size
              Font font = new Font("Arial", Font.BOLD, 11);
              CustIDLbl = new JLabel("Customer ID");
              CustIDLbl.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
              CustIDLbl.setFont(font);
              CustIDLbl.setForeground(LblfontColor);
              GBC.gridx = 1;
              GBC.gridy = 1;
              innertoppanel.add(CustIDLbl, GBC);     
              CustIDTxt = new JTextField(20);
              CustIDTxt.setEditable(true);
              GBC.gridx = 2;
              GBC.gridy = 1;
              innertoppanel.add(CustIDTxt, GBC);
              GBC.gridx = 3;
              GBC.gridy = 1;
              innertoppanel.add(Box.createHorizontalStrut(220), GBC);
              OrderedDateLbl = new JLabel("Order Date");
              OrderedDateLbl.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
              OrderedDateLbl.setFont(font);
              OrderedDateLbl.setForeground(LblfontColor);
              GBC.gridx = 4;
              GBC.gridy = 1;
              innertoppanel.add(OrderedDateLbl, GBC);     
              //Get today's date
              Date todaydate = new Date();
              OrderedDateTxt = new JTextField(simpleDF.format(todaydate), 20);
              OrderedDateTxt.setHorizontalAlignment(JTextField.CENTER);
              OrderedDateTxt.setEditable(false);
              GBC.gridx = 5;
              GBC.gridy = 1;
              innertoppanel.add(OrderedDateTxt, GBC);
              CustOrderIDLbl = new JLabel("Customer Order ID");
              CustOrderIDLbl.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
              CustOrderIDLbl.setFont(font);
              CustOrderIDLbl.setForeground(LblfontColor);
              GBC.gridx = 1;
              GBC.gridy = 2;
              innertoppanel.add(CustOrderIDLbl, GBC);
              CustOrderIDTxt = new JTextField(20);
              CustOrderIDTxt.setEditable(false);
              GBC.gridx = 2;
              GBC.gridy = 2;
              innertoppanel.add(CustOrderIDTxt, GBC);
              return innertoppanel;
         public JPanel createInnerCenterPanel(){
              innercenterpanel = new JPanel(new GridBagLayout());
              innercenterpanel.setBackground(TxtfontColor);
              innercenterpanel.setBorder(BorderFactory.createLoweredBevelBorder());
              GridBagConstraints GBC = new GridBagConstraints();
              GBC.fill = GridBagConstraints.HORIZONTAL;
              //Setting Font Type and Size
              Font font = new Font("Arial", Font.BOLD, 11);
              ItemNumberLbl = new JLabel("Item Number");
              ItemNumberLbl.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
              ItemNumberLbl.setFont(font);
              ItemNumberLbl.setForeground(LblfontColor);
              GBC.gridx = 1;
              GBC.gridy = 1;
              innercenterpanel.add(ItemNumberLbl, GBC);     
              ItemNumberTxt = new JTextField(20);
              GBC.gridx = 2;
              GBC.gridy = 1;
              innercenterpanel.add(ItemNumberTxt, GBC);
              UnitPriceLbl = new JLabel("Unit Price");
              UnitPriceLbl.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
              UnitPriceLbl.setFont(font);
              UnitPriceLbl.setForeground(LblfontColor);
              GBC.gridx = 1;
              GBC.gridy = 2;
              innercenterpanel.add(UnitPriceLbl, GBC);     
              UnitPriceTxt = new JTextField(20);
              //UnitPriceTxt.setEditable(false);
              GBC.gridx = 2;
              GBC.gridy = 2;
              innercenterpanel.add(UnitPriceTxt, GBC);
              QuantityReqLbl = new JLabel("Quantity Required");
              QuantityReqLbl.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
              QuantityReqLbl.setFont(font);
              QuantityReqLbl.setForeground(LblfontColor);
              GBC.gridx = 1;
              GBC.gridy = 3;
              innercenterpanel.add(QuantityReqLbl, GBC);     
              QuantityReqTxt = new JTextField(20);
              //QuantityReqTxt.setEditable(false);
              GBC.gridx = 2;
              GBC.gridy = 3;
              innercenterpanel.add(QuantityReqTxt, GBC);
              TotPriceLbl = new JLabel("Total Price");
              TotPriceLbl.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
              TotPriceLbl.setFont(font);
              TotPriceLbl.setForeground(LblfontColor);
              GBC.gridx = 1;
              GBC.gridy = 4;
              innercenterpanel.add(TotPriceLbl, GBC);     
              TotPriceTxt = new JTextField(20);
              //TotPriceTxt.setEditable(false);
              GBC.gridx = 2;
              GBC.gridy = 4;
              innercenterpanel.add(TotPriceTxt, GBC);
              return innercenterpanel;
         public JPanel createInnerBottomPanel(){
              innerbottompanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));
              innerbottompanel.setBackground(TxtfontColor);
              //Setting Font Type and Size
              Font font = new Font("Arial", Font.BOLD, 11);
              GrandTotLbl = new JLabel("Grand Total");
              GrandTotLbl.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
              GrandTotLbl.setFont(font);
              GrandTotLbl.setForeground(LblfontColor);
              innerbottompanel.add(GrandTotLbl);
              innerbottompanel.add(Box.createHorizontalStrut(30));
              GrandTotTxt = new JTextField(20);
              innerbottompanel.add(GrandTotTxt);
              return innerbottompanel;
         public JPanel createInnerRightPanel(){
              innerrightpanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
              innerrightpanel.setBackground(TxtfontColor);
              innerrightpanel.setLayout(new BoxLayout(navrightpanel, BoxLayout.Y_AXIS));
              innerrightpanel.setBorder(BorderFactory.createLoweredBevelBorder());
              innerrightpanel.setLayout(new GridBagLayout());          
              GridBagConstraints GBC = new GridBagConstraints();
              GBC.fill = GridBagConstraints.HORIZONTAL;
              internalnextbtn = new JButton(createNextButtonIcon());
              GBC.gridx = 1;
              GBC.gridy = 1;
              internalnextbtn.addActionListener(new ActionListener(){
                   public void actionPerformed(ActionEvent evt){
                        //getInnerFieldText(currentItem);
                        internalprevbtn.setEnabled(true);
                        if(currentItem < MaxItems){
                             ++CurrentRecord;
                             //readOrder();
                             //readInnerOrderRecord(CurrentRecord);
                             setInnerFieldText(currentItem);
                             System.out.println(CurrentRecord);//Checking RECORD_NUM
                        if(currentItem == MaxItems){
                             internalnextbtn.setEnabled(false);
              innerrightpanel.add(internalnextbtn, GBC);
              return innerrightpanel;
         public JPanel createInnerLeftPanel(){
              innerleftpanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
              innerleftpanel.setBackground(TxtfontColor);
              innerleftpanel.setBorder(BorderFactory.createLoweredBevelBorder());
              innerleftpanel.setForeground(Color.BLACK);
              innerleftpanel.setLayout(new GridBagLayout());          
              GridBagConstraints GBC = new GridBagConstraints();
              GBC.fill = GridBagConstraints.HORIZONTAL;
              internalprevbtn = new JButton(createPreviousButtonIcon());
              GBC.gridx = 1;
              GBC.gridy = 1;
              internalprevbtn.addActionListener(new ActionListener(){
                   public void  actionPerformed(ActionEvent evt){
                        //getInnerFieldText(currentItem);
                        internalnextbtn.setEnabled(true);
                        if(currentItem == 1){
                             internalprevbtn.setEnabled(false);
                        if(currentItem > 0){
                             --currentItem;
                             //readOrder();
                             setInnerFieldText(currentItem);
              innerleftpanel.add(internalprevbtn, GBC);
              return innerleftpanel;
         public JPanel createCustOrdDetailsButtons(){
              createbuttonpanel();
              buttonpanel.setBackground(TxtfontColor);
              externalprevbtn = new JButton(createPreviousButtonIcon());
              externalprevbtn.addActionListener(new ActionListener(){
                   public void  actionPerformed(ActionEvent evt){
                        getFieldText(CurrentRecord);
                        externalnextbtn.setEnabled(true);
                        if(CurrentRecord == 1){
                             externalprevbtn.setEnabled(false);
                        if(CurrentRecord > 0){
                             --CurrentRecord;
                             setFieldText(CurrentRecord);
                             System.out.println(CurrentRecord);//Checking RECORD_NUM
              buttonpanel.add(externalprevbtn);
              addrecordbtn = new JButton("Add Record", createAddButtonIcon());
              addrecordbtn.addActionListener(new ActionListener(){
                   public void actionPerformed(ActionEvent evt){
                        try{
                             MaxRecord = readRecordNumber();
                             MaxRecord++;
                             writeRecordNumber(MaxRecord);
                             //--<BEGINNING>--Clear Fields-------------------------------------------------------//
                             CustIDTxt.setText("");
                             CustOrderIDTxt.setText(""+MaxRecord);
                             //Get today's date
                             Date todaydate = new Date();
                             OrderedDateTxt.setText(""+simpleDF.format(todaydate));
                             ItemNumberTxt.setText("");
                             UnitPriceTxt.setText("");
                             QuantityReqTxt.setText("");
                             TotPriceTxt.setText("");
                             GrandTotTxt.setText("");
                             //--<END>--Clear Fields-------------------------------------------------------------//
                             externalnextbtn.setEnabled(false);
                             externalprevbtn.setEnabled(true);
                             System.out.println(MaxRecord);
                        } catch(Exception ec){ec.printStackTrace();}
              buttonpanel.add(addrecordbtn);
              savebtn = new JButton("Save Data", createSaveButtonIcon());
              savebtn.addActionListener(new ActionListener(){
                   public void actionPerformed(ActionEvent evt){
                        setFieldText(CurrentRecord);
                        writeOrder();
                        writeRecordNumber(MaxRecord);
                        System.out.println(CurrentRecord);
                        System.out.println(MaxRecord);
              buttonpanel.add(savebtn);
              java.net.URL imageURL_AddRowIcon = CommonFeatures.class.getResource("Icons/edit_add.png");
              ImageIcon AddRowIcon = new ImageIcon(imageURL_AddRowIcon);
              additemreqbtn = new JButton("Add Item", AddRowIcon);
              additemreqbtn.addActionListener(new ActionListener(){
                   public void actionPerformed(ActionEvent evt){
                        try{
                             //--<BEGINNING>--Clear Fields-------------------------------------------------------//
                             ItemNumberTxt.setText("");
                             UnitPriceTxt.setText("");
                             QuantityReqTxt.setText("");
                             TotPriceTxt.setText("");
                             //--<END>--Clear Fields-------------------------------------------------------------//
                             //CurrentRecord = MaxRecord;
                             currentItem++;
                             setInnerFieldText(currentItem);
                             internalnextbtn.setEnabled(false);
                             internalprevbtn.setEnabled(true);
                             System.out.println(MaxRecord);
                        } catch(Exception ec){ec.printStackTrace();}
              buttonpanel.add(additemreqbtn);
              externalnextbtn = new JButton(createNextButtonIcon());
              externalnextbtn.addActionListener(new ActionListener(){
                   public void actionPerformed(ActionEvent evt){
                        getFieldText(CurrentRecord);
                        externalprevbtn.setEnabled(true);
                        if(CurrentRecord < MaxRecord){
                             ++CurrentRecord;
                             setFieldText(CurrentRecord);
                             System.out.println(CurrentRecord);//Checking RECORD_NUM
                        if(CurrentRecord == MaxRecord){
                             externalnextbtn.setEnabled(false);
              buttonpanel.add(externalnextbtn);
              return buttonpanel;
         //TODO
         public void setFieldText(int orderID){//TODO
              orderDetails[orderID].setCustID(Integer.parseInt(CustIDTxt.getText()));
              orderDetails[orderID].setCustOrderID(Integer.parseInt(CustOrderIDTxt.getText()));
              orderDetails[orderID].setOrderDate(OrderedDateTxt.getText());
              orderDetails[orderID].setInnerCustOrdObj(innerCustOrdObj);
              orderDetails[orderID].setMaxItems(MaxItems);
              setInnerFieldText(currentItem);
              orderDetails[orderID].setGrandTotal(Float.parseFloat(GrandTotTxt.getText()));
         public void setInnerFieldText(int currentItem){//TODO
              innerCustOrdObj[currentItem] = new InnerCustOrdObject();
              innerCustOrdObj[currentItem].setItemNumber(Integer.parseInt(ItemNumberTxt.getText()));
              innerCustOrdObj[currentItem].setUnitPrice(Float.parseFloat(UnitPriceTxt.getText()));
              innerCustOrdObj[currentItem].setQuantityRequired(Integer.parseInt(QuantityReqTxt.getText()));
              innerCustOrdObj[currentItem].setTotalPrice(Float.parseFloat(TotPriceTxt.getText()));
         public void getFieldText(int orderID){
              CustIDTxt.setText(Integer.toString(orderDetails[orderID].getCustID()));
              CustOrderIDTxt.setText(Integer.toString(orderDetails[orderID].getCustOrderID()));
              OrderedDateTxt.setText(""+orderDetails[orderID].getOrderDate());          
              currentItem = orderDetails[orderID].getMaxItems();
              System.err.println("currentItem" + currentItem);
              getInnerFieldText(currentItem);
              GrandTotTxt.setText(Float.toString(orderDetails[orderID].getGrandTotal()));
         public void getInnerFieldText(int currentItem){
              ItemNumberTxt.setText(Integer.toString(innerCustOrdObj[currentItem].getItemNumber()));
              UnitPriceTxt.setText(Float.toString(innerCustOrdObj[currentItem].getUnitPrice()));
              QuantityReqTxt.setText(Integer.toString(innerCustOrdObj[currentItem].getQuantityRequired()));
              TotPriceTxt.setText(Float.toString(innerCustOrdObj[currentItem].getTotalPrice()));
         public void writeOrder(){//TODO
              try {
                   objOut = new ObjectOutputStream(new FileOutputStream(OrderDetailsFile));
                   objOut.writeObject(orderDetails);
                   System.out.println("WORKING!");
                   objOut.flush();
                   objOut.close();
              } catch (IOException e) {
                   e.printStackTrace();
         public Object readOrder(){
              Object temporaryObj;
              try{
                   objIn = new ObjectInputStream(new FileInputStream(OrderDetailsFile));
                   temporaryObj = objIn.readObject();               
                   CustOrdObject[] blah = (CustOrdObject[]) temporaryObj;
                   System.out.println("Outer: "+blah[1].getCustID());
                   InnerCustOrdObject[] whee = blah[1].getInnerCustOrdObj();
                   System.out.println("Inner: "+whee[1].getItemNumber());
                   objIn.close();
                   System.out.println("Read Worky!");
                   return temporaryObj;
              }catch(Exception e){
                   e.printStackTrace();
                   System.out.println("Read No Worky!");
                   return null;
         public void writeRecordNumber(int MaxRecord){
              try{
                   objOut = new ObjectOutputStream(new FileOutputStream(OrdRecordNumStore));
                   objOut.writeObject(MaxRecord);
                   System.out.println("WORKING!");
                   objOut.flush();
                   objOut.close();
              }catch(Exception e){e.printStackTrace();}
         public int readRecordNumber() {
              try {
                   objIn = new ObjectInputStream(new FileInputStream(OrdRecordNumStore));
                   int temporaryObj = Integer.parseInt(objIn.readObject().toString());
                   objIn.close();
                   System.out.println("Read Number Worky!");
                   return temporaryObj;
              } catch (Exception e) {
                   e.printStackTrace();
                   System.out.println("Read Number No Worky!");
                   return -1;
    }Message was edited by:
    Kilik07
    Message was edited by:
    Kilik07

    ok i got reading to work to a certain extent... but the prob is i cnt seem to save my innerCustOrdObj proprly...when ever i look for a record using the gotorecordbtn, the outerobject, which is the orderDetails, seems to change but the innerCustOrdObj remains the same... heres the new code..
    public class CustomerOrderDetails extends CommonFeatures{
         //TODO
         private static int MAX_ORDERS = 200;
         private static int MAX_ORDERITEMS = 100;
         private static int MaxRecord;
         private static int CurrentRecord = 1;
         private static int currentItem;
         private static int MaxItems = 1;
         private static boolean FileExists, recFileExists;
         private static boolean RecordExists;
         private static CustOrdObject[] orderDetails = new CustOrdObject[MAX_ORDERS];
         private static InnerCustOrdObject[] innerCustOrdObj = new InnerCustOrdObject[MAX_ORDERITEMS];     
         private static File OrderDetailsFile = new File("CustOrdDetails.ser");
         private static File OrdRecordNumStore = new File("OrdRecordNumStore.txt");
         private static PrintWriter writeFile;
         private static BufferedReader readFile;
         private static ObjectOutputStream objOut;
         private static ObjectInputStream objIn;
         //Set format for date
         SimpleDateFormat simpleDF = new SimpleDateFormat("dd MM yyyy");
         //--<BEGINNING>--Declaring Interface Variables------------------------------------------//
         private JPanel innertoppanel, innercenterpanel, innerbottompanel, innerrightpanel, innerleftpanel;
         private JLabel CustIDLbl, CustOrderIDLbl, OrderedDateLbl, GrandTotLbl, ItemNumberLbl,UnitPriceLbl, QuantityReqLbl, TotPriceLbl;
         private JTextField CustIDTxt, CustOrderIDTxt, OrderedDateTxt, GrandTotTxt, ItemNumberTxt, UnitPriceTxt, QuantityReqTxt, TotPriceTxt;
         private JButton addrecordbtn, savebtn, externalprevbtn, externalnextbtn, internalprevbtn, internalnextbtn, gotorecordbtn, additemreqbtn;
         //--<END>--Declaring Interface Variables------------------------------------------------//
         public static void main(String[] args) {
              final CustomerOrderDetails COD = new CustomerOrderDetails();
              java.awt.EventQueue.invokeLater(new Runnable() {
                   public void run() {
                        try {
                             UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
                             COD.createCustOrdDetailsScreen();
                        } catch (Exception eb) {
                             eb.printStackTrace();
         //--<BEGINNING>--Creating CustomerOrderDetails Screen---------------------------------------//
         public JFrame createCustOrdDetailsScreen() {
              createDefaultFrame();
              mainframe.setSize(800,500);
              createContainerPanel();
              containerpanel.add(createCustOrdDetailsTitle(), BorderLayout.NORTH);
              containerpanel.add(createCustOrdDetailsMainPanel(), BorderLayout.CENTER);
              //containerpanel.add(createCustOrdDetailsLeftNavButtons(), BorderLayout.WEST);
              //containerpanel.add(createCustOrdDetailsRightNavButtons(), BorderLayout.EAST);
              containerpanel.add(createCustOrdDetailsButtons(), BorderLayout.SOUTH);
              mainframe.setContentPane(containerpanel);
              mainframe.setLocationRelativeTo(null);
              mainframe.setVisible(true);
              //--<BEGINNING>--Checks to see whether CRecordNumberStore file exists-------------------------------//
              if (OrdRecordNumStore.exists() == true) {
                   recFileExists = true;
              }else {
                   recFileExists = false;
              if (recFileExists == true) {
                   MaxRecord = readRecordNumber();
                   CurrentRecord = MaxRecord;
                   //readOrder();
                   //readInnerOrderRecord(CurrentRecord);
                   System.out.println("Current Record " +CurrentRecord);
                   System.out.println("Max Record " +MaxRecord);
              }else{
                   MaxRecord = 1;
                   writeRecordNumber(MaxRecord);
                   CustOrderIDTxt.setText(""+MaxRecord);
                   System.out.println("Current Record " +CurrentRecord);
                   System.out.println("Max Record " +MaxRecord);
              //--<END>--Checks to see whether CRecordNumberStore file exists--------------------------------------//
              if(readOrder() != null){
                   orderDetails = (CustOrdObject[]) readOrder();
                   //CurrentRecord--;
                   //System.out.println("Current Rec Here"+CurrentRecord);
                   if(orderDetails[CurrentRecord] == null){
                        System.err.println("CustomerOrderObj 1 is null !!");
                   }else{
                        System.err.println("CustomerOrderObj 1 is  not null !!");
                   if(orderDetails[CurrentRecord].getInnerCustOrdObj() == null){
                        System.err.println("InnerCustomerOrderObj is null !!");
                   }else{
                        System.err.println("InnerCustomerOrderObj is  not null !!");
                   innerCustOrdObj = orderDetails[CurrentRecord].getInnerCustOrdObj();
                   MaxItems = orderDetails[CurrentRecord].getMaxItems();
                   if(CurrentRecord > 1 && CurrentRecord < MaxRecord){
                        externalnextbtn.setEnabled(true);
                        externalprevbtn.setEnabled(true);
                   if(CurrentRecord >= MaxRecord){
                        externalnextbtn.setEnabled(false);
                   getFieldText(CurrentRecord);
                   getInnerFieldText(MaxItems);
              }else{
                   orderDetails[CurrentRecord] = new CustOrdObject();
                   currentItem = 1;
              return mainframe;
         //--<END>--Creating CustomerOrderDetails Screen---------------------------------------------//
         public JPanel createCustOrdDetailsTitle(){
              createTitlePanel();
              titlepanel.setBackground(TxtfontColor);
              label.setText("- Customer Order Details -");
              labelpanel.setBackground(TxtfontColor);
              label.setForeground(Color.white);
              createbuttonpanel();
              buttonpanel.setBackground(TxtfontColor) ;
              buttonpanel.add(createReturnToMainMenuButton());
              titlepanel.add(labelpanel, BorderLayout.WEST);
              titlepanel.add(buttonpanel, BorderLayout.EAST);
              return titlepanel;
         public JPanel createCustOrdDetailsMainPanel(){
              createmainpanel();
              mainpanel.setBackground(TxtfontColor);
              mainpanel.setLayout(new BorderLayout());          
              mainpanel.setBorder(BorderFactory.createTitledBorder(""));
              mainpanel.add(createInnerTopPanel(), BorderLayout.NORTH);
              mainpanel.add(createInnerCenterPanel(), BorderLayout.CENTER);
              mainpanel.add(createInnerBottomPanel(), BorderLayout.SOUTH);
              mainpanel.add(createInnerRightPanel(), BorderLayout.EAST);
              mainpanel.add(createInnerLeftPanel(), BorderLayout.WEST);
              return mainpanel;
         public JPanel createInnerTopPanel(){
              innertoppanel = new JPanel(new GridBagLayout());
              innertoppanel.setBackground(TxtfontColor);
              GridBagConstraints GBC = new GridBagConstraints();
              GBC.fill = GridBagConstraints.HORIZONTAL;
              //Setting Font Type and Size
              Font font = new Font("Arial", Font.BOLD, 11);
              CustIDLbl = new JLabel("Customer ID");
              CustIDLbl.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
              CustIDLbl.setFont(font);
              CustIDLbl.setForeground(LblfontColor);
              GBC.gridx = 1;
              GBC.gridy = 1;
              innertoppanel.add(CustIDLbl, GBC);     
              CustIDTxt = new JTextField(20);
              CustIDTxt.setEditable(true);
              GBC.gridx = 2;
              GBC.gridy = 1;
              innertoppanel.add(CustIDTxt, GBC);
              GBC.gridx = 3;
              GBC.gridy = 1;
              innertoppanel.add(Box.createHorizontalStrut(220), GBC);
              OrderedDateLbl = new JLabel("Order Date");
              OrderedDateLbl.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
              OrderedDateLbl.setFont(font);
              OrderedDateLbl.setForeground(LblfontColor);
              GBC.gridx = 4;
              GBC.gridy = 1;
              innertoppanel.add(OrderedDateLbl, GBC);     
              //Get today's date
              Date todaydate = new Date();
              OrderedDateTxt = new JTextField(simpleDF.format(todaydate), 20);
              OrderedDateTxt.setHorizontalAlignment(JTextField.CENTER);
              OrderedDateTxt.setEditable(false);
              GBC.gridx = 5;
              GBC.gridy = 1;
              innertoppanel.add(OrderedDateTxt, GBC);
              CustOrderIDLbl = new JLabel("Customer Order ID");
              CustOrderIDLbl.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
              CustOrderIDLbl.setFont(font);
              CustOrderIDLbl.setForeground(LblfontColor);
              GBC.gridx = 1;
              GBC.gridy = 2;
              innertoppanel.add(CustOrderIDLbl, GBC);
              CustOrderIDTxt = new JTextField(20);
              //CustOrderIDTxt.setEditable(false);
              GBC.gridx = 2;
              GBC.gridy = 2;
              innertoppanel.add(CustOrderIDTxt, GBC);
              return innertoppanel;
         public JPanel createInnerCenterPanel(){
              innercenterpanel = new JPanel(new GridBagLayout());
              innercenterpanel.setBackground(TxtfontColor);
              innercenterpanel.setBorder(BorderFactory.createLoweredBevelBorder());
              GridBagConstraints GBC = new GridBagConstraints();
              GBC.fill = GridBagConstraints.HORIZONTAL;
              //Setting Font Type and Size
              Font font = new Font("Arial", Font.BOLD, 11);
              ItemNumberLbl = new JLabel("Item Number");
              ItemNumberLbl.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
              ItemNumberLbl.setFont(font);
              ItemNumberLbl.setForeground(LblfontColor);
              GBC.gridx = 1;
              GBC.gridy = 1;
              innercenterpanel.add(ItemNumberLbl, GBC);     
              ItemNumberTxt = new JTextField(20);
              GBC.gridx = 2;
              GBC.gridy = 1;
              innercenterpanel.add(ItemNumberTxt, GBC);
              UnitPriceLbl = new JLabel("Unit Price");
              UnitPriceLbl.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
              UnitPriceLbl.setFont(font);
              UnitPriceLbl.setForeground(LblfontColor);
              GBC.gridx = 1;
              GBC.gridy = 2;
              innercenterpanel.add(UnitPriceLbl, GBC);     
              UnitPriceTxt = new JTextField(20);
              //UnitPriceTxt.setEditable(false);
              GBC.gridx = 2;
              GBC.gridy = 2;
              innercenterpanel.add(UnitPriceTxt, GBC);
              QuantityReqLbl = new JLabel("Quantity Required");
              QuantityReqLbl.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
              QuantityReqLbl.setFont(font);
              QuantityReqLbl.setForeground(LblfontColor);
              GBC.gridx = 1;
              GBC.gridy = 3;
              innercenterpanel.add(QuantityReqLbl, GBC);     
              QuantityReqTxt = new JTextField(20);
              //QuantityReqTxt.setEditable(false);
              GBC.gridx = 2;
              GBC.gridy = 3;
              innercenterpanel.add(QuantityReqTxt, GBC);
              TotPriceLbl = new JLabel("Total Price");
              TotPriceLbl.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
              TotPriceLbl.setFont(font);
              TotPriceLbl.setForeground(LblfontColor);
              GBC.gridx = 1;
              GBC.gridy = 4;
              innercenterpanel.add(TotPriceLbl, GBC);     
              TotPriceTxt = new JTextField(20);
              TotPriceTxt.setEditable(false);
              TotPriceTxt.addFocusListener(new FocusAdapter(){
                   public void focusGained(FocusEvent evt){
                        TotPriceTxt.setText(""+Integer.parseInt(UnitPriceTxt.getText())*Integer.parseInt(QuantityReqTxt.getText()));
              GBC.gridx = 2;
              GBC.gridy = 4;
              innercenterpanel.add(TotPriceTxt, GBC);
              return innercenterpanel;
         public JPanel createInnerBottomPanel(){
              innerbottompanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));
              innerbottompanel.setBackground(TxtfontColor);
              //Setting Font Type and Size
              Font font = new Font("Arial", Font.BOLD, 11);
              GrandTotLbl = new JLabel("Grand Total");
              GrandTotLbl.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
              GrandTotLbl.setFont(font);
              GrandTotLbl.setForeground(LblfontColor);
              innerbottompanel.add(GrandTotLbl);
              innerbottompanel.add(Box.createHorizontalStrut(30));
              GrandTotTxt = new JTextField(20);
              innerbottompanel.add(GrandTotTxt);
              return innerbottompanel;
         public JPanel createInnerRightPanel(){
              innerrightpanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
              innerrightpanel.setBackground(TxtfontColor);
              innerrightpanel.setLayout(new BoxLayout(navrightpanel, BoxLayout.Y_AXIS));
              innerrightpanel.setBorder(BorderFactory.createLoweredBevelBorder());
              innerrightpanel.setLayout(new GridBagLayout());          
              GridBagConstraints GBC = new GridBagConstraints();
              GBC.fill = GridBagConstraints.HORIZONTAL;
              internalnextbtn = new JButton(createNextButtonIcon());
              GBC.gridx = 1;
              GBC.gridy = 1;
              internalnextbtn.addActionListener(new ActionListener(){
                   public void actionPerformed(ActionEvent evt){
                        getInnerFieldText(currentItem);
                        internalprevbtn.setEnabled(true);
                        if(currentItem < MaxItems){
                             ++currentItem;
                             orderDetails[CurrentRecord].getInnerCustOrdObj();
                             setInnerFieldText(currentItem);
                             System.out.println("Current Item" + currentItem);
                        if(currentItem == MaxItems){
                             internalnextbtn.setEnabled(false);
              innerrightpanel.add(internalnextbtn, GBC);
              return innerrightpanel;
         public JPanel createInnerLeftPanel(){
              innerleftpanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
              innerleftpanel.setBackground(TxtfontColor);
              innerleftpanel.setBorder(BorderFactory.createLoweredBevelBorder());
              innerleftpanel.setForeground(Color.BLACK);
              innerleftpanel.setLayout(new GridBagLayout());          
              GridBagConstraints GBC = new GridBagConstraints();
              GBC.fill = GridBagConstraints.HORIZONTAL;
              internalprevbtn = new JButton(createPreviousButtonIcon());
              GBC.gridx = 1;
              GBC.gridy = 1;
              internalprevbtn.addActionListener(new ActionListener(){
                   public void  actionPerformed(ActionEvent evt){
                        getInnerFieldText(currentItem);
                        internalnextbtn.setEnabled(true);
                        if(currentItem == 1){
                             internalprevbtn.setEnabled(false);
                        if(currentItem > 0){
                             --currentItem;
                             orderDetails[CurrentRecord].getInnerCustOrdObj();
                             setInnerFieldText(currentItem);
                             System.out.println("Current Item" + currentItem);
              innerleftpanel.add(internalprevbtn, GBC);
              return innerleftpanel;
         public JPanel createCustOrdDetailsButtons(){
              createbuttonpanel();
              buttonpanel.setBackground(TxtfontColor);
              externalprevbtn = new JButton(createPreviousButtonIcon());
              externalprevbtn.addActionListener(new ActionListener(){
                   public void  actionPerformed(ActionEvent evt){
                        getFieldText(CurrentRecord);
                        externalnextbtn.setEnabled(true);
                        if(CurrentRecord == 1){
                             externalprevbtn.setEnabled(false);
                        if(CurrentRecord > 0){
                             --CurrentRecord;
                             setFieldText(CurrentRecord);
                             System.out.println("Current Record " + CurrentRecord);//Checking RECORD_NUM
              buttonpanel.add(externalprevbtn);
              addrecordbtn = new JButton("Add Record", createAddButtonIcon());
              addrecordbtn.addActionListener(new ActionListener(){
                   public void actionPerformed(ActionEvent evt){
                        try{
                             MaxRecord = readRecordNumber();
                             MaxRecord++;
                             CurrentRecord = MaxRecord;
                             orderDetails[CurrentRecord] = new CustOrdObject();
                             writeRecordNumber(MaxRecord);
                             MaxItems = 1;
                             innerCustOrdObj[MaxItems] = new InnerCustOrdObject();
                             //--<BEGINNING>--Clear Fields-------------------------------------------------------//
                             CustIDTxt.setText("");
                             CustOrderIDTxt.setText(""+MaxRecord);
                             //Get today's date
                             Date todaydate = new Date();
                             OrderedDateTxt.setText(""+simpleDF.format(todaydate));
                             ItemNumberTxt.setText("");
                             UnitPriceTxt.setText("");
                             QuantityReqTxt.setText("");
                             TotPriceTxt.setText("");
                             GrandTotTxt.setText("");
                             //--<END>--Clear Fields-------------------------------------------------------------//
                             externalnextbtn.setEnabled(false);
                             externalprevbtn.setEnabled(true);
                             System.out.println(MaxRecord);
                        } catch(Exception ec){ec.printStackTrace();}
              buttonpanel.add(addrecordbtn);
              savebtn = new JButton("Save Data", createSaveButtonIcon());
              savebtn.addActionListener(new ActionListener(){
                   public void actionPerformed(ActionEvent evt){
                        setFieldText(CurrentRecord);
                        setInnerFieldText(MaxItems);
                        writeOrder();
                        writeRecordNumber(MaxRecord);
                        System.out.println(CurrentRecord);
                        System.out.println(MaxRecord);
              buttonpanel.add(savebtn);
              java.net.URL imageURL_AddRowIcon = CommonFeatures.class.getResource("Icons/edit_add.png");
              ImageIcon AddRowIcon = new ImageIcon(imageURL_AddRowIcon);
              additemreqbtn = new JButton("Add Item", AddRowIcon);
              additemreqbtn.addActionListener(new ActionListener(){
                   public void actionPerformed(ActionEvent evt){
                        try{
                             //--<BEGINNING>--Clear Fields-------------------------------------------------------//
                             ItemNumberTxt.setText("");
                             UnitPriceTxt.setText("");
                             QuantityReqTxt.setText("");
                             TotPriceTxt.setText("");
                             //--<END>--Clear Fields-------------------------------------------------------------//
                             //CurrentRecord = MaxRecord;
                             MaxItems++;
                             innerCustOrdObj[MaxItems] = new InnerCustOrdObject();
                             System.out.println("Max Items "+MaxItems);
                             currentItem = MaxItems;
                             orderDetails[CurrentRecord].setMaxItems(MaxItems);
                             ///setInnerFieldText(currentItem);
                             internalnextbtn.setEnabled(false);
                             internalprevbtn.setEnabled(true);
                        } catch(Exception ec){ec.printStackTrace();}
              buttonpanel.add(additemreqbtn);
              externalnextbtn = new JButton(createNextButtonIcon());
              externalnextbtn.addActionListener(new ActionListener(){
                   public void actionPerformed(ActionEvent evt){
                        getFieldText(CurrentRecord);
                        externalprevbtn.setEnabled(true);
                        if(CurrentRecord < MaxRecord){
                             ++CurrentRecord;
                             setFieldText(CurrentRecord);
                             System.out.println(CurrentRecord);//Checking RECORD_NUM
                        if(CurrentRecord == MaxRecord){
                             externalnextbtn.setEnabled(false);
              buttonpanel.add(externalnextbtn);
              gotorecordbtn = new JButton("Go To Record", createGotoButtonIcon());
              gotorecordbtn.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent evt){
                         * The text from the GotorecordTxt textfield will be taken and assigned
                         * to a temporary integer variable called Find. 
                        int Find = Integer.parseInt(CustOrderIDTxt.getText());
                        for(int j=1; j <= MaxRecord; j++){
                              * Using a for loop, each record can be read using the readCustRecord
                              * method.
                             getFieldText(j);
                              * An if condition is utilized to check whether the temporary stored variable, Find,
                              * matches a field in a record. If this record is found, then using the RecordExists
                              * which was declared at the top, either a true or false statement can be assigned
                              * If the record exists, then a true statement will be assigned, if not a false
                              * statement will be assigned.
                             if(orderDetails[j].getCustOrderID() == Find){
                                  RecordExists = true;
                                  break;
                             }else{
                                  RecordExists = false;
                        if(RecordExists == false){
                              * If the RecordExists is assigned a false statement, then a message will be
                              * displayed to show that the record does not exist.
                             JOptionPane.showMessageDialog(null, "Record Does Not Exist!", "Error Message", JOptionPane.ERROR_MESSAGE, createErrorIcon());
                        }else{
                             getFieldText(Find);
              buttonpanel.add(gotorecordbtn);
              return buttonpanel;
         //TODO
         public void setFieldText(int orderID){//TODO
              orderDetails[orderID].setCustID(Integer.parseInt(CustIDTxt.getText()));
              orderDetails[orderID].setCustOrderID(Integer.parseInt(CustOrderIDTxt.getText()));
              orderDetails[orderID].setOrderDate(OrderedDateTxt.getText());
              orderDetails[orderID].setInnerCustOrdObj(innerCustOrdObj);
              orderDetails[orderID].setMaxItems(MaxItems);
              setInnerFieldText(currentItem);
              orderDetails[orderID].setGrandTotal(Float.parseFloat(GrandTotTxt.getText()));
         public void setInnerFieldText(int currentItem){//TODO
              innerCustOrdObj[currentItem] = new InnerCustOrdObject();
              innerCustOrdObj[currentItem].setMaxItems(MaxItems);
              innerCustOrdObj[currentItem].setItemNumber(Integer.parseInt(ItemNumberTxt.getText()));
              innerCustOrdObj[currentItem].setUnitPrice(Float.parseFloat(UnitPriceTxt.getText()));
              innerCustOrdObj[currentItem].setQuantityRequired(Integer.parseInt(QuantityReqTxt.getText()));
              innerCustOrdObj[currentItem].setTotalPrice(Float.parseFloat(TotPriceTxt.getText()));
         public void getFieldText(int orderID){
              CustIDTxt.setText(Integer.toString(orderDetails[orderID].getCustID()));
              CustOrderIDTxt.setText(Integer.toString(orderDetails[orderID].getCustOrderID()));
              OrderedDateTxt.setText(""+orderDetails[orderID].getOrderDate());          
              currentItem = orderDetails[orderID].getMaxItems();
              orderDetails[orderID].getInnerCustOrdObj();
              System.err.println("currentItem" + currentItem);
              //getInnerFieldText(currentItem);
              GrandTotTxt.setText(Float.toString(orderDetails[orderID].getGrandTotal()));
         public void getInnerFieldText(int currentItem){
              ItemNumberTxt.setText(Integer.toString(innerCustOrdObj[currentItem].getItemNumber()));
              UnitPriceTxt.setText(Float.toString(innerCustOrdObj[currentItem].getUnitPrice()));
              QuantityReqTxt.setText(Integer.toString(innerCustOrdObj[currentItem].getQuantityRequired()));
              TotPriceTxt.setText(Float.toString(innerCustOrdObj[currentItem].getTotalPrice()));
         public void writeOrder(){//TODO
              try {
                   objOut = new ObjectOutputStream(new FileOutputStream(OrderDetailsFile));
                   objOut.writeObject(orderDetails);
                   System.out.println("WORKING!");
                   objOut.flush();
                   objOut.close();
              } catch (IOException e) {
                   e.printStackTrace();
         public Object readOrder(){
              Object temporaryObj;
              try{
                   objIn = new ObjectInputStream(new FileInputStream(OrderDetailsFile));
                   temporaryObj = objIn.readObject();               
                   CustOrdObject[] blah = (CustOrdObject[]) temporaryObj;
                   /*               System.out.println("Outer: "+blah[1].getCustID());
                   InnerCustOrdObject[] whee = blah[1].getInnerCustOrdObj();
                   System.out.println("Inner: "+whee[1].getItemNumber());*/
                   objIn.close();
                   System.out.println("Read Worky!");
                   return temporaryObj;
              }catch(Exception e){
                   e.printStackTrace();
                   System.out.println("Read No Worky!");
                   return null;
         public void writeRecordNumber(int MaxRecord){
              try{
                   objOut = new ObjectOutputStream(new FileOutputStream(OrdRecordNumStore));
                   objOut.writeObject(MaxRecord);
                   System.out.println("WORKING!");
                   objOut.flush();
                   objOut.close();
              }catch(Exception e){e.printStackTrace();}
         public int readRecordNumber() {
              try {
                   objIn = new ObjectInputStream(new FileInputStream(OrdRecordNumStore));
                   int temporaryObj = Integer.parseInt(objIn.readObject().toString());
                   objIn.close();
                   System.out.println("Read Number Worky!");
                   return temporaryObj;
              } catch (Exception e) {
                   e.printStackTrace();
                   System.out.println("Read Number No Worky!");
                   return -1;
    }Message was edited by:
    Kilik07

  • Problem with an update page.

    I have a problem with an update page on my website
    Here's how it work
    values are defualted in from the advert table  - this works fine
    I should then be able to change the fields and click on the update button
    This works fine but ONLY when the O_year field is populated. 
    There doesn't seem to be anything special about the O_year field
    I thought spry text validation would of been causing the issues, but I removed them and have the same problem.
    For some reason the POST_MMupdate value is not being set to 'form4', which it is doing if O_year is set.
    Please can someone have a look at this, code,
    Also, is there a way of 'stepping through' dreamweaver code to debug it?
    Thanks
    Adam
    $colname_Advert = "-1";
    if (isset($_GET['advert_id'])) {
      $colname_Advert = $_GET['advert_id'];
    mysql_select_db($database_guitarswap_db, $guitarswap_db);
    $query_Advert = sprintf("SELECT * FROM advert WHERE advert_id = %s", GetSQLValueString($colname_Advert, "int"));
    $Advert = mysql_query($query_Advert, $guitarswap_db) or die(mysql_error());
    $row_Advert = mysql_fetch_assoc($Advert);
    $totalRows_Advert = mysql_num_rows($Advert);
    if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form4"))
        //Сheck that we have a file
    if((!empty($_FILES["PictureLocation"])) && ($_FILES['PictureLocation']['error'] == 0))
          //Check if the file is JPEG image and it's size is less than 350Kb
          $filename = basename($_FILES["PictureLocation"]["name"]);
          $ext = substr($filename, strrpos($filename, '.') + 1);
          if (($ext == "jpg") && ($_FILES["PictureLocation"]["type"] == "image/jpeg") &&
        ($_FILES["PictureLocation"]["size"] < 350000))
            //Determine the path to which we want to save this file
              $newname = dirname(__FILE__).'/upload/'.$filename;
              //Check if the file with the same name is already exists on the server
              if (!file_exists($newname))
                //Attempt to move the uploaded file to it's new place
                if ((move_uploaded_file($_FILES['PictureLocation']['tmp_name'],$newname)))
                       // echo "It's done! The file has been saved as: ".$newname;
                else
                       // echo "Error: A problem occurred during file upload!";
            else
                 // echo "Error: File ".$_FILES["PictureLocation"]["name"]." already exists";
          else
             // echo "Error: Only .jpg images under 350Kb are accepted for upload";
        else
         // echo "Error: No file uploaded";
        $filename=$row_Advert['PictureLocation'];
        // set default opentoalloffers
    if (!isset($_POST['checkopentoalloffers']))
        $_POST['checkopentoalloffers'] = 'n';
      $updateSQL = sprintf("UPDATE advert SET PictureLocation=%s, O_Make=%s, O_Model=%s, O_Country=%s, O_Year=%s, O_Colour=%s, O_Body=%s, O_Neck=%s, O_Fingerboard=%s, O_Pickups=%s, `value`=%s, `condition`=%s,  W_Make=%s, W_Model=%s, W_Country=%s, W_Year=%s, W_Colour=%s, W_Body=%s, W_Neck=%s, W_Fingerboard=%s, W_Pickups=%s, Comments=%s, opentoalloffers=%s, ChangeFlg = %s  WHERE advert_id=%s",
                           GetSQLValueString($filename, "text"),
                           GetSQLValueString($_POST['O_Make'], "text"),
                           GetSQLValueString($_POST['O_Model'], "text"),
                           GetSQLValueString($_POST['O_Country'], "text"),
                           GetSQLValueString($_POST['O_Year'], "date"),
                           GetSQLValueString($_POST['O_Colour'], "text"),
                           GetSQLValueString($_POST['O_Body'], "text"),
                           GetSQLValueString($_POST['O_Neck'], "text"),
                           GetSQLValueString($_POST['O_Fingerboard'], "text"),
                           GetSQLValueString($_POST['O_Pickups'], "text"),
                           GetSQLValueString($_POST['value'], "int"),
                           GetSQLValueString($_POST['condition'], "text"),
                           GetSQLValueString($_POST['W_Make'], "text"),
                           GetSQLValueString($_POST['W_Model'], "text"),
                           GetSQLValueString($_POST['W_Country'], "text"),
                           GetSQLValueString($_POST['W_Year'], "date"),
                           GetSQLValueString($_POST['W_Colour'], "text"),
                           GetSQLValueString($_POST['W_Body'], "text"),
                           GetSQLValueString($_POST['W_Neck'], "text"),
                           GetSQLValueString($_POST['W_Fingerboard'], "text"),
                           GetSQLValueString($_POST['W_Pickups'], "text"),
                           GetSQLValueString($_POST['Comments'], "text"),
                           GetSQLValueString($_POST['checkopentoalloffers'], "text"),
                           GetSQLValueString('y', "text"),
                           GetSQLValueString($_POST['advert_id'], "int"));
      mysql_select_db($database_guitarswap_db, $guitarswap_db);
      $Result1 = mysql_query($updateSQL, $guitarswap_db) or die(mysql_error());
        $updateGoTo = "Member2.php";
         if (isset($_SERVER['QUERY_STRING'])) {
           $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
           $updateGoTo .= $_SERVER['QUERY_STRING'];
         header(sprintf("Location: %s", $updateGoTo));
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <link href="Layout3.css" rel="stylesheet" type="text/css" /><!--[if IE 5]>
    <style type="text/css">
    /* place css box model fixes for IE 5* in this conditional comment */
    .twoColFixLtHdr #sidebar1 { width: 230px; }
    </style>
    <![endif]--><!--[if IE]>
    <style type="text/css">
    /* place css fixes for all versions of IE in this conditional comment */
    .twoColFixLtHdr #sidebar1 { padding-top: 30px; }
    .twoColFixLtHdr #mainContent { zoom: 1; }
    /* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
    </style>
    <![endif]-->
    <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    <link href="SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    <!--
    body {
        background-color: #FFF;
        margin-left: 20px;
    .twoColFixLtHdr #container #main3 #form1 div fieldset {
        border: thin ridge #CCC;
    -->
    </style>
    <script type="text/javascript">
    <!--
    function MM_goToURL() { //v3.0
      var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
      for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
    //-->
    </script>
    <link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
    </head>
    <body class="twoColFixLtHdr">
    <div id="container">
      <div id="header">
        <div id="Righty">
          <ul id="MenuBar2" class="MenuBarHorizontal">
        <li><a href="index.php">Search</a>      </li>
        <li><a href="Member2.php">Members</a></li>
      </ul>
      <p> </p>
    </div>
    <span id="LoginDiv">
        <?php
          if (isset($_SESSION['MM_Username']))
            echo "hello ". $_SESSION['MM_Username']. "";
            echo " <a href='Logout.php'>Log out</a> ";
        else
            echo "
                <a href='Login.php'>Login</a> / <a href='Register.php'>Register</a>
        ?>
        </a></span>
    <div id="Middle">
      <h1 align="center">GuitarSwap</h1>
    </div>
      </div>
      <div id="sidebar1">
        <h4>Members Area</h4>
        <ul id="MenuBar1" class="MenuBarVertical">
          <li><a href="Member2.php">My Adverts</a></li>
          <li><a href="NewAdvert.php">Create new Advert</a></li>
          <li><a href="UpdateUserDets.php">My Account</a></li>
        </ul>
        <h3>  </h3>
      </div>
      <div id="mainContent">
        <h4>Update Advert</h4>
        <!-- end #mainContent -->
      </div>
      <!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats -->
      <div id="main3">
        <div id="main">
          <fieldset>
            <legend>Please update advert details and confirm</legend>
            <form action="<?php echo $editFormAction; ?>" enctype="multipart/form-data" method="post" name="form4" id="form4">
              <input type="hidden" name="advert_id" value="<?php echo $row_Advert['advert_id']; ?>" />
              <p></p>
              <table width="650" align="center">
                <tr valign="baseline">
                  <td width="17" rowspan="15" valign="middle" nowrap="nowrap"><?php echo "<img src='upload/" .$row_Advert['PictureLocation']."' width='64' height='180'/>" ?></td>
                  <td width="133" align="right" nowrap="nowrap"> </td>
                  <td width="240" align="center" bgcolor="#CCCCCC"><strong>Offered</strong></td>
                  <td width="240" align="center" bgcolor="#CCCCCC"><strong>Wanted</strong></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Make:</strong></td>
                  <td bgcolor="#CCFFCC"><input name="O_Make" type="text" value="<?php echo $row_Advert['O_Make']; ?>" size="30" maxlength="15" /></td>
                  <td bgcolor="#CCFFFF"><input name="W_Make" type="text" value="<?php echo $row_Advert['W_Make']; ?>" size="30" maxlength="15" /></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Model:</strong></td>
                  <td bgcolor="#CCFFCC"><input name="O_Model" type="text" value="<?php echo $row_Advert['O_Model']; ?>" size="30" maxlength="30" /></td>
                  <td bgcolor="#CCFFFF"><input name="W_Model" type="text" value="<?php echo $row_Advert['W_Model']; ?>" size="30" maxlength="30" /></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Country:</strong></td>
                  <td bgcolor="#CCFFCC"><input name="O_Country" type="text" value="<?php echo $row_Advert['O_Country']; ?>" size="30" maxlength="15" /></td>
                  <td bgcolor="#CCFFFF"><input name="W_Country" type="text" value="<?php echo $row_Advert['W_Country']; ?>" size="30" maxlength="15" /></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Year:</strong></td>
                  <td bgcolor="#CCFFCC"><span id="sprytextfield1">
                  <input name="O_Year" type="text" value="<?php echo $row_Advert['O_Year']; ?>" size="4" maxlength="4" />
    <span class="textfieldInvalidFormatMsg">Invalid format.</span><span class="textfieldMinValueMsg">The entered value is less than the minimum required.</span><span class="textfieldMaxValueMsg">The entered value is greater than the maximum allowed.</span></span></td>
                  <td bgcolor="#CCFFFF"><span id="sprytextfield2">
                  <input name="W_Year" type="text" value="<?php echo $row_Advert['W_Year']; ?>" size="4" maxlength="4" />
    <span class="textfieldInvalidFormatMsg">Invalid format.</span><span class="textfieldMinValueMsg">The entered value is less than the minimum required.</span><span class="textfieldMaxValueMsg">The entered value is greater than the maximum allowed.</span></span></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Colour:</strong></td>
                  <td bgcolor="#CCFFCC"><input name="O_Colour" type="text" value="<?php echo $row_Advert['O_Colour']; ?>" size="30" maxlength="15" /></td>
                  <td bgcolor="#CCFFFF"><input name="W_Colour" type="text" value="<?php echo $row_Advert['W_Colour']; ?>" size="30" maxlength="15" /></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Body:</strong></td>
                  <td bgcolor="#CCFFCC"><input name="O_Body" type="text" value="<?php echo $row_Advert['O_Body']; ?>" size="30" maxlength="15" /></td>
                  <td bgcolor="#CCFFFF"><input name="W_Body" type="text" value="<?php echo $row_Advert['W_Body']; ?>" size="30" maxlength="15" /></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Neck:</strong></td>
                  <td bgcolor="#CCFFCC"><input name="O_Neck" type="text" value="<?php echo $row_Advert['O_Neck']; ?>" size="30" maxlength="15" /></td>
                  <td bgcolor="#CCFFFF"><input name="W_Neck" type="text" value="<?php echo $row_Advert['W_Neck']; ?>" size="30" maxlength="15" /></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Fingerboard:</strong></td>
                  <td bgcolor="#CCFFCC"><input name="O_Fingerboard" type="text" value="<?php echo $row_Advert['O_Fingerboard']; ?>" size="30" maxlength="15" /></td>
                  <td bgcolor="#CCFFFF"><input name="W_Fingerboard" type="text" value="<?php echo $row_Advert['W_Fingerboard']; ?>" size="30" maxlength="15" /></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Pickups:</strong></td>
                  <td bgcolor="#CCFFCC"><input name="O_Pickups" type="text" value="<?php echo $row_Advert['O_Pickups']; ?>" size="30" maxlength="15" /></td>
                  <td bgcolor="#CCFFFF"><input name="W_Pickups" type="text" value="<?php echo $row_Advert['W_Pickups']; ?>" size="30" maxlength="15" /></td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Condition:</strong></td>
                  <td bgcolor="#CCFFCC"><label for="condition">
                    <select name="condition" size="1" id="condition">
                      <option selected="selected" value="" <?php if (!(strcmp("", $row_Advert['condition']))) {echo "selected=\"selected\"";} ?>>---select---</option>
                      <option value="immaculate" <?php if (!(strcmp("immaculate", $row_Advert['condition']))) {echo "selected=\"selected\"";} ?>>immaculate</option>
                      <option value="excellent" <?php if (!(strcmp("excellent", $row_Advert['condition']))) {echo "selected=\"selected\"";} ?>>excellent</option>
                      <option value="good" <?php if (!(strcmp("good", $row_Advert['condition']))) {echo "selected=\"selected\"";} ?>>good</option>
                      <option value="well used" <?php if (!(strcmp("well used", $row_Advert['condition']))) {echo "selected=\"selected\"";} ?>>well used</option>
                      <option value="poor" <?php if (!(strcmp("poor", $row_Advert['condition']))) {echo "selected=\"selected\"";} ?>>poor</option>
                  </select>
                  </label></td>
                  <td bgcolor="#FFFFFF"> </td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Value:</strong></td>
                  <td bgcolor="#CCFFCC"><span id="sprytextfield3">
                  <input name="value" type="text" value="<?php echo $row_Advert['value']; ?>" size="11" maxlength="11" />
    <span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td>
                  <td bgcolor="#FFFFFF"> </td>
                </tr>
                <tr valign="baseline">
                  <td align="right" valign="top" nowrap="nowrap"><strong>Comments:</strong></td>
                  <td bgcolor="#CCFFCC"><textarea name="Comments" cols="25" rows="3"><?php echo $row_Advert['Comments']; ?></textarea></td>
                  <td bgcolor="#FFFFFF"> </td>
                </tr>
                <tr valign="baseline">
                  <td nowrap="nowrap" align="right"><strong>Picture location</strong></td>
                  <td bgcolor="#CCFFCC"><label for="checkopentoalloffers"></label>                <input type="file" name="PictureLocation" value="<?php echo $row_Advert['PictureLocation']; ?>" size="20" /></td>
                  <td bgcolor="#FFFFFF"> </td>
                </tr>
                <tr valign="baseline">
                  <td height="26" align="right" nowrap="nowrap"><strong>Open to all offers:</strong></td>
                  <td bgcolor="#CCFFCC"><input name="checkopentoalloffers" type="checkbox" id="checkopentoalloffers" value="y" <?php if (!(strcmp($row_Advert['opentoalloffers'],"y"))) {echo "checked=\"checked\"";} ?> /></td>
                  <td bgcolor="#FFFFFF"> </td>
                </tr>
              </table>
              <p> </p>
              <div id="submitdiv">
                <input type="hidden" name="MM_update" value="form4" />
                <input name="submit button" type="submit" id="submit button" value="Update Advert" />
              </div>
              <div id="exitdiv">
                <label for="button15"></label>
                <input name="button" type="button" id="button15" onclick="MM_goToURL('parent','Member2.php');return document.MM_returnValue" value="Exit" />
                <label for="button16"></label>
              </div>
              <p> </p>
            </form>
          </fieldset>
          <script type="text/javascript">
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "integer", {validateOn:["blur"], minValue:1900, maxValue:2010, isRequired:false});
    var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "integer", {validateOn:["blur"], minValue:1900, maxValue:2010});
    var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "integer", {minValue:1900, maxValue:2010, validateOn:["blur"], isRequired:false});
    var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "currency", {validateOn:["blur"], isRequired:false});
          </script>
          <br class="clearfloat" />
      <!-- end #container -->
    </div></div></div>
    <script type="text/javascript">
    <!--
    var  = new Spry.Widget.MenuBar("", {imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    var MenuBar2 = new Spry.Widget.MenuBar("MenuBar2", {imgDown:"../SpryAssets/SpryMenuBarDownHover.gif", imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    //-->
    </script>
    </body>
    </html>
    <?php
    mysql_free_result($Advert);
    if (is_resource($Result1)) mysql_free_result($Result1);
    ?>

    Please note,
    Removing I investigated spry a little more, in the end I settled for removing spry altogether,
    Maybe it was because the text field in a $GET (for the default) AND a $PUT (for the update)

  • Having a problem with commandButton attribute when i am using it under tabl

    Having a problem with {color:#800000}commandButton {color}{color:#339966}attribute {color}when i am using it under{color:#ff0000} table{color}
    I am using a command button under a table.
    here is the example
    <h:dataTable value="#{wlmHandler.plexes.plexes}" var="{color:#ff0000}onePlex{color}" border="0" cellspacing="0" cellpadding="0" width="100%" border="0">
    <h:column>
    <h:panelGrid border="0" cellpadding="0" cellspacing="0" columns="5">
    <h:commandButton action="" styleClass="tixbutton" value="#{labels.ADD}" onclick="#{onePlex.tran}"/>
    <f:verbatim> </f:verbatim>
    <h:commandButton action="#{createTransaction.transactionCommand}" styleClass="tixbutton"
    value="#{labels.SUBMIT}" actionListener="#{createTransaction.processAction}">
    <f:attribute name="dbName" value="#{wlmHandler.dbName}"/>
    <f:attribute name="plexName" value="{color:#ff9900}#{onePlex.name}"{color}/>
    </h:commandButton>
    </h:panelGrid>
    <h:/column>
    </h:dataTable >
    when i am using this plex name atribute it is giving nullPointerException
    {color:#ff9900}this value #{onePlex.name} i cant able to access inside the command button{color}

    balu i have tried by seeing u r blog.
    this is my structure of tables
    plexes (if i iterate plexes table gives plex object)
    |
    ------ plex (plex table gives transaction object)
    |
    ------transactions(transactions table gives transaction table)
    |
    here i will have a command link to this link i have to pass the plex name which
    will come from
    i tried in this command action with HTMLDataTable getRowData()
    i am not getting the selected row data .i am downcasting this getRowData() to plex.

Maybe you are looking for