Hi first time poster, first off displaytag is an awesome taglibrary,
thank you!  Secondly please excuse any list-specific faux paux I may
make.  Thridly, I have a question: I was wondering if there is any
technical reason I can't create a "wrapper" tag-file for displaytag
like so:

Tag file: table.tag
=======================================
<jsp:root  version="2.0"
   xmlns:jsp="http://java.sun.com/JSP/Page";
   xmlns:c="http://java.sun.com/jsp/jstl/core";
   xmlns:ajax="http://ajaxtags.org/tags/ajax";
   xmlns:display="http://displaytag.sf.net";
   xmlns="http://www.w3.org/1999/xhtml";>

 <jsp:directive.attribute name="addColumn" />
 <jsp:directive.attribute name="id" required="true" />

 <ajax:displayTag id="${id}" ajaxFlag="displayAjax">
  <display:table class="displaytag"
name="${requestScope.displayTagForm.resources}" id="resource"
   defaultsort="1" defaultorder="descending"
requestURI="${pageContext.request.contextPath}/DisplayTagTest.do">
   <jsp:doBody />
   <c:if test="${addColumn}">
    <display:column>
     <jsp:attribute name="title">
      <ajax:anchors target="${id}" ajaxFlag="addResource">
       <a href="${pageContext.request.contextPath}/DisplayTagTest.do">[Add]</a>
      </ajax:anchors>
     </jsp:attribute>
    </display:column>
   </c:if>
  </display:table>
 </ajax:displayTag>
</jsp:root>
=======================================

Essentially what I am trying to accomplish with this wrapper tag is
give my developers the ability to create a display tag that is ajax'd
out of the box and provides the ability to control whether or not an
extra column is displayed with an ajax'd "[Add]" link in the header.

A user would use the tag from their jsp page like so:
=======================================
<splus:table addColumn="true" id="displayTagFrame">
        <display:column title="Row Num" sortable="true">
                ${resource_rowNum}
        </display:column>
        <display:column title="Language " property="language" sortable="true"/>
        <display:column title="Key" property="key"/>
        <display:column title="Value" property="value"/>
</splus:table>
=======================================

The error I get is this:
javax.servlet.ServletException: javax.servlet.jsp.JspException: Tag
"column" should ne nested in "table"

Now I understand the need to validate that a column is part of a
table, however when the table.tag file is translated those
display:column tags inside the user's jsp file *will* end up being
children of a display:table tag because the table.tag forces this to
be so.  Is there anything I can do here to make this work as I wish?

Thanks,

Craig.

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to