Validators error [message #894225] |
Sat, 07 July 2012 21:20 |
Nathan Reed Messages: 74 Registered: June 2012 |
Member |
|
|
Windows XP
RichUI with one dedicated service
Migrating from RBD
EDT 0.8.0
I was using the following code in RBD with no issue. When I gen it in EDT it results in the following error:
This method must return a result of type string
I have several of these functions and they all return this error. I have shown one below and the associated RichUI code that uses it.
I assume I need to modify the way this worked from RBD but am not seeing it.
Can anyone offer a suggestion?
Thx,
Nathan Reed
package common;
// basic library
library ValidationLibrary
function validateProcessorName(input string in) returns(string?)
teststring int = 1;
if (input == "")
errortext string = "Processor name cannot be blank.";
return (errortext);
end // End if
end // End function
end
// RichUI segment
ProcessorMasterDefinition_PROCNAME_nameLabel TextLabel { text = "Processor name:" , layoutData = new GridLayoutData { row = 1, column = 1} };
ProcessorMasterDefinition_PROCNAME_field DojoTextField {layoutData = new GridLayoutData { row = 1, column = 2}, width = 360 };
ProcessorMasterDefinition_PROCNAME_controller Controller { @MVC {model = ProcessorMasterDefinition.PROCNAME,
view = ProcessorMasterDefinition_PROCNAME_field},
validators = [validationLibrary.validateProcessorName]};
ProcessorMasterDefinition_PROCNAME_errorLabel TextLabel { layoutData = new GridLayoutData { row = 1, column = 3}, color = "red" };
ProcessorMasterDefinition_PROCNAME_formField FormField { controller = ProcessorMasterDefinition_PROCNAME_controller,
nameLabel = ProcessorMasterDefinition_PROCNAME_nameLabel,
errorLabel = ProcessorMasterDefinition_PROCNAME_errorLabel};
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04621 seconds