Hi
I did this some time ago, very low tech, but it works:
<%@ taglib uri="/WEB-INF/dbforms.tld" prefix="db" %>
<db:dbform action="admin_approved.jsp" multipart="false" followUp="/admin_approve.jsp" maxRows="*" tableName="PS2TASK">
<db:header>
<db:errors/> <table>
</db:header>
<db:body>
<tr>
<td></td><td><input type="checkbox" name="taskid" value="<%= (String)currentRow_PS2TASK.get("TASKID") %>"/></td>
</tr>
<% currUser = (String)currentRow_PS2TASK.get("USERNAME"); %>
</db:body>
<db:footer>
</table>
<br />
<input type="reset" value="Reset" /> <input type="submit" value="Submit" />
</db:footer>
</db:dbform>
Then on the page to submit to (in my case admin_approved.jsp), you could have something like this:
<%
String[] taskids= request.getParameterValues("taskid");
%>
<table>
<%
for (int i = 0; i < taskids.length; i++) {
//do whatever with taskids[i]
// Either call JasperReports which support Excel output, or
// do this dirty Excel hack:
response.setHeader("Content-disposition","attachment; filename=taskid_report.xls");
<tr>
<td><%= taskids[i] %></td>
</tr>
}
%>
</table>
Which will prompt to to save taskid_report.xls with the data transferred
best regards Audun
Bill Tribley wrote:
I need to manage email and membership group lists. Most of the groups I am dealing with have between 2 and 50 members, all drawn from people I have recored in a members table.
To do this record-by-record is very time consuming. Most people would rather just have the list in a 2D grid tool like Excel where they can work the whole list at once. The goal here is to present a list of members where multiple records may be selected for a common action with a single submit.
One solution is to set up the presentation using dbforms, then handle the submit with Perl or with a custom Java class. I am good at perl, a Java newbie, but if I did it in Java it is possible that it could become part of dbforms. It is also possible that dbforms can already do this, and I just don't see how.
The two screens below would be easy to construct if the associatedRadio had something like a multiSelect="true" attribute that, if set, would allow more than one associatedRadio to be clicked. Any action that would normally be done to the single associatedRadio record is now done on the set of records.
Search and Add Screen
Search for members, post a screen with member names and checkboxes that can be clicked so that when the form is submitted the member_id for each checked member is added to a membership list
Review and Delete Screen
Present the membership list for a specific group with a checkbox for each member. All members with checked boxes will be deleted (or deactivated, or upgraded or whatever) upon pushing a button in the form footer.
Any ideas on how to proceed would be appreciated.
Thanks in advance, Bill
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ DbForms Mailing List
http://www.wap-force.net/dbforms
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ DbForms Mailing List
http://www.wap-force.net/dbforms
