001package com.hfg.javascript; 002 003import java.util.HashMap; 004import java.util.Map; 005 006public class HfgPopupMenu 007{ 008 private static String sCachedJs; 009 010 //-------------------------------------------------------------------------- 011 /** 012 Generates the generic javascript methods for creating a popup menu. 013 */ 014 public static synchronized String generateJavascript() 015 { 016 if (null == sCachedJs) 017 { 018 Map<String, String> tokenSubstitutionMap = new HashMap<>(); 019 020 sCachedJs = JsUtil.getJSResourceAsString("hfgPopupMenu.js", tokenSubstitutionMap); 021 } 022 023 return sCachedJs; 024 } 025}