struts2 - Struts 2 Custom Validator issue -


I have an operation for CRYOUD operation and 3 custom validators.

Two validators work correctly, but not the second. It handles verification correctly, and gives the correct errors, but if there are no errors, then the workflow is not complete, it never reach the action. It seems that it is stuck in the verifier. There is no error in the log file. If I remove the verifier, the operation ends.

I am not sure what I am doing, and I appreciate any help.

  package com.timesheet.validator; Import java.util.Map; Import com.timesheet.action.TimeSheetAction; Import com.timesheet.util.TimeSheetClient; Import com.timesheet.util.TimeSheetHolder; Import com.opensymphony.xwork2.ActionContext; Import com.opensymphony.xwork2.validator.ValidationException; Import com.opensymphony.xwork2.validator.validators.ValidatorSupport; Public class timetable submission provides support {@ Override public throws non-valid (object arg0) validation extension {// Todo auto-generated method stub map session = action context Metacentext (). GetSession (); TimeSheet Action Act = (Timestheat Action) ActionContext.getContext (). GetActionInvocation (). GetAction (); Time Sheet Client Client = act.getClient (); If (session.get ("holder")! = Null) {timeholder holder = (time-holdholder) session.get ("holder"); If ((extra time (holder) and amp; amp; amp; short time (holder)) {client.cleanUp (); AddActionError (arg0); Return; } And {client.cleanUp (); Return; }}} Public Boolean short time (time sheetholder holder) {Boolean did = true; Timeless Holder Day day = holder Dailyhairs (); Switch (Day) {Case Som: setMessageKey ("time.Sheet.mon.less.hours"); Did = wrong; break; Case litigation: done = wrong; SetMessageKey ("timeSheet.tue.less.hours"); break; Case Wed: done = wrong; SetMessageKey ("timeSheet.wed.less.hours"); break; Case Thu: done = false; SetMessageKey ("timeSheet.thu.less.hours"); break; Case Fri: done = wrong; SetMessageKey ("timeSheet.fri.less.hours"); break; Default: Break; } Returned; } Public Boolean extra time (timeholder holder) {Boolean did = true; Time sheetholder Day day = holder more time (); Switch (Day) {Case Som: Set Message Key ("Timeless.max.exeireshors"); Did = wrong; break; Case litigation: done = wrong; SetMessageKey ("timeSheet.tue.excess.hours"); break; Case Wed: done = wrong; SetMessageKey ("timeSheet.wed.excess.hours"); break; Case Thu: done = false; SetMessageKey ("timeSheet.thu.excess.hours"); break; Case Fri: done = wrong; SetMessageKey ("timeSheet.fri.excess.hours"); break; Default: Break; } Returned; }}  

Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -