Guest User

Untitled

a guest
Dec 14th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. parseValue: function (oValue) {
  2. if(oValue !== null) {
  3. return oValue.trim();
  4. }
  5. return oValue;
  6. },
  7.  
  8. trimString : function(oValue) {
  9. if(oValue !== null) {
  10. return oValue.trim();
  11. }
  12. return oValue;
  13. },
  14.  
  15. mandatoryValueType : SimpleType.extend("text", {
  16. formatValue: function (oValue) {
  17. return oValue;
  18. },
  19. parseValue: this.trimString,
  20. validateValue: function (oValue) {
  21. if (!oValue) {
  22. throw new ValidateException(Utils.i18n("MANDATORY_VALIDATE_ERROR"));
  23. }
  24. }
  25. }),
  26.  
  27. var Utils = {
  28. ...
  29. trimString: function() {
  30. ...
  31. },
  32. ...
  33. parseValue: function() {
  34. this.trimString();
  35. }
  36. ..
  37. }
Add Comment
Please, Sign In to add comment