1 package org.tigris.scarab.screens; 2 3 48 49 import org.apache.turbine.RunData; 51 import org.apache.turbine.TemplateContext; 52 53 import org.tigris.scarab.tools.ScarabRequestTool; 55 import org.tigris.scarab.tools.ScarabLocalizationTool; 56 import org.tigris.scarab.util.Log; 57 import org.tigris.scarab.om.Issue; 58 59 65 public class ViewIssue extends Default 66 { 67 protected String getTitle(ScarabRequestTool scarabR, 68 ScarabLocalizationTool l10n, 69 RunData data, TemplateContext context) 70 throws Exception 71 { 72 String title = null; 73 try 74 { 75 String currentIssueId = data.getParameters().getString("id"); 76 Issue issue = null; 77 if (currentIssueId != null) 78 { 79 issue = scarabR.getIssue(currentIssueId); 80 } 81 if (issue == null) 82 { 83 title = l10n.get("ViewIssue"); 84 } 85 else 86 { 87 String name = issue.getModule().getRModuleIssueType(issue.getIssueType()).getDisplayName(); 88 String id = l10n.get("ID"); 89 String unique = issue.getUniqueId(); 90 title = name + " " + id + ": " + unique; 91 } 92 } 93 catch (Exception e) 94 { 95 title = l10n.get("ViewIssue"); 96 Log.get().debug("", e); 97 } 98 return title; 99 } 100 } 101 | Popular Tags |