× Discuss on T24 Installation, Setting up the environment, TC Server, jBOSS, Package & Deployment, etc…

Asking about TSDK (Java WebServer Validation)

More
13 years 5 months ago #10009 by k34t
Does any body has any experience imlementing TSDK WebServer Validation side ?
Please give me guidance how to throw an error/exception ?
Coz I already succesfully call java class from WebServer side to fill field ACCOUNT.TITLE.1 and enrichment also.
But when iam trying to throw an error/exception, it's not display the error in the browser.

This is my java code:

public class AcctWebValTj implements Validator{
private ValidationResponse response;
private TAccount currentAccount;
public AcctWebValTj(){
}
public ValidationResponse processRequest(TContract currentContract, TProperty fieldBeingValidated, T24Connection connectionToT24) throws ValidationException {
response = new ValidationResponse();
currentAccount = new TAccount(currentContract);
TProperty accoutTitle = currentAccount.getAccountTitle1();
accoutTitle.setEnrichment("set java");
accoutTitle.setValue("Set JAVA");
accoutTitle.setError("Set Error JAVA");
response.addProperty(accoutTitle);
response.addError("Set Error JAVA Response");
if (TRUE) {
throw new ValidationException("Error from exception");
}
return response;
}
}

Please Log in or Create an account to join the conversation.

  • Steph.
  • Visitor
  • Visitor
13 years 5 months ago #10012 by Steph.
...have you tried with response.addMessage?

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago #10013 by k34t
Yes absolutly, i have try to set response.addMessage().
Whether, response.addError() also not working.

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago #10031 by k34t
Yeah, finally i already successfull to display Error through "Web Server Validation" on IE browser. Yesterday, i am using Firefox browser.

Sory, but i got another problem. Since, "Error" is displayed but the record still commited successfully.

Please Log in or Create an account to join the conversation.

Time to create page: 0.042 seconds