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

        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?

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

          thank you.


          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


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

            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.

            • 18. Re: Issue on commitng the data

              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 ,
              1 2 Previous Next