It depends on when you're talking about.  Obviously, before displaying the
table, you're creating the list that feeds the table, so you've got access
to that data there.

But since you mention "currently selected" rows, I'm assuming you're
referring to the user posting the table back as a form.

In that case, you'd just wrap the table in a form:

<form action="...">
   <display:table blah>
      <display:column/>
   </display:table>
   <input type="submit"/>
</form>

Whether you use <form>, <html:form>, or whatever else depends on your
framework.  Once the form is posted back to your servlet, you then just
read in the parameters from the request as you normally would.

The big question comes down to what you name your parameters and how
you'll handle that.  This usually happens in the <display:column> tag,
where you can do something like this:

<display:table name="listname" id="item">
   <display:column title="Select">
      <input type="checkbox" name="select<c:out value="${item.id}"/>"/>
   </display:column>
</display:table>

Then, when the user clicks the submit button, what you'll get is a number
of request parameters named selectXXX, where XXX is whatever format your
ID is.

DON'T ask about how to preserve these selections across pages!  You
shouldn't do that (IMHO, of course):

http://sourceforge.net/mailarchive/message.php?msg_id=11466820

Does that answer your question?

Scott Russell said:
> Is there a programatic way to access the data that is currently
> displayed in the table? In other words, is there a way to read
> a particular column's data so I can make a list of the currently
> selected rows?
>
> TIA
>
> Scott
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> displaytag-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/displaytag-user
>


-- 
Rick Herrick
[EMAIL PROTECTED]

I haven't got time for inner peace.

Get out of control, but appear under control. It's not bad to alarm other
people, though--it's good for them.--Hunter S. Thompson


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to