Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=4372977 By: molloyda
Hi, I have had some success thanks to both you and Yannick. Certainly, the property attribute works for some of the fields I am trying to display. However, others have some HTML decoration around them, such as dynamically coloring particular values etc. So the <c:out> tag would give me some facility to display this information without a table decorator (not sure how to use these as I haven't had to yet either). So I now have some fields referencing with properties and they work perfectly. The other message from Yannick sorted me out for the other fields. Here is some "working" code (reason for quotes below): ----------------------------- <c:set var="rowstyle" value='student1' /> <% int count = 0; %> <c:forEach items='${studentResultInformation}' var='student' varStatus='status'> <c:set var="tableid" value="${student.ID}" /> <% count++; %> <ajax:displayTag id="<%= "ajaxflag" + count %>" ajaxFlag="<%= "ajaxflag" + count %>"> <display-el:table requestURI="broadsheet/broadsheet_programme_body.jsp" name="${student.broadsheetModuleResultsVector}" class="displaytag" defaultsort="2" defaultorder="ascending" export="true" uid="${tableid}" excludedParams="ajax"> <display-el:column title="Code" property="modCode" sortable="true" headerClass="sortable" /> <display-el:column title="Description" property="modDesc" sortable="true" headerClass="sortable" /> <c:forEach items='${student.yearsForWhichStudentHasModuleResults}' var='year' varStatus='ystatus'> <display-el:column title="${year}" sortable="true" headerClass="sortable"> <c:choose> <c:when test='${pageScope[tableid].yearMark[year].passed}'> <a class="pass"><c:out value="${pageScope[tableid].yearMark[year].resmodoverallmark}" /></a> </c:when> <c:otherwise> <a class="fail"><c:out value="${pageScope[tableid].yearMark[year].resmodoverallmark}" /></a> </c:otherwise> </c:choose> </display-el:column> </c:forEach> <display-el:column title="CM" sortable="true" headerClass="sortable"> <c:out value="${pageScope[tableid].calculatedMark}" /> </display-el:column> </display-el:table> </ajax:displayTag> ----------------- The reason I say "working" is because it works to some extent. Each of the tables displays and looking at the source, they all have default divs, such as shown below: <div id='ajaxflag1'> <table id="55141820" class="displaytag"> <thead><tr><th class="sortable"> <a href="javascript://nop/" onclick="new Ajax.Updater('ajaxflag1', 'broadsheet/broadsheet_programme_body.jsp?d-3833730-s=0&d-3833730-o=2&ye ar=c&code=menn&displayAjax=true'); return false;">Code</a></th> .... etc. All of the tables independently export correctly and they look great! When I sort the first table, it all works flawlessly. But when I try to sort any of the subsequent tables, they get overwritten with the data from the first table. I'm not sure at all how to fix this - I had assumed that giving a unique id 'ajaxflag1', 'ajaxflag2', etc. would be enough - but this doesn't appear to be the case. Many thanks for the help so far to get me here. Perhaps, I'm venturing into ajaxtags territory now though. Has anyone successfully gotten multiple tables sorting and exporting using Ajaxtags? Many thanks, David Molloy ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=249318 ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ displaytag-user mailing list displaytag-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/displaytag-user