-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validator Module #95
Comments
No. It is not possible. |
Understood. I also wanna say that we tried to implement validator last week but it throws an error. I will post stack trace at monday, when will be in office. |
This is what happens after trying to save any change log in application which contains empty template validator (
|
Ensure please, that you have dependencies from Also, can you clarify if global API is used by your application? |
Nope, AMD is used right now |
And how about dependencies, mentioned earlier? |
Dependecies have written down just about 1 minute ago. There was also added |
How do you think, should we add auto dependencies injection in Platypus.js code to avoid "unused" dependencies? |
@marat-gainullin it better to be. |
Okay, there is another validator issue.
This happens when I try to access change log inside validator. The funny thing about that is this template code works fine: this.validate = function (aLog, aDatasource, aOnSuccess, aOnFailure) {
Logger.info("GlobalServerValidator. aLog.length: " + aLog.length + "; aDatasource: " + aDatasource + ";");
if (aOnSuccess) {
// TODO: place your asynchronous validation code here
} else {
// TODO: place your synchronous validation code here
}
}; This works fine and prints out this:
But if I try to access Logger.info(JSON.stringify(aLog[0])); |
It is because aLog is native Java array, not js array. And so it can't be JSONed. Try |
Works fine now with |
|
Validator still laughing at me :( var log = Java.from(aLog); //Cause aLog is native
var action = log[0]; //First element
Logger.info(JSON.stringify(action)); //This prints 'undefined'
Logger.info(JSON.stringify(action.entity)); //And this prints correct name of entity How can it be possible? |
It is because |
Another funny thing var log = Java.from(aLog); //Cause aLog is native
Logger.info(JSON.stringify(log)); //Prints correct JSON object structure |
Simple questions.
Is
@validator
annotation accept name of datasource defined incontext.xml
or accept name of platypus entity, e.g. query name?Is it possible to create separated validator for single query?
The text was updated successfully, but these errors were encountered: