1 2 Previous Next 18 Replies Latest reply: Jan 24, 2013 6:08 AM by HeretoHelp:Prem Go to original post RSS
      • 15. Re: Issue on commitng the data
        AjithGOracle
        Hi,

        When you say that it still saves the record on the click of Apply button, does it mean the record gets saved with "invalid Rebate value" OR the record gets saved with NULL in Rebate column?

        -Ajith
        • 16. Re: Issue on commitng the data
          user5425941
          Hi Ajith,

          thank you.

          testing


          1) actually i have entered the value as 101 in rebate field and tabout then error displayed as invalid value immedeately rebate field has cleared.
          2) then i clicked the save button it is saving the records with null as rebate field in DB.


          Hope you clear the situation

          thanks

          Edited by: user5425941 on Jan 24, 2013 1:33 AM
          • 17. Re: Issue on commitng the data
            AjithGOracle
            Hi,

            That is expected, isnt it? If you do not want NULL to be saved for Rebate field, have that validation too in setRebate() method.
            Note that, this NULL validation exception will be invoked every time the data is posted to the DB.

            If you want this exception to be thrown only while clicking on 'Apply' button, you need to capture the 'Apply' button event and incorporate it there before doing the Commit.

            -Aijth
            • 18. Re: Issue on commitng the data
              HeretoHelp:Prem
              Hi,

              you are writing correct piece of code.

              But the code you are using only works for the limitation on REBATE you have defined . Means it should be between 0 to 100.

              And code is doing well to restrict you entering negative or 100+ values for rebate.

              To deny commit if you are not entering any value for the "Rebate " field , You have to check:
              **** Whether rebate column in your table has been defined a constraint "NOT NULL" ????*

              You can use either of the below ways to stop committing your data if "Rebate " field is null :

              1. Define a NOT NULL contraint for Rebate column in table , then it will be handled by EO itself . And it will throw you an exception once you try to save.
              2. Or make this field REQUIRED in OAF page, and it will be taken care by OAF and it will not allow to proceed if you are not entering value in Rebate field.


              Hope this help ...!!!!!!!!!!!!!!!

              Regards ,
              Prem
              1 2 Previous Next