Index: lams_admin/web/WEB-INF/lams.tld =================================================================== RCS file: /usr/local/cvsroot/lams_admin/web/WEB-INF/Attic/lams.tld,v diff -u -r1.6 -r1.7 --- lams_admin/web/WEB-INF/lams.tld 28 Sep 2006 23:24:42 -0000 1.6 +++ lams_admin/web/WEB-INF/lams.tld 18 Oct 2006 09:15:07 -0000 1.7 @@ -95,20 +95,28 @@ Help tag module - true + false true Help tag toolSignature - true + false true + + Help tag + page + false + true + + + @@ -383,6 +391,10 @@ /WEB-INF/tags/TabBody.tag + TabName + /WEB-INF/tags/TabName.tag + + FCKEditor /WEB-INF/tags/FCKEditor.tag Index: lams_central/src/java/org/lamsfoundation/lams/web/tag/HelpTag.java =================================================================== RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/web/tag/HelpTag.java,v diff -u -r1.4 -r1.5 --- lams_central/src/java/org/lamsfoundation/lams/web/tag/HelpTag.java 26 Sep 2006 05:49:13 -0000 1.4 +++ lams_central/src/java/org/lamsfoundation/lams/web/tag/HelpTag.java 18 Oct 2006 09:14:04 -0000 1.5 @@ -57,6 +57,7 @@ private static final Logger log = Logger.getLogger(HelpTag.class); private String module = null; + private String page = null; private String toolSignature = null; /** @@ -74,43 +75,50 @@ String country = null; String helpURL = null; String fullURL = null; - String toolSig = getToolSignature(); JspWriter writer = pageContext.getOut(); - + writer.println("
"); try { - // retrieve help URL for tool - ILamsToolService toolService = (ILamsToolService) getContext().getBean(AuthoringConstants.TOOL_SERVICE_BEAN_NAME); - IToolVO tool = toolService.getToolBySignature(toolSig); - - helpURL = tool.getHelpUrl(); - - if(helpURL == null) - return SKIP_BODY; - - // construct link - - Locale locale = (Locale) session.getAttribute(LocaleFilter.PREFERRED_LOCALE_KEY); - if ( locale != null ) { - language = locale.getLanguage(); - country = locale.getCountry(); - } - - fullURL = helpURL + module + "#" + toolSig + module + "-" + language + country; - writer.println("
"); - writer.println(""); - writer.println("
"); - + + if(toolSignature != null && module != null) { + // retrieve help URL for tool + ILamsToolService toolService = (ILamsToolService) getContext().getBean(AuthoringConstants.TOOL_SERVICE_BEAN_NAME); + IToolVO tool = toolService.getToolBySignature(toolSignature); + + helpURL = tool.getHelpUrl(); + + if(helpURL == null) + return SKIP_BODY; + + // construct link + + Locale locale = (Locale) session.getAttribute(LocaleFilter.PREFERRED_LOCALE_KEY); + if ( locale != null ) { + language = locale.getLanguage(); + country = locale.getCountry(); + } + + fullURL = helpURL + module + "#" + toolSignature + module + "-" + language + country; + + writer.println(""); + + } else if(page != null){ + writer.println(""); + } else { + log.error("HelpTag unable to write out due to unspecified values."); + writer.println(""); + + } } catch (NullPointerException npe) { - log.error("HelpTag unable to write out due to NullPointerException. Most likely your Tool Signature was incorrect.", npe); + log.error("HelpTag unable to write out due to NullPointerException. Most likely a required paramater was unspecified or incorrect.", npe); // don't throw a JSPException as we want the system to still function. - - writer.println("
"); + writer.println(""); - writer.println("
"); } + writer.println("
"); + } catch (IOException e) { log.error("HelpTag unable to write out due to IOException.", e); // don't throw a JSPException as we want the system to still function. @@ -124,7 +132,7 @@ /** * @return module * - * @jsp.attribute required="true" + * @jsp.attribute required="false" * rtexprvalue="true" * description="Module Name" */ @@ -148,7 +156,7 @@ /** * @return * - * @jsp.attribute required="true" + * @jsp.attribute required="false" * rtexprvalue="true" * description="Tool Signature" */ @@ -163,5 +171,25 @@ public void setToolSignature(String toolSignature) { this.toolSignature = toolSignature; } + + /** + * @return page + * + * @jsp.attribute required="false" + * rtexprvalue="true" + * description="Page Name" + */ + public String getPage() { + return module; + } + + /** + * + * @param page + */ + public void setPage(String page) { + this.page = page; + } + } Index: lams_central/web/WEB-INF/lams.tld =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/WEB-INF/Attic/lams.tld,v diff -u -r1.30 -r1.31 --- lams_central/web/WEB-INF/lams.tld 12 Oct 2006 06:16:29 -0000 1.30 +++ lams_central/web/WEB-INF/lams.tld 18 Oct 2006 09:14:04 -0000 1.31 @@ -95,20 +95,28 @@ Help tag module - true + false true Help tag toolSignature - true + false true + + Help tag + page + false + true + + +