How to clear exception cache in VO when using OAAttrValException

I am using OAAttrValException to validate that individual required attributes are populated before a user can submit the page. The function i have in the VOImpl is as follows
public void validateRow() {
ArrayList exceptions = new ArrayList();
String address1 = (String)getCurrentRow().getAttribute("Address1");
String postCode = (String)getCurrentRow().getAttribute("PostalCode");
if (address1==null) {
MessageToken[] tokens = { new MessageToken("FIELD", address1) };
exceptions.add( new OAAttrValException(OAException.TYP_VIEW_OBJECT
, getViewObject().getFullName() // VO name
, getCurrentRow().getKey() // VO PKs
, "Address1" // Attribute Name
, address1 // Attribute value
, "XX" // Message product short name
, "NTZZ_CZ_ADDRESS_FIELD_REQUIRED"// Message name
, tokens)); // Message Parameters
if (postCode==null) {
MessageToken[] tokens = { new MessageToken("FIELD", postCode) };
exceptions.add( new OAAttrValException(OAException.TYP_VIEW_OBJECT
, getViewObject().getFullName() // VO name
, getCurrentRow().getKey() // VO PKs
, "PostalCode" // Attribute Name
, postCode // Attribute value
, "XX" // Message product short name
, "NTZZ_CZ_ADDRESS_FIELD_REQUIRED"// Message name
, tokens)); // Message Parameters
OAException.raiseBundledOAException(exceptions);
The problem is that every time you click submit it adds these exceptions to the list of exception already thrown i.e. it doesnt seem to clear the exceptions from the last submit, so the list of exception messages just gets longer and longer. Ideally I would like to flush these messages on submit but before I validate using something like clearAllExceptions() as in the EOImpl, but this method does not appear to be available in he VO.
Does anyone have any suggestions about how I can achieve this?
Thanks,
Danny

Danny,
The simple and straight solution to your problem in that the row validation code you are writing is written in wrong file.VOIMpl file should only contain logic related to query manipulation of View Object. If you wanna do row validation at vo level, this code should go in VORowimpl file and not VOimpl file. In VORowimpl file BC4J framework provides a method called validate(), you can utilise that.The validate() method is automically called every time a post event has been generated.The method in turn invokes validate entity method in each of the entity objects involved in VO.
This validate method is called in process form data in OAF lifecycle. So this how your code should look like in VORowimpl :
public void validate()
super.validate();
ArrayList exceptions = new ArrayList();
String address1 = (String)getCurrentRow().getAttribute("Address1");
String postCode = (String)getCurrentRow().getAttribute("PostalCode");
if (address1==null) {
MessageToken[] tokens = { new MessageToken("FIELD", address1) };
exceptions.add( new OAAttrValException(OAException.TYP_VIEW_OBJECT
, getViewObject().getFullName() // VO name
, getCurrentRow().getKey() // VO PKs
, "Address1" // Attribute Name
, address1 // Attribute value
, "XX" // Message product short name
, "NTZZ_CZ_ADDRESS_FIELD_REQUIRED"// Message name
, tokens)); // Message Parameters
if (postCode==null) {
MessageToken[] tokens = { new MessageToken("FIELD", postCode) };
exceptions.add( new OAAttrValException(OAException.TYP_VIEW_OBJECT
, getViewObject().getFullName() // VO name
, getCurrentRow().getKey() // VO PKs
, "PostalCode" // Attribute Name
, postCode // Attribute value
, "XX" // Message product short name
, "NTZZ_CZ_ADDRESS_FIELD_REQUIRED"// Message name
, tokens)); // Message Parameters
OAException.raiseBundledOAException(exceptions);
Sumit,
Making Arraylist defined globally in VOimpl class would not solve the purpose, because in present code ArrayList has been initialized inside validateRow() method hence, everytime this method is called Arraylist is automatically initialized by new , but the errorstack is not cleared.This code should be at such a place where it should be automaticallyclear the last error stack when its called everytime in framework i.e. validate method in VOImpl or validateEntity method in EOImpl.
I hope this helps.
--Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • How to clear the cache files in folder Temporary Internet Files

    When one user opens files such as pdf. or doc. from Portal,  the same file will be downloaded into the Temporary Internet Files folder. if another user copied the files out of the Temporary Internet Files folder from this computer and save to someplace else, then we face one security problem.
    So my question is: How to clear the cache files in folder Temporary Internet Files??  Can we delete the files automatically when close the files in Portal??
    or is there some ways to make encrypty???
    Thanks very much!

    Hello,
    this is a basical security problem which should be resolved by the OS standard security setup . No other user should have access to the temporary file folders in the personal directory. The user account must be secure. Normaly your security problem should not be a problem if basic security exists on the clients.
    You can resolve this problem if every user has his own account on the client
    The users having no administration permissions on the clients
    The folder for the temporary internet files is placed in the personal profile folder of the user account.
    On default no other user has access rights to you personal folder, this means the client OS is setup correctly.
    You can setup the IE that no temporary files are saved (but it reduces performance)
    You can enable IE to delete automaticly the temporary files if IE is closed.
    Hope it helps.
    Regards
    Alex

  • How to clear app cache on itouch (3.1.3 iOS)

    can someone help with directions on how to clear app cache in 3.1.3?  btw...i don't want to reset since it will result in lost apps that no longer offer versions for 3.1.3

    All you can do is reset the iPod. Nothing is lost
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    For the old-app problem. Delete any newer apps from your iTunes library. Then transfer iTunes purchases to the computer by:
    iTunes Store: Transferring purchases from your iOS device or iPod to a computer
    Just make sure that you do not update those apps in your iTunes library.

  • How to set fetchsize of sql Query when using Database Adapter.

    Hi All,
    I am using DatabaseAdapter to connect to database and retriving huge amount of data.For improvement in the performance I want to set the "fetchsize" of sql query. I know fetchsize can be preset in Java using Jdbc 2.0 API.Please let me know how to set this value in BPEL when using DBAdapter?
    Thanks
    Chandra

    I talked to the developer of the db adapter - and he told me this feature will be available in BPEL PM 10.1.3 (which is supposed to be production later this year, and a public beta soon). If this is an emergency I would recommend going throug Oracle support and have them file an enhancement for 10.1.2.0.2
    hth clemens

  • How to transfer range parameter from vb when using bapi calling

    Hi,everyone.how to transfer range parameter from vb when using BAPI calling?

    Did you get the solution to your problem?  Can you please share it with me. I have a similar problem. I have a VB program that calls RFC function. It works with a single parameter but not with a range of parameters. If you have the solution, could you please share sample codes with me? Thank you so much.

  • How can I show additional tab rows when using many open tabs?

    How can I show additional tab rows when using many open tabs?

    What method (code) did you use to get the Tab bar displaying in the space used for the Navigation Toolbar (location bar)?
    The Tab bar should be displayed above the Navigation Toolbar.
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • How do images embeded in InDesign link when using Creative Cloud on more than two desktops?

    How do images embeded in InDesign link when using Creative Cloud on more than two desktops?

    If I am understanding your question correctly, you shouldn't have to worry about embedded images in InDesign. Once embedded, the image is stored within the file.
    If you are wondering about linked images... InDesign will follow the path on your computer and, if it does not find the image, you will recieve a notification. Edit: To prevent this, I would suggest packaging your file using File > Package... This will create a folder with all of your fonts and linked graphics so that you need not worry about broken links.  I just remembered that you cannot upload folders directly to Creative Cloud so a packaged folder wouldn't be very helpful unless you wanted to upload each file manually.
    The best solution I see right now is to either embed the graphics in the document, or upload the images with your document to relink.
    I hope this helped,
    Michael

  • How do you update the Bios safely when using onboard RAID mirror? Z87-G45

    How do you update the Bios safely when using onboard RAID with Z87-G45?   I'm using a simple two drive, RAID 1 mirror setup.
    I'm currently at bios 1.4, and want to move up.  However, last time I upgraded the BIOS, the machine rebooted with improper settings for the RAID (they get hosed during BIOS flash) and Windows decided to auto-repair the only boot drive it could see, one half of the mirror, because it couldn't see the RAID array correctly and *POOF*  bare-metal reinstall required.   
    My PC will not let me press the DEL key on bootup to access the bios, even with MSI Fast Boot not installed.  It just ignores the DEL key and tries to load windows which, if that happens, will flame-out my RAID array after a bios flash if I can't catch it to enable the RAID first before windows loads.
    I do not want to rebuild my PC again simply because I do a BIOS update.

    FYI: BIOS 1.4 & 1.8 are using the same RAID version: 12.7.0.1936
    based on this RAID surprise should not hapends.
    But as pandaz says if you have no issues, leave bios update alone.
    there are still risks something to messed up,
    best do a backup of your data just in case if you want to try latest version

  • How to clear the caching realm?

    Hello,
    WebLogic Server 5.1 SP 6 on W2k Server
    Is it possible to emtpy the caching realm inside of an EJB?
    The class weblogic.security.acl.CachingRealm
    provides the clearCaches() method, but I don't know how
    to get the actual cache object within an EJB in the WebLogic
    server.
    Thanx in advance,
    Michael

    yeah word
    This works for sure in a servlet or jsp
    <%
    response.setContentType("text/html");
    BasicRealm basicRealm = Security.getRealm();
    try {
    ((CachingRealm) basicRealm).clearCaches();
    } catch (ClassCastException ce) {
    out.println("There is a class cast exception and getRealm ain't no returned
    a CachingRealm");
    out.println("This probably means that you don't have a pluggable realm
    hooked into WebLogic.");
    out.println("No pluggable Realm = no Cachingrealm!");
    %>
    Is there anyway to clear a particular user from the cache. When the user's
    password
    is changed in the database, i would like to remove this user from the
    Caching
    realm. If i call authUserPassword() with incorrect password, will it
    remove the
    User object from Cache?
    Also, in a cluster, how do i remove the User from all WLS instances.
    thanks for your help.
    regards,
    Jegan
    "Tom Moreau" <[email protected]> wrote:
    Why do you need to clear the caching realm?
    Anyway, I think you can do it by (I haven't tried this):
    import weblogic.security.acl.Realm;
    import weblogic.security.acl.Security;
    import weblogic.security.acl.CachingRealm;
    Realm genericRealm = Security.getRealm();
    CachingRealm cachingRealm = (CachingRealm)genericRealm;
    cachingRealm.clearCaches();
    -Tom
    "Michael Saringer" <[email protected]> wrote:
    Hello,
    WebLogic Server 5.1 SP 6 on W2k Server
    Is it possible to emtpy the caching realm inside of an EJB?
    The class weblogic.security.acl.CachingRealm
    provides the clearCaches() method, but I don't know how
    to get the actual cache object within an EJB in the WebLogic
    server.
    Thanx in advance,
    Michael

  • How to clear the cache in the portal browser

    Hello Experts,
    Iam unable to clear the cache in the portal. I tried  clearing the Navigation cache , PRT cache,PCD cache,Database cache,UME cache.
    The senario is in the browser if iam logging with some user X , he should see only 1,2,3 countries, and if i logg off and again logg in the same browser with different user he is seeing same 1,2,3 countries unlike he should see 4,5 countries.
    But if iam opening in different browser iam getting the correct one with cache cleared.
    I want to acheive this in the same browser.
    Qucik help in solving out this cache problem is appreciable.
    Regrds,
    Manasa.

    There is one more important cache: the HTTP Provider Service cache (in VA).
    To find out why the browser is showing the same languages, analyze what the server is sending to the browser with HTTPWatch or Firebug and look at the cache flag. Also check what is the iView cache parameter? Is it user, session, shared or none?
    How do you do the logoff? The best thing is to make sure that the HTTP Session is killed. If not, the portal may send data that is cached for the HTTP Session to the browser. When you open a new browser, you will also open a new HTTP Session. That could be the cause why it is working with a new browser instance.
    br,
    Tobias

  • How to clear items / cache in Apex 4.2

    Can someone explain how clearing cache or session state processes are supposed to work in Apex 4.2?
    I have an application that allows the user to look up records by last name or by social security number
    A look up by SSN is one to one and takes the user to a detail page
    A look up by NAME displays a list of names where the user can select a user and display the same detail page
    The problem is that the application retains the social security number from one look up to the next. So it keeps displaying the same record
    even if you enter or select a different SSN.
    I've tried creating session state processes to either clear specific items or clear the cache on a page, but nothing seems to work.
    Maybe the problem is that I'm not understanding the options for creating these; it says things like  on load before headers, on load after headers, on submit before calculations, after calculations, etc
    The application is read only.  Logically to me, if you are linking from one page to another you need to save the value in the item  but if you are doing a  new search you need to clear it
    So I thought that on the detail page I should clear the items, or clear the cache on the page after submitting
    But can't get this to work

    heres an example
    Page 1 has items P1_SSN and P1_NAME  as well as hidden items P1_TEXT and P1_TEXT2
    The button affiliated with p1_NAME takes the user to page 2 that displaces a list of match names. it has a link which goes to page 3 where P3_SSN matches #SSN#
    The button affiliated with p1_SSN takes the user directly to page 3 where p3_SSN matches #SSN#
    If I log in and search by SSN first, when I get to page 3 I have the correct record
    If I look up by name , I get the list and select a record by SSN I still have the correct record
    then I go back to Page 1 and search by SSN, entering a new SSN. I always get what ever record I previously pulled up when searching by name and selecting from the list
    On Page 1 , I have a process that says on load before regions clear items and I list all the items
    Similarly  on page 3 I have a process after submit and calculations that clears the items
    When creating these processes it asks to list the items, separated by comma. The only place to enter PL/SQL is under conditions, this is not conditional on anything, it should always clear the cache.
    I use this same logic on different pages in the same application - different tables but same flow. It works there. I don't see why it doesn't work here

  • How to clear Local-Cache Entries for a Query in BW?

    Hi There,
    i`m student und i need please your help for my Thesis!!
    I execute the same Query many times in BEx Web Analyzer und note a Query Response Time under ST03N using each time a different READ Mode and Cache Mode is inactiv (Query Monitor RSRT).
    First time i exectue the Query, it reads also from database, second time it uses the local Cache and  that `s okay!
    My problem is:
    When i change the Read mode and execute the Query again, it uses for the first run also the old entries from the Cache so i get wrong response time for the first run!!
    I know that while the mode cache inactiv , the local cache will still be used, so how can i delete the local cache entries each
    time i change the read mode and execute the Query? In Cache monitor (rsrcache) i find only entries for Global cache etc..
    I've already tried to close the session and login in to the System again but it doesn`t solve the Problem!!
    i don't have a permission (access rights) to switch off the complete Cache (local and global ).
    Any idea please??
    Thanks und Best Regards,
    Rachidoo
    P.S: sorry for my bad english!! i have to refresh it soon:)

    Hi Praba,
    the entries stored in RSRCACHE are for global cache, there is no entry for my query in Cache monitor!
    i execute the query in RSRT using java web button and cache mode inactiv so, the results will be stored in local cache.
    this is as below what i want to do for my performance tests in my Thesis:
    1. run a query for the first time with cache inactiv and note runtime of it
    2. run the query again with cache inactiv and note runtime of it
    3. clear the local cache (i don't know how to do it??)
    4. change the read mode of query in RSRT then run the same query for the first time and note runtime of it
    5. run the query again and note runtime of it.
    i'm doing the same procedure for each Read mode.
    the problem is in step 4 , The olap Processor gets the old results form the cache so i get wrong runtime for my tests.
    Generate the report doesn't help, any idea please?

  • How to clear the cache of an applet?

    I m working on an applet displaying images for client side. So server will send me an image(picture),but for the first time i display the image,it will be successfully. when i want to view another new image ,it display the previous image, so i suspect the problem is the cache of the applet.so how do i clear the cache of an applet?

    This is quiet clear:
    http://java.sun.com/products/plugin/1.3/docs/appletcaching.html
    On Windows platform the Java Control Panel has also a "clear cache" option.
    Anyway you may find the cache on your harddrive.
    Hope that helps.

  • Fiori Enhancment - BSP how to clear buffer/cache?

    Hi All,
    So I'm trying to make some enhancmenets to a Fiori app. I have downloaded it and reuploaded is as a new BSP application.
    I wanted to make some changes to the BSP, so I changed the code directly, in SAP.
    I thought I must be doing something wrong, but my changes weren't having any effect.
    To further test this I wrote some nonsense which should ahve broken it... but it still ran fine!
    To test further again I went to SICF and deactivated the node!! ANd it STILL worked fine!
    I opened new sessions in my browser, and new incognito windows, and closed it all and reopened it all, but it STILL works fine!
    There is clearly some kind of caching/buffering going on here, I've found the tables: O2PAGDIR and O2PAGDIRT have buffered values (found out this from ST02)
    But how do I clear it?! I turned buffering off in these tables, to see if that worked, and made another change, and tried to reload the table... but STILL the page loads with no changes.
    Please, can anyone tell me how to clear the buffer/cache that means that when I make UI chanegs in a BSP it doesn't show them?!
    Thank you
    Lindsay

    Hi Mauro,
    I overcame this issue in a variety of ways:
    Firstly, I do all the customisation of the BSP applications locally on my machine.
    Then I upload the whole BSP using the program /UI5/UI5_REPOSITORY_LOAD.
    In order to make sure the display you see in your browser is the up-to-date version, there are various cache clearing things you can do:
    Program /UI5/RESET_CACHEBUSTER - this has no UI, and takes only a second to run
    Transaction /UI5/THEME_TOOL : double click on "Invalidate Cache" to refresh the theme cache (if you have made theme changes)
    Then you have the two model caches mentioned above by Ashish - if you changes the Gateway service but aren't seeing these changes you should run these to ensure the model is up-to-date.
    Browser caches: make sure you browser cache is cleared: for Chrome this is easy: hit F12 (to get Dev toold open), clickk on the cog icon, and tick the box "Disable cache (while DevTootls is open)" - then keep devtools open while refreshing the page.
    The best way to enhance the BSP applications is locally on your machine, and do all your testing locally before uploading.
    I hope this helps, let me know how you get on.
    Lindsay

  • How to clear class cache upon applet startup?

    Hi,
    is there any HTML-tag to force the class loader cache being cleared upon applet startup?
    When I have recompiled the applet code, I am forced to clear the cache in the java plugin console. Is there any way to automate this?
    Thanx in advance

    i know what he's talking about, you have to restart the browser to get it to reload the class files. You may be able to set your browser cache to 1MB, but I think I did that and it didnt work, and I never found a solution. If you're trying to develop your application and you're testing it and this is becoming a problem, use appletviewer to test the applet. Once you have the finished product, make sure it works on IE and Netscape.

Maybe you are looking for

  • Oracle 8i  (8.1.7 - 32bit)  for  AIX 5.1  (downloading)

    Hello, I need to download Oracle 8i (8.1.7 - 32bit) for AIX 5.1. I think it is the newest certificated Oracle db for AIX 5.1 and now I can't find this Oracle version.. Is it possible to find and get it from OTN? Thank you. Regards, Maarit Pddskynen

  • How do I get a image to load first on website?

    Not sure if this is possible, but I have created a website and I have a image as the background. The only problem is that all the other iamges load up before the background. How can I get the background image to load first (so the viewer, when visiti

  • E72 transition animations. Please, make them go aw...

    Enough said! What a great phone (a few bugs, of course, but I guess Nokia would have to have the E72 available in time for Christmas. Hopefully, they will get fixed with the next firmware update) But please, Nokia.... give us the option to turn off t

  • Charm Status hangs while saving Confirm Successful test

    Hi, I'm Unable to set the status to <Confirm successful test>...ChaRM document is hanging without getting saved. Please let me know what are the possible issues.? Sonel

  • How to reduce the size of volume jumps

    I love my itouch gen 5 but the size of the volume jumps annoy me. They are too large.  On say 5 bars, the music is not loud enough, the next bar up, too loud. I have found a simple solution (which didn't show up on google).  Just go to settings, musi