What is the best practise for setting dirty flag of a page/view?

For a page/view, normaylly there are 2 things to do for diry data:
1. when it's clean, Save button is disabled, when it's dirty, save button is enabled.
2. when it's dirty and the window is closed, a popup says "you have unsaved data, close will lose the data".
My thought is: it must be handled at client side, because not all valuechange is auto submitted. E.g., you type the 1st letter of a string in a input box, the server side does not know it, but save button should be enabled immediately.
Is it possible to capture all valueChange events in a page or a view at client side?
I'm not sure what is the best practise for setting dirty flag? If there is better solution? Does ADF provide facility for this?

public void save(ActionEvent event){
boolean formValid = isFormValid();
   if (formValid) {
  save button is enabled.
    private boolean isFormValid() {
        boolean valid = true;
        if (Check Condition 1) {
            valid = false;
           showErrorMessage1();
        if (Check Condition 2) {
            valid = false;
           showErrorMessage1();
        return valid;
    private void showErrorMessage1() {
                when it's dirty and the window is closed, a popup says "you have unsaved data, close will lose the data".

Similar Messages

  • What is the best practice for setting up warehouse inventory for oil & gas tank farm

    Hi, i want to know the best practice for setting up warehouse inventory for oil & gas tank farm. SAP has these levels for inventory management in warehouse environment: warehouse-aisle-shelf-bin. To me the bin seems to be the central location for inventory. So do i set up each oil tank as a bin location?

    Hi,
    Please refer below link:
    https://help.sap.com/saphelp_sbo900/helpdata/EN/ad/4f233a7b864c7cbe2b57ad09246adb/content.htm
    SAP Business One 9.0 Training - Feb 6, 2013 - Warehouse Bins - YouTube
    Thanks & Regards,
    Nagarajan

  • What is the best practice for setting up and migrating two notebook users on one desktop

    My wife and I have just purchased a desktop iMac and would like to migrate our 2 notebooks to it.  I plan to use the Migration Application to achieve this.  I am trying to gather information on the best ways to establish a main music library merging ours together, multiple photo libraries keeping ours apart and maintaining unique user log ins.  I'm sure alot of this stuff is may appear to be pretty straight forward setting up multiple users and all, yet we individually have never established multiple users on our personal notebooks, so there will be some bit of learning.  Any advice on the hang ups or tricks users have encountered would be greatly appreciated.  Thank you.

    Step one would be to the steps in Pondini's Setup New Mac guide and migrate your account, apps, and settings from your machine, using the Setup Assistant on first boot. Then, use the Migration Assistant to migrate your wife's account to the machine. That should carry over her photos and music. Merging those libraries should be detailed in the respective help files for iTunes and iPhoto. I don't share anything and only have one account, so I can't help with those details.

  • What is the best practise to provide a text file for a Java class in a OSGi bundle in CQ?

    This is probably a very basic question so please bear with me.
    What is the best way to provide a .txt file to be read by a Java class in a OSGi bundle in CQ 5.5?
    I have been able to read a file called "test.txt" that I put in a structure like this /src/resources/<any-sub-folder>/test.txt  from my java class  at /src/main/java/com/test/mytest/Test.java using the bundle's getResource and getEntry calls but I was not able to use the context.getDataFile. How is this getDataFile method call to be used?
    And what if I want to read the file located in another bundle, is it possible? or can I add the file to some repository and then access it - but I am not clear how to do this.
    And I would also like to know what is the best practise if I need to provide a large  data set in a flat file to be read by a Java class in CQ5.
    Please provide detailed steps or point me to a how to guide or other helpful resources as I am a novice.
    Thank you in advance for your time and help.
    VS

    As you can read in the OSGi Core specification (section 4.5.2), the getDataFile() method is to read/write a file in the bundle's private persistent area. It cannot be used to read files contained in the bundle. The issue Sham mentions refers to a version of Felix which is not used in CQ.
    The methods you mentioned (getResource and getEntry) are appropriate for reading files contained in a bundle.
    Reading a file from the repository is done using the JCR API. You can see a blueprint for how to do this by looking at the readFile method in http://svn.apache.org/repos/asf/jackrabbit/tags/2.4.0/jackrabbit-jcr-commons/src/main/java /org/apache/jackrabbit/commons/JcrUtils.java. Unfortunately, this method is not currently usable as it was declared incorrectly (should be a static method, but is an instance method).
    Regards,
    Justin

  • What is the best way for a family to set up apple ID's and icloud?

    My partner and I have separate apple id's and own a mac book, ipad, 2 iphones and apple tv.  What's the best way to set it all up so we can access everything on each device?  Can we merge our ID's into one and transfer all our payments?  We just registered for icloud and used a new shared email address, but still have our separate apple ID's.  We have separate email addresses, calendars and notes that we would prefer to keep separate.  It's really just our itunes purchases, music and photos that we want to be able to share.  Thanks in advance!  Cheers, Nicky

    They will be able to download everything that was bought with their Apple ID. If they all shared an ID then they switched to their own ID they won't be able to use any apps or music bought with another Apple ID. As I explained in my previous response. There is only one way to share apps and content across multiple Apple ID's and that is home share. So, NO there isn't a "Smooth" way to do it.

  • Our granddaughter has a ipod. She's getting a iphone and a mini idpad.  what is the best way to set them up. Does she need a new apple id and password or would she use the same one she has for her ipod

    our granddaughter has a ipod. She's getting a iphone and a mini idpad.  what is the best way to set them up. Does she need a new apple id and password or would she use the same one she has for her ipod

    Just use the same one on all devices.

  • What's the best way to set up new imac for logic etc?

    In brief:
    Getting new imac (27", 3.4 i7, 8-16GB ram, 1TB HD). Will be using it mainly to run Logic Studio (loads of plugins) and Final Cut Express. I also have 2 external Hard drives one 500G one 1TB.
    The last imac I bought was my first and just went ahead and threw everything at it not really knowing where things should go. This time I want to set things up correctly.
    Basically, with what I've got, what is the best way to set things up. I.e where do I put logic files, samples, BFD2, Amplitube etc. Where do I put videos for use in FCE. Storing projects and backups for use with Time Machine.
    Also noticed the new imac will only have 1 firewire port. I will need to plug in the Hard drives (daisy chained), camera and RME Fireface 800. Was thinking of getting a Thunderbolt Hard drive but they are expensive and hard to find.
    Would really appreciate any help before I get the new machine and start messing things up again.
    Thanks.

    Adding to babowa, enable the system firewall in System Preferences>Security>Firewall tab. Click Advanced and check Stealth Mode.
    Lion is a pretty steady and secure operating system, and as there really aren't MANY Mac viruses, there ARE viruses out there still. OS X is pretty good about letting you know if you do accidently download a virus, and it will help you throw it away if it detects one, such as the MACDefender virus. OS X has built in security features such as sandboxing that doesn't allow viruses in as easily as a Windows PC. As for hackers, as long as you have the firewall enabled and a secure password (for your computer and email accounts), then you should be fine.
    It's the user that lets the virus in, not the computer (unless there's some untold serious vulnerability in OS X, which is highly unlikely). Keep your apps up to date, don't download pirated software, and be street smart on the internet. Don't download things or visit websites that you don't think are real. Safari includes a Phishing feature that automatically detects known phishing sites, protecting you from that big problem. Keep your passwords secure and you should be fine.
    There are antivirus solutions out there, one notable one available in the AppStore is Intego's VirusBarrier (free and plus versions), if you feel you still need one.
    I wouldn't worry about it. Windows users who switch to Mac are always asking these questions.
    Here's some good reading as well
    http://www.apple.com/macosx/what-is/security.html
    Enjoy OS X Lion

  • What is the best way to set up an external drive for video storage

    What is the best way to set up an external drive for video storage?

    Check the formatting. It need to be formatted as Mac OS Extended (journaled). This is also known as HFS+.
    FAT32 and NTFS formatting will not work with iMovie.
    If necessary, you can reformat using Disk Utility.
    Make one large partition. No need for multiple partitions.
    Do moves or copies to the external drive through iMovie as detailed in iMovie Help. If you move Events in the Finder, they may become unlinked from the projects that use them.

  • What's the best iTunes import setting for highest quality and universality?

    What's the best iTunes import setting for highest quality and universality?

    Highest quality?
    Apple Lossless. (But the files are way big)
    Universality?
    MP3 (choose the bit rate you think sounds best and doesn't take too much space)

  • What is the best program for playing games,dics,3d settings such as "groove setting"

    what is the best program for playing games,dics,3d settings such as "groove setting"?

    Aubry,
    why don't you send your sequences straight to Compressor first, encode your movies as MPEG 2 and AC3 audio and import all assets in DVD studio PRO?
    G.

  • What is the best time to set for my iMac intel to get to sleep?

    what is the best time to set for my iMac intel to get to sleep? the default is 10 minutes, i am changing it to 1 houirs but i put the sleep time for my monitod 10 minutes. is it decent?

    steve359 wrote: The longer it runs, the shorter the expected life (just plain logic),
    but if it MUST run 24x7, then likely one has budgeted for a new system
    within 3 years anyway.
    Not so sure of that "just plain logic." Allowing  sleep too often will cause wear on the drive -- excessive spin up and spin down. Temperature permitting, a drive will last longer if just left running.
    For other hardware, a lot will have to do with the internal temps. When it's quite hot here, I allow the computer to sleep more often. But otherwise, it's a bit of this and a bit of that. I wouldn't personally recommend running 24/7, although I know of several here who claim they do, with no apparent adverse effects over many years.

  • TS3367 I own iPad mini and iPhone 4. I'd like to use FaceTime to talk to my partner whilst I'm in hospital. What's the best way of setting it up. Can I use my apple username for both devices?

    So have iPad mini and iPhone. But I'd like to leave my iPad with my partner whilst I'm in hospital so we can FaceTime each other.
    What's the best way of setting this up!

    http://support.apple.com/kb/HT4319

  • HT204053 We bought our daughter a iPad mini for christmas. Should we set her up her own apple ID or use the one we have. What is the best way for her for school?

    We bought our daughter an iPad Mini for Christmas. Should we create her own apple ID or use the one we currently have for her device as well? What is the best way for her school work?

    Her own ID.  You cannot transfer purchases between IDs so anything bought on your account will require your authorization should she need to download in the future.

  • What Is The Best Way To Set Up Kids iTouch To My iTunes?

    I have an iTouch set up with my iTunes music, movies and apps, but now I gave my kids each an iTouch.
    What is the best way to set up there account, should it be a unique account for each of them or should I put them under my account?
    They will be using my same iMac when they sync or update there iTouch, so will they need to log in under their name every time?
    Not sure what is the best way to set this up, they are both minors, i.e. no credit card.
    Thanks

    Better just your account for multiple devices. The only drawback is that the music will have to managed manually.
    Connect one of the iPods to your computer then launch iTunes. You should see the iPod under Devices on the left side of the iTunes window. Double click then you can name each iPod to keep them separate but only syncs to your iTunes account.
    Without knowing your Apple ID user name and password they would not be able to make purchases ergo no downloads you aren't aware of.
    How to use multiple iPods, iPads, or iPhones with one computer
    The kids are minors.. if they are under 13 years of age, according to Apple, they can't have their own accounts regardless.
    http://www.apple.com/legal/itunes/us/terms.html#GIFTS

  • What is the best way of setting up Family Sharing?

    I just bought my son an iPad Mini and I am trying to decide on what is the best way of setting it up for him. The one thing I do know is that I do NOT want all the content that is my iPhone 6 to pop up on his iPad Mini. I want his iPad to be used for his games and educational stuff and his own music. I don't mind setting up a family photo album and share photos with the family. So is the Family Sharing option the best way of doing this based on what I just mentioned? Do I set him up with his own Apple ID? If so will everything still be based off my account so he won't have to create his own iTunes Library?
    I always use iTunes gift cards to purchase music and content. Will I be able to continue to use them even if I want to put some new content on his iPad and not my iPhone? Do I enter in his Apple ID info. Can you restrict certain family members to just certain things for example you only want to share photos with one person whereas you might want to share your music with another family member?
    Any suggestions on the best way of setting this up would great!
    Thanks!

    Hi DVX100Shooter,
    Congratulations on getting your son a new iPad, I am sure he will enjoy it. 
    Family Sharing is one way of managing both purchases and content between members of a related group of people. Each member must have their own Apple ID. You can choose what music you wish to share with the family from your own account. See this article -
    OS X Yosemite: Share purchases with your family
    In particular the section titled Hide a purchase from other family members
    The music library on your son's iPad is separate from yours, but under Family Sharing you agree to pay for all purchases made through the iTunes store. If you wish to control what is purchased you can set up the Ask to Buy option for any family member under adult age in your location. See this article for details -
    Request and make purchases with Ask to Buy - Apple Support
    Gift cards may not be used for billing of purchases under family sharing, with the exception that a family member may use gift cards to purchase their own content. See this article for information about Family Sharing billing policies -
    Family purchases and payments - Apple Support
    The shared family photo album is available to all family members.
    Family Sharing - Apple Support
    Thanks for using Apple Support Communities.
    Best,
    Brett L 

Maybe you are looking for