Author: apetrelli
Date: Wed Oct 11 04:32:43 2006
New Revision: 462774
URL: http://svn.apache.org/viewvc?view=rev&rev=462774
Log:
SB-21
Removed "definitionName" property, since its corresponding TLD attribute was
already removed and it is not referenced by any working code.
I also made a small clean-up of the code.
Modified:
struts/sandbox/trunk/tiles/tiles-core/src/main/java/org/apache/tiles/taglib/InsertTag.java
Modified:
struts/sandbox/trunk/tiles/tiles-core/src/main/java/org/apache/tiles/taglib/InsertTag.java
URL:
http://svn.apache.org/viewvc/struts/sandbox/trunk/tiles/tiles-core/src/main/java/org/apache/tiles/taglib/InsertTag.java?view=diff&rev=462774&r1=462773&r2=462774
==============================================================================
---
struts/sandbox/trunk/tiles/tiles-core/src/main/java/org/apache/tiles/taglib/InsertTag.java
(original)
+++
struts/sandbox/trunk/tiles/tiles-core/src/main/java/org/apache/tiles/taglib/InsertTag.java
Wed Oct 11 04:32:43 2006
@@ -25,7 +25,6 @@
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.PageContext;
@@ -38,8 +37,6 @@
import org.apache.tiles.ComponentContext;
import org.apache.tiles.ComponentDefinition;
import org.apache.tiles.Controller;
-import org.apache.tiles.DefinitionsFactoryException;
-import org.apache.tiles.FactoryNotFoundException;
import org.apache.tiles.NoSuchDefinitionException;
import org.apache.tiles.TilesUtil;
@@ -84,11 +81,6 @@
*/
protected boolean isErrorIgnored = false;
- /**
- * Name of component instance to include.
- */
- protected String definitionName = null;
-
/**
* Optional attribute to explicitly specify whether the thing being
* inserted is a(n) definition, attribute, or template.
@@ -125,7 +117,6 @@
super.release();
- definitionName = null;
flush = true;
name = null;
template = null;
@@ -179,13 +170,6 @@
}
/**
- * Get definition name.
- */
- public String getDefinitionName() {
- return definitionName;
- }
-
- /**
* Set flush.
*/
public void setFlush(boolean flush) {
@@ -483,22 +467,15 @@
tilesContext);
if (definition == null) { // is it possible ?
- throw new NoSuchDefinitionException();
+ throw new NoSuchDefinitionException(
+ "Error - Tag Insert : Can't get definition '"
+ + name
+ + "'. Check if this name exists in definitions
factory.");
}
return processDefinition(definition);
} catch (NoSuchDefinitionException ex) {
- throw new JspException(
- "Error - Tag Insert : Can't get definition '"
- + definitionName
- + "'. Check if this name exists in definitions
factory.", ex);
-
- } catch (DefinitionsFactoryException ex) {
- if (log.isDebugEnabled()) {
- ex.printStackTrace();
- }
-
// Save exception to be able to show it later
pageContext.setAttribute(
ComponentConstants.EXCEPTION_KEY,