KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sslexplorer > tasks > TaskUtil


1 package com.sslexplorer.tasks;
2
3 import java.util.Locale JavaDoc;
4
5 import javax.servlet.http.HttpSession JavaDoc;
6
7 import org.apache.struts.Globals;
8 import org.apache.struts.util.MessageResources;
9
10 import com.sslexplorer.boot.Util;
11 import com.sslexplorer.core.CoreUtil;
12
13 public class TaskUtil {
14
15     public static String JavaDoc getTaskPath(String JavaDoc path, String JavaDoc bundle, String JavaDoc name, HttpSession JavaDoc session, int width, int height) {
16         MessageResources mr = CoreUtil.getMessageResources(session, bundle);
17         String JavaDoc title = mr == null ? "<Unknown>" : mr.getMessage((Locale JavaDoc)session.getAttribute(Globals.LOCALE_KEY), "taskProgress." + name + ".title");
18         return "Modalbox.show('" + title + "', '/taskProgress.do?url=" + Util.urlEncode(path) + "&bundle=" + bundle + "&name="
19                         + name + "', { width: " + width + ", height: " + height + ", overlayClose: false }); return false;";
20     }
21
22 }
23
Popular Tags