What am I doing wrong with the following: do i need to handle the String literals returned by my service method in some special way?
I have the service method below called on a transition. Everything works fine unless the service method returns a String (although for example, returning 'success' works). I have another upload Action (where the service does not return a String) working perfectly.
When I return a String (other than e.g. 'success') or null, or some other object everything works as expected however the app fails to transition to the next view (it remains on the file upload page).
The fact 'success' works suggests Strings need to handled in some way???
Service Method
Code:@Service(value = "uploadLetterTemplateService") public class UploadLetterTemplateService { public String processLetterTemplate(FileUpload file) throws IOException { //validate template //return "success";//works //return null;//works //return new AnotherObject(); //works //return "success_"; fails //return //(new String(file.getData().getBytes())); //fails } }Code:<view-state id="uploadLetterTemplate" view="uploadLetterTemplate" model="fileUpload"> <var name="fileUpload" class="com.jpmorganchase.cam.domain.FileUpload" /> <transition to="summaryReport"> <evaluate expression="uploadLetterTemplateService.processLetterTemplate(fileUpload)" /> </transition> </view-state>


Reply With Quote
