Why is my validation working in this way?

I have a form which consists of Invoice Header data.
-For the Invoice header it consists of Multiple Invoice Line Details.
-For each of these line Detail, i have multiple Invoice Distribution Lines
Now For each Invoice Line we have Line Amount.
Also For each Distribution line we have to enter Distribution Amount.
Now the Line Amount should be equal to the Sum of the Distribution Amount of each Distribution Line under the Invoice Lines.
Here is the code that i wrote for this validation in the validateEntity() method of the EO for the Invoice Lines.
RowIterator rowset=getDistEO();// get the rowset for the Distribution Lines EO
System.out.println("the number of rows are ="+rowset.getRangeSize());
Row row=null;
int distLineTotal=0;//set the variable for Total Distribution amt as 0
int lineAmt=getAmount().intValue();// get the Line Amount for the Invoice Line
System.out.println("in Line EO Line amt is = "+ lineAmt);
//do the validation only if the any Distribution Line is present
if( rowset.getRangeSize()>0){
while((row=rowset.next())!=null){
//Loop and set the Distribution Amount total
distLineTotal=distLineTotal+((Number)row.getAttribute("Amount")).intValue();
System.out.println("distLineTotal is = "+ distLineTotal);
if(distLineTotal>lineAmt &&distLineTotal==0){
// Throw the exception if the Line Amount is less than Distribution Amount Total
throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,getEntityDef().getFullName(),getPrimaryKey(),"Amount",getAmount(),"XXLBCARC","XXLBC_LINE_GREATER_THAN_DIST" );
}else if(distLineTotal<getAmount().intValue()&&distLineTotal==0){
// Throw the exception if the Line Amount is greater than Distribution Amount Total
throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,getEntityDef().getFullName(),getPrimaryKey(),"Amount",getAmount(),"XXLBCARC","XXLBC_LINE_LESSER_THAN_DIST" );
Also for the Invoice Lines i have a Image by pressing which we would go to the Distribution Lines page.
For this button i have set the disable the server side and client side validation to TRUE
Now the validation works fine and suppose for the Invoice Line which is an Advanced table, if for rows 1 and 2 the Following exception is thrown.
Error
Row 1 Error - The Line Amount is Greater than the Distribution Line Amount Total.
Row 2 Error - The Line Amount is Lesser than the Distribution Line Amount Total.
Now this is fine.
But Now suppose i click on the Image for Distribution Line, for the Invoice line 1 i.e. Row 1
, it wont let me go to the Distribution Page.
Instead the the error lines get added at the top of my screen like the following:
Row 1 Error - The Line Amount is Greater than the Distribution Line Amount Total.
Row 2 Error - The Line Amount is Lesser than the Distribution Line Amount Total.
Row 2 Error - The Line Amount is Lesser than the Distribution Line Amount Total.
Row 2 Error - The Line Amount is Lesser than the Distribution Line Amount Total.
I have to first click on the Image for Distribution Line, for the Invoice line 2 i.e. Row 2, make the correction in the Distribution Page for that, then come back to the Invoice Line page and then I can make changes for the
Invoice line 1 i.e. Row 1.
Why cant i make changes to Invoice line 1 i.e. Row and the go to Invoice line 1 i.e. Row 2?
Edited by: Pradeep on Jan 5, 2009 3:58 AM

Does any body have any idea?

Similar Messages

  • Why does the print come back this way? Help

    I've been sending for prints through Aperture. And I posted here before with no difference of result following the reply.
    See the picture exapmple here.
    I get the prints back and the all have white borders onboth edges. I've tried setting a crop to 4x5 and then order a 4x5 or 8x10, I still get the borders. Right up to 16x20.
    I removed all adjustements on the photos and send for prints and I still get the borders.
    The example you will see is a Nikon D50 NEF exported as a JPG from Aperture. All adjustements removed.
    The second is a scan of the same photo that I got as the print. White borders.
    Any ideas. All my photos I've had Aperture print through have come back this way. And I've spent about $300 US already.
    The export from Aperture all adjustments removed
    http://i15.photobucket.com/albums/a398/whatusee/export.jpg
    The scan of the print ordered
    http://i15.photobucket.com/albums/a398/whatusee/scan.jpg
    Thanks
    MacBook Pro 2.0ghz   Mac OS X (10.4.8)   2gig of Ram/160GB HD

    I'd guess that if you crop to 4x5, and then print on 2x3 (which is the standard format most minilabs use) you'll have to live with the borders.
    Try cropping an image 2x3 (which is about the crop of your sensor) and then print again.
    Also, export your image as a jpeg and use another print service for a test.
    Finally, maybe there's a setting somewhere in Aperture which sets the borders on Prints done through the Apple print service (which is fulfilled by, I believe, Kodak). Thus, trash your Aperture prefs (which of course kills all your personalised settings except for registration info) and try again.
    Cheers,
    Karl

  • Opening a link in a new window puts its entry in history while browsing in private mode.Does it suppose to work in this way?

    <blockquote>Locking duplicate thread.<br>
    Please continue here: [/questions/785616]</blockquote><br>
    I have set Firefox to never remember history.This is equivalent to private browsing but whenever I open a link in a new window I can see an entry in the History menu under "Recently Closed Windows". Firefox should not remember any type of history when I already said it do so.

    Hi,
    the only way I know of the is to go to file and click for a new Window.
    Sounds like tabs maybe your thing, from Safari's Helpviewer. for more info look there.......
    To turn on tabbed browsing, choose Preferences from the Safari menu and click Tab. Select Enable Tabbed Browsing.
    To open a link or bookmark in the bookmarks bar in a new tab, hold down the Command key and click the item, or hold down the Control key, click the item, and choose Open in New Tab from the shortcut menu.
    To open a bookmark collection in the bookmarks bar or a folder of bookmarks in the Bookmarks Library in tabs, hold down the Control key, click the collection or folder, and choose Open in Tabs from the shortcut menu.
    If you select the Auto-Click checkbox for a folder in the bookmarks bar, then you can open all the bookmarks in the folder in tabs by clicking the folder name in the bookmarks bar.
    To open a webpage in a new tab, choose New Tab from the File menu and type the address for the page.
    To close a tab, click the close button in the tab.
    To quickly switch between tabs, press Command-Shift-[ and Command-Shift-].
    To show a webpage that is in a tab and close all other tabs, hold down the Option key and click the close box in the tab you want to remain open.
    When you click a link in a page you are viewing in a tab, the page opens in the current tab. Click the Back and Forward buttons in the address bar to scan pages you have opened in a tab.
    If you choose a page from the History or Bookmarks menu, the page opens in the current tab.
    Hope it helps you do what i think you are looking for.
    Cheers
    Eme

  • Why is my firefox displaying itself this way?

    http://i.gyazo.com/fd48d3c183453d76b9ec9ae2c3010730.png
    I'm posting this with internet explorer...
    I've tried reopening (the right-click drop-down boxes are blacked out, too, but I'm savvy enough to remember where everything is,) the browser multiple times, opened new tabs and new windows, even tried private browsing. Firefox is FUNCTIONAL, but nothing appears on my screen visually.
    Should I redownload firefox? Why is this happening?

    This can be a problem with the graphics display driver.
    You can check if there is an update for the graphics display driver.
    *https://support.mozilla.org/kb/upgrade-graphics-drivers-use-hardware-acceleration
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    You can try to disable hardware acceleration in Firefox.
    *Tools > Options > Advanced > General > Browsing: "Use hardware acceleration when available"
    You need to close and restart Firefox after toggling this setting.

  • Why does my PS 7 act this way?

    Basically, this is my situation. Everytime I try to start up Photoshop 7, this is what happens. I mean it worked before on my old HDD, but since I updated to a new larger Hard Drive, and I just reinstalled, it, this is whats happened. So Ive even uninstalled, and reinstalled this so many times, Im willing to give up. I just hope I can get an answer?

    function(){return A.apply(null,[this].concat($A(arguments)))}
    gener7 wrote:
    By any chance is your new HDD 1 Terabyte or larger?  PS7 will give a full disk error with those sizes.
    Use a bigger font.  Mylenium also proposed this answer above.  I'm guessing it's the real issue here.
    -Noel

  • Why double click not working ?

    if the system have wizip/winrar installed...does it block to run executable jar whence they are doble-clicked ?
    because when i doble-click on the executable jar file....it opens up in the winrar...it displays all the directory structure in the jar file.....but it never executes.
    i have a jar in c:\
    and i can run this way....
    C:\>java -jar psae.jar Philip
    Hello World Philip
    why double click not working ?

    This is because winzip or winrar has taken over the
    Windows association with files of type .jar.
    Assuming XP.YES.....its windows XP.
    Click on the tools menu in any explorer window,
    select "folder options" and choose the "file type"
    tab. i tried that also earlier....anyway, here again one more time
    please look at
    http://img107.imageshack.us/my.php?image=nojar7ah.jpg
    There is NO .JAR file association i find in that list.
    you need to change the associaton of 'jar' to
    "Opens with Java"

  • Combobox in array--why does it work this way?

    I have attached a snippet of a subVI I'm using to initialize the items and set the values of comboboxes in an array. I modified it slightly so the array being referenced is on this block diagram, not a top level diagram. It took me a while to come to this solution; before I had the combobox part in a for loop and was trying to loop through each array element, get a reference to that element, and set the strings[] and value properties but it was acting all wacky. Then I changed it to the way below and it automatically populates all the comboboxes with the correct values, and then sets their values each to be different (which is what I want!) My question is, why does it work this way? I understand all elements in an array need to be the same (although I did find a work around here.), but the part about setting the values to each be different I was trying to do manually with a property node and a value property, when I realized the combobox just handles it all itself. Is this just a feature of a combobox in an array I need to note for future reference? 
    edit: I noticed the testers array reference label changed, so hopefully it's still referencing the same control. You may need to relink it.
    CLA, LabVIEW Versions 2010-2013
    Attachments:
    combobox in array snippet.png ‏29 KB

    nathand wrote:
    Ben wrote:
    nathand wrote:
    You cannot get a reference to an individual element in an array control.  The ArrayElem reference will always refer to the same control regardless of what array index is visible.  This isn't specific to a combo-box, every array works like this.
    I have not tested it lately but as of the time of this Nugget I found that it will point to the top left visable array element.
    The ArrayElem property always returns the same reference no matter which element of the array is in the top-left corner, as demonstrated by the code below (screenshot instead of snippet to avoid mangled references and property nodes).
    Yes that is true but the value returned when using a property node >>> value will return the top left displayed value. In the code included in that Nugget, I set the size of the control such that it only shows a single element then by manipulating the index control I can raed each element in the array.
    At least that is how it behaved back in the day of that nugget.
    Yes, my wife left me home alone with a case of beer and LV to find that tidbit. I suspect that feature will one day disapear without anyone noticing.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Why customize application exception this way?

    hi
    i found too different ways to customize a same application exception
    they actually work the same way but with a little difference that i can not figure out why
    the first one is
    public class BaseAppException extends Exception {
        static final long serialVersionUID = -5829545098534135052L;
         * the message of the BaseAppException.
        private String exceptionMessage;
         * A public constructor for BaseAppException containing no arguments.
        public BaseAppException() {
         * A public constructor for BaseAppException specifying exception message.
         * <p>
         * @param msg
         *            exception message.
        public BaseAppException(String msg) {
            this.exceptionMessage = msg;
        }it uses a private member "exceptionMessage" to store the exception message
    and here is the second piece of code
    public class BaseAppException extends Exception {
        static final long serialVersionUID = -5829545098534135052L;
         * A public constructor for BaseAppException containing no arguments.
        public BaseAppException() {
         * A public constructor for BaseAppException specifying exception message.
         * <p>
         * @param msg
         *            exception message.
        public BaseAppException(String msg) {
             super(msg);
    //        this.exceptionMessage = msg;
        }this one passes the message to the base throwable
    both works but i am wondering why define a private string memeber for message storing and not pass it to the base throwable??

    I'm not sure what you're trying to do here, but at
    first glance "TestK t = new TestK();" inside the for
    loop seemed unusual.
    If you place it before the loop it works fine.I guess what he is trying to ask is that why is that if you use the new operator in the code, you donot get the exception while if you dont use it you do get one. While in any case either you use it or not you are supposed to get a new String as per the String API.
    Well thats an interesting observation and I have no explanation as to why is this happening. I do remember that thread where somebody pointed this out as a use of the String(String original) construtor. Furtehr adding on to that the API states about this constructor the following
    Initializes a newly created String object so that it represents the same sequence of characters as the argument; in other words, the newly created string is a copy of the argument string.
    so I donot get why not using it would cause the exception to be thrown. I have tested the code though and it seems to behave as pointed in the original post.
    Interesting question though, food for thought.

  • Is there any reason I shouldn't work this way?

    Given the lack of batch capture in FCE is there any reason why I shouldn't work in the following way:
    1. Import video in large chunks using capture now
    2. Use DV start stop and Make sub-clip
    3. Export just the sub-clips I want as self-contained movies
    4. Close the project and delete the original capture files and the FCE project file
    5. Start a new project and import the movies I saved in step 3.
    My reasons for wanting to do this are mainly to save disc space but also to reduce clutter in the bins. So far as I can see this works fine. The only downsides I can see are:
    1. The extra time it takes but this is offset against the chore of capturing individual clips instead of using capture now.
    2. The fact that reimported clips have their audio tracks set to mono mix but it seems easy enough to correct this. (As an aside, if I import a .mov file saved from Quicktime it imports into FCE with the audio set to stereo - why the difference?).
    I'd be happy enough working this way, I think, provided I could be confident that I'm not going to lose quality by saving and then re-importing. Will I? Are there any other downsides I've not thought of?

    You shouldn't lose any quality in the audio or video, but you may lose the timecode track. I'm not sure if you'll lose it, but if you do, you won't be able to recapture the project clips from the original tape because the timecode would be required. This isn't an issue, if you don't ever need to recapture. The timecode may even be retained... I'd have to do an export to see. As a matter of workflow, you may want to think seriously about keeping the timecode, because you can back-up your project file and have some assurance that you can recover from a chatastrophic failure simply by restoring the project file and recapturing from the original tape.
    Regarding your audio and video; unless you were to add effects to the video, there should be no loss in exporting and importing. Losses in DV are incurred when you add filters (alter the image) and recompress. The audio is uncompressed PCM, so no losses to be had there, unless you change the sampling rate.

  • Hi i just wanna ask about the volume down button in the ipad 2 ,it was mute the device when hold it at once but before 2days i noticed that the device did not mute when i hold it ,why? and how i fix this by the way it is still volume down

    hi i just wanna ask about the volume down button in the ipad 2 ,it was mute the device when hold it at once but before 2days i noticed that the device did not mute when i hold it ,why? and how i fix this by the way it is still volume down

    Have you tried restarting or rebooting the iPad and then see if the volume control will work again?
    Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
    Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.

  • Need help " Can't find a valid editor for this file extension" not sure why I am getting and this or what to do.

    also say explorer not reading SWF files and I have to reload them? Not sure what that is either,
    Thanks
    Jim

    Hi Nancy
    Trying to update my site got to make some changes.  Do you work on sites via remote? I am on Cloud.
    : Nancy O. 
    Sent: Monday, September 01, 2014 3:47 PM
    To: James Neidner
    Subject:  Need help " Can't find a valid editor for this file extension" not sure why I am getting and this or what to do.
    Need help " Can't find a valid editor for this file extension" not sure why I am getting and this or what to do.
    created by Nancy O. <https://forums.adobe.com/people/Nancy+O.>  in Dreamweaver support forum - View the full discussion <https://forums.adobe.com/message/6692200#6692200>

  • I have some problem with my computer because when i turn it up, the screen turns in a blue colour and the sound doesn't work and in this way i can't hear anything

    i have some problem with my computer because when i turn it up, the screen turns in a blue colour and the sound doesn't work and in this way i can't hear anything

    Will u help me or not?

  • In photoshop CS6 extended my 3D-extrusie does not work. Why? And can I fix this? I am a mac user. Pl

    In photoshop CS6 extended my 3D-extrusie does not work. Why? And can I fix this? I am a mac user. Please help?

    I have paid the full extended version, but it is not working. See my screenshots.

  • HT4623 Why do my iPhone cords for my 5 say it is not certified and may not work with this device? It's the same cord that came with my phone. The only difference is the iOS7 update.

    Why do my iPhone cords for my 5 say it is not certified and may not work with this device? It's the same cord that came with my phone. The only difference is the iOS7 update.
    Maps took me to the completely wrong side of town for a long standing business in town.

    Hello margmcarlson,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at:
    Troubleshooting iPhone, iPad, and iPod touch accessories
    http://support.apple.com/kb/TS2634
    Restore iPhone, iPad, or iPod touch to its factory default state. You should rarely need to use this step with an accessory issue.
    Best of luck,
    Mario

  • Concerning: VGA monitors using an Aluminum Powerbook G4 PowerPC 2004 15"-screen 1.5Ghz  The DVI (converted to VGA) video output stopped working on this computer after 9 years of service. This raises question 1:  Is there any way of fixing this? I've tried

    Concerning: VGA monitors using an Aluminum Powerbook G4 PowerPC 2004 15"-screen 1.5Ghz
    The DVI (converted to VGA) video output stopped working on this computer after 9 years of service. This raises question 1:
    Is there any way of fixing this? I've tried the usual: triple checked all vga cables & devices through trial & error. Bought a new DVI-VGA adapter. Reset PRAM, PMU, etc. Nothing works. Something is probably damaged, because my KVM switch was not working unless I hot-reseated the vga cable into it, leading to this DVI port, and that is pretty rough stuff.
    Question 2 (related):
    This dovetails into this: Can I drive a VGA monitor with the s-video output port on this computer. It would take an s-video (male)-to-15-pin-VGA adapter. Has anyone does this? So far, I haven't even found the adapter mentioned anywhere.
    Thanks for reading this.
    el7

    Thanks for the useful feedback, Knucklesmac. I agree. I must have blown something on the logic board -- because I had a faulty old KVM switch that would not switch between computers without some nasty hot-plugging/unplugging the VGA video cables. (wince!). It's like when Dizzy Dean ruined his arm because a line drive hit him in the foot and he readjusted his mechanics around the injury. I take the blame because this has been a great computer, and does not deserve any blame.
    If it will help anyone else reading this thread, C2G (née Cables to Go) has some interesting ideas for still getting external video out of this computer:
    -USB-to-VGA
    http://www.cablestogo.com/product/30545
    -Convert s-video or composite video signals to high resolution VGA
    http://www.cablestogo.com/product/40971
    The price range is $75-$85, which doesn't make horse sense to me for such an old computer -- which has a lot of life in it anyway, because its own 15" monitor is not chopped liver.
    el7

Maybe you are looking for

  • XML data output file in a directory needs to be published as a pdf report

    Hi, I have already got an XML output file in a directory. I want to display it using RTF template using a concurrent program or some sort of java api in a pdf format to be able to print it. How do I do it? Do I have to write another file output comma

  • Camera Raw 4.2 will not function on MAC OS 10.5

    I am on a Intel Mac running OS 10.5.0. Neither Bridge or Photoshop CS3, which, before I upgraded to an Intel Mac, would open all my photos in Camera Raw, will not do so now. Rather, the file menu line "Open In Camera Raw" is now grayed out. I have do

  • Port Number in Oracle9i for running isqlplus

    Hi all, Just yesterday I installed Oracle9i in my PC which OS is WinXP. After installing, I faced a problem whenever I tried to run isqlplus. Because from Oracle Enterprise Manager console I found Host (pc) & PORT (1521). So, when in IE i gave (http:

  • Custom Exits

    Hi all, I have a requirement to create a report the compares a current year date range to the previous year - same date range. Does anyone have a code on how this can be done using an exit. Any Ideas will be welcome. Thank, PN

  • Adding a field of Active Directory

    Hello, In Active Directory we have a field called Office that is populated. We are using Portal 6.0 SP1 - which syncs with AD via a Remote Authentication Source called Domain and a Profile Source called AD Profile. SSO is enabled. In the AD Profile I