1 19 20 package org.efs.openreports.util; 21 22 import org.displaytag.decorator.TableDecorator; 23 import org.efs.openreports.objects.ReportUserAlert; 24 25 public class AlertTableDecorator extends TableDecorator 26 { 27 public String addRowClass() 28 { 29 ReportUserAlert userAlert = (ReportUserAlert) getCurrentRowObject(); 30 31 if (userAlert.isTriggered()) return "triggered"; 32 return "nottriggered"; 33 } 34 35 public Object getStatus() 36 { 37 ReportUserAlert userAlert = (ReportUserAlert) getCurrentRowObject(); 38 39 if (userAlert.isTriggered()) return LocalStrings.getString(LocalStrings.ALERT_PASSED); 40 return LocalStrings.getString(LocalStrings.ALERT_FAILED); 41 } 42 } 43 | Popular Tags |