Author: ajaquith
Date: Thu Aug 7 20:19:41 2008
New Revision: 683821
URL: http://svn.apache.org/viewvc?rev=683821&view=rev
Log:
Beginning of Stripes JSP-tier refactoring.
Modified:
incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/src/com/ecyrd/jspwiki/tags/ContentTag.java
incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/src/com/ecyrd/jspwiki/tags/RSSImageLinkTag.java
incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/src/com/ecyrd/jspwiki/tags/WikiTagBase.java
Modified:
incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/src/com/ecyrd/jspwiki/tags/ContentTag.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/src/com/ecyrd/jspwiki/tags/ContentTag.java?rev=683821&r1=683820&r2=683821&view=diff
==============================================================================
---
incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/src/com/ecyrd/jspwiki/tags/ContentTag.java
(original)
+++
incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/src/com/ecyrd/jspwiki/tags/ContentTag.java
Thu Aug 7 20:19:41 2008
@@ -164,11 +164,15 @@
String requestContext = m_wikiContext.getRequestContext();
String contentTemplate = m_mappings.get( requestContext );
+ // Next, see if the variable "contentTemplate" is part of the
request
+ WikiEngine engine = m_wikiContext.getEngine();
+ contentTemplate = engine.getVariable( m_wikiContext,
"contentTemplate" );
+
// If not found, use the default name (trim "ActionBean" from
name, and append "Content"
// e.g., EditActionBean yields "EditContent.jsp"
if ( contentTemplate == null )
{
- String beanName = m_wikiActionBean.getClass().getName();
+ String beanName = m_wikiActionBean.getClass().getSimpleName();
if ( beanName.endsWith( "ActionBean" ) )
{
beanName = beanName.substring( 0, beanName.lastIndexOf(
"ActionBean") );
Modified:
incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/src/com/ecyrd/jspwiki/tags/RSSImageLinkTag.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/src/com/ecyrd/jspwiki/tags/RSSImageLinkTag.java?rev=683821&r1=683820&r2=683821&view=diff
==============================================================================
---
incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/src/com/ecyrd/jspwiki/tags/RSSImageLinkTag.java
(original)
+++
incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/src/com/ecyrd/jspwiki/tags/RSSImageLinkTag.java
Thu Aug 7 20:19:41 2008
@@ -95,7 +95,7 @@
JspWriter out = pageContext.getOut();
ResourceBundle rb = m_wikiContext.getBundle(
InternationalizationManager.CORE_BUNDLE );
- if( engine.getRSSGenerator().isEnabled() )
+ if( engine.getRSSGenerator() != null &&
engine.getRSSGenerator().isEnabled() )
{
if( RSSGenerator.MODE_FULL.equals(m_mode) )
{
Modified:
incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/src/com/ecyrd/jspwiki/tags/WikiTagBase.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/src/com/ecyrd/jspwiki/tags/WikiTagBase.java?rev=683821&r1=683820&r2=683821&view=diff
==============================================================================
---
incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/src/com/ecyrd/jspwiki/tags/WikiTagBase.java
(original)
+++
incubator/jspwiki/branches/JSPWIKI_2_9_STRIPES_BRANCH/src/com/ecyrd/jspwiki/tags/WikiTagBase.java
Thu Aug 7 20:19:41 2008
@@ -103,7 +103,7 @@
// It's really bad news if the WikiActionBean wasn't injected (or
saved as a variable!)
if ( m_wikiActionBean == null )
{
- throw new JspException( "Can't find WikiActionBean in page or
request context. Make sure JSP saves it as a variable." );
+ throw new JspException( "Can't find WikiActionBean in page or
request context! (tag=" + this.getClass() + ")" );
}
// Retrieve the WikiContext injected by WikiInterceptor (could be
a fake context!)