Announcement Announcement Module
No announcement yet.
Spring 3.0 and Tiles 2.1.2 Nested Definitions Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring 3.0 and Tiles 2.1.2 Nested Definitions


    I have setup Spring and tiles to work together making ajax calls. I have this working apart from in the following instance -
    • I have 2 tiles definitions; one nested within another (parent and child).
    • On a jsp page I use the parent tile, which has the child nested within it.

    This works fine when I load the page. However if I have a button on the JSP, that, when clicked makes an AJAX request to load the parent (and nested child) tile I get an error along the lines of -

    org.apache.tiles.jsp.taglib.NoSuchAttributeException: Attribute 'child' not found.
    	at org.apache.tiles.jsp.taglib.InsertAttributeTag.computeAttribute(
    	at org.apache.tiles.jsp.taglib.InsertAttributeTag.startContext(
    	at org.apache.tiles.jsp.taglib.RenderTag.doStartTag(
    	at org.apache.tiles.jsp.taglib.InsertAttributeTag.doStartTag(
    	at org.apache.jsp.WEB_002dINF.view.case_.my_005fcases_jsp._jspx_meth_tiles_005finsertAttribute_005f0(
    	at org.apache.jsp.WEB_002dINF.view.case_.my_005fcases_jsp._jspService(
    	at org.apache.jasper.runtime.HttpJspBase.service(
    	at javax.servlet.http.HttpServlet.service(
    	at org.apache.jasper.servlet.JspServletWrapper.service(
    	at org.apache.jasper.servlet.JspServlet.serviceJspFile(
    	at org.apache.jasper.servlet.JspServlet.service(
    	at javax.servlet.http.HttpServlet.service(
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(
    	at org.apache.catalina.core.ApplicationDispatcher.invoke(
    	at org.apache.catalina.core.ApplicationDispatcher.processRequest(
    	at org.apache.catalina.core.ApplicationDispatcher.doForward(
    	at org.apache.catalina.core.ApplicationDispatcher.forward(
    	at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(
    	at org.springframework.web.servlet.view.AbstractView.render(
    	at org.springframework.web.servlet.DispatcherServlet.render(
    	at org.springframework.web.servlet.DispatcherServlet.doDispatch(
    	at org.springframework.web.servlet.DispatcherServlet.doService(
    	at org.springframework.web.servlet.FrameworkServlet.processRequest(
    	at org.springframework.web.servlet.FrameworkServlet.doGet(
    	at javax.servlet.http.HttpServlet.service(
    	at javax.servlet.http.HttpServlet.service(
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(
    	at org.apache.catalina.core.StandardWrapperValve.invoke(
    	at org.apache.catalina.core.StandardContextValve.invoke(
    	at org.apache.catalina.core.StandardHostValve.invoke(
    	at org.apache.catalina.valves.ErrorReportValve.invoke(
    	at org.apache.catalina.core.StandardEngineValve.invoke(
    	at org.apache.catalina.connector.CoyoteAdapter.service(
    	at org.apache.coyote.http11.Http11Processor.process(
    	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
    However the page still loads. Any ideas why this error is thrown only when making an AJAX call and not on page load?

    Is it possible to nest tiles and then make an AJAX call on the parent that will also load the child?


  • #2
    Could this be a bug that has regressed?

    doing some more digging I can see this bug in particular which is down as fixed. Could this have regressed?


    • #3
      Found a solution

      Don't ask me why it is, but in your jsp for the child tile if you set the defaultValue="" it doesn't throw the error.

      <tiles:insertAttribute name="test" defaultValue="" />
      Go figure...



      • #4
        I have same problem.
        In one of parent the tiles elements I put some tiles-attribute. In child fragment I use then. All was ok till i began to use AJAX "?fragments=someattributename". Now this fragments has no access to attribute, defined in parent tile, as fas as i call for output only this fragment.
        So, actually a have same problem and arror message as a topick starter.
        Is there some enhance in AjaxTilesView from that time for solving this problem?