Index: lams_admin/web/WEB-INF/lams.tld =================================================================== diff -u -rca73a51b45e6071a6a9edd5da8b0d61bf3a39929 -rf981e7d82c9163e9239cdcca2bfede78095fd841 --- lams_admin/web/WEB-INF/lams.tld (.../lams.tld) (revision ca73a51b45e6071a6a9edd5da8b0d61bf3a39929) +++ lams_admin/web/WEB-INF/lams.tld (.../lams.tld) (revision f981e7d82c9163e9239cdcca2bfede78095fd841) @@ -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 =================================================================== diff -u -r9b0bf1af06d430bf42410223c72fd5670c1fcdb5 -rf981e7d82c9163e9239cdcca2bfede78095fd841 --- lams_central/src/java/org/lamsfoundation/lams/web/tag/HelpTag.java (.../HelpTag.java) (revision 9b0bf1af06d430bf42410223c72fd5670c1fcdb5) +++ lams_central/src/java/org/lamsfoundation/lams/web/tag/HelpTag.java (.../HelpTag.java) (revision f981e7d82c9163e9239cdcca2bfede78095fd841) @@ -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 =================================================================== diff -u -ra2a6ede815624fe9d6f5474ca844e895ddccd9ae -rf981e7d82c9163e9239cdcca2bfede78095fd841 --- lams_central/web/WEB-INF/lams.tld (.../lams.tld) (revision a2a6ede815624fe9d6f5474ca844e895ddccd9ae) +++ lams_central/web/WEB-INF/lams.tld (.../lams.tld) (revision f981e7d82c9163e9239cdcca2bfede78095fd841) @@ -95,20 +95,28 @@ Help tag module - true + false true Help tag toolSignature - true + false true + + Help tag + page + false + true + + +