FAQ
grantsmith 2005/04/28 17:27:30

Modified: src/components/org/apache/myfaces/application/jsp
JspTilesViewHandlerImpl.java
Log:
MYFACES-220 closed. Patch from Jason Kissinger

Revision Changes Path
1.13 +22 -2 incubator-myfaces/src/components/org/apache/myfaces/application/jsp/JspTilesViewHandlerImpl.java

Index: JspTilesViewHandlerImpl.java
===================================================================
RCS file: /home/cvs/incubator-myfaces/src/components/org/apache/myfaces/application/jsp/JspTilesViewHandlerImpl.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- JspTilesViewHandlerImpl.java 22 Dec 2004 08:12:36 -0000 1.12
+++ JspTilesViewHandlerImpl.java 29 Apr 2005 00:27:30 -0000 1.13
@@ -41,6 +41,9 @@
* @author Thomas Spiegl (latest modification by $Author$)
* @version $Revision$ $Date$
* $Log$
+ * Revision 1.13 2005/04/29 00:27:30 grantsmith
+ * MYFACES-220 closed. Patch from Jason Kissinger
+ *
* Revision 1.12 2004/12/22 08:12:36 manolito
* Use lastIndexOf instead of indexOf as suggested by sean.schofield@gmail.com on mailing list
*
@@ -196,12 +199,29 @@
tileContext.addMissing(definition.getAttributes());
}
viewId = definition.getPage();
+ // if a controller is defined for this tile, execute it
+ Controller tilesController = definition.getOrCreateController();
+ if (tilesController != null) {
+ ServletResponse response = (ServletResponse) externalContext.getResponse();
+ if (request instanceof HttpServletRequest && response instanceof HttpServletResponse) {
+ try {
+ tilesController.execute(tileContext, (HttpServletRequest) request,
+ (HttpServletResponse) response, servletContext);
+ } catch (Exception e) {
+ throw new FacesException(e);
+ }
+ } // else not executing controller for non-HTTP request/response (is this right??)
+ }
}
}
catch (DefinitionsFactoryException e)
{
throw new FacesException(e);
}
+ catch (InstantiationException e)
+ {
+ throw new FacesException(e);
+ }

dispatch(externalContext, viewToRender, viewId);
}

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categoriesmyfaces
postedApr 29, '05 at 12:27a
activeApr 29, '05 at 12:27a
posts1
users1
websitemyfaces.apache.org

1 user in discussion

Grantsmith: 1 post

People

Translate

site design / logo © 2019 Grokbase