JEEVANATHAM P. /BPCRP/INFOTECH/VASHI wrote the following on 1/5/2006 4:27 AM:

For data grid I am using display Tag.

I have added radio button as a first column of my table.

My problem is
how can I get data when the radio is checked (one row only in which row
radio is checked)?

Something to think about. I'm not sure if the Display tag still uses the Session to store all of it's content. I'm assuming it still does, which to me is pretty lame, but regardless, I still prefer two sets of queries

1) First query brings back my list of objects, that may or may not contain all the information that I'd be particularly interested in editing. So for example maybe I'd have a query return me a list of Orders that just had an "orderID" and "orderName." This is what I'd display on the page.

2) Then based off the "orderID" I'd actually do the lookup of the full "Order" record. Often times this full object contains a BUNCH more stuff - often with a bunch of joins to other tables etc that could be an expensive db operation, so to me it's silly to bring ALL of that back in each object on the first pass just to display some info like "orderID" and "orderName."

I know this isn't the preferred .NET or possibly even JSF way of doing things, but to me it makes the most sense so I do it:)

So in your case Jeevanatham, I'd often just use the unique key on the row and then use that to lookup the actual object from the DB. I guess if your objects don't contain much you could just display them all and use the index to pull the object out of the Collection stored in Session scope. Not my preferred way of doing it, but a lot of people seem to like that approach.


--
Rick

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to