Hello! :) I have implemented following. When a user wants to search for some data in DB, he inputs two filter paramters and we get a new list applied by filter params criteria like in the following code http://pastebin.com/Nuq2E7mb http://pastebin.com/kGVrHqf5
Now, I would like to apply update of all the given tickets( pulled from DB by some criteria ) for some select value, however the thing is that what it returns me is GridDataSource and not List<Tiket> and I have no idea how to manipulate with it. If I had a list I could go for simple void onActionFromUpdateAllTickets(){ for(Ticket t : source ){ biznisLogika.updateValue(t.statusTicket); } and that's it, however I don't know how to turn GridDataSource, or in this case TicketDataSource to List<Tiket>? > From: geoff.callender.jumpst...@gmail.com > Subject: Re: Editing select component within a grid > Date: Wed, 8 Oct 2014 13:55:51 +1100 > To: users@tapestry.apache.org > > Yes, it's not hard to do. Here's a starting point (replace TextField with > Select): > > T5.4: > http://jumpstart.doublenegative.com.au/jumpstart7/examples/tables/editablegridforupdate1 > T5.3: > http://jumpstart.doublenegative.com.au/jumpstart/examples/tables/editablegridforupdate1 > > If you don't require server-side validation of each row, then you can leave > out all the stuff about Map<Integer, FieldCopy>. > > Make sure your Select has a model and an encoder. > > <t:select t:id="thing" value="entity.thing" t:blankOption="ALWAYS" > t:model="thingsModel" t:encoder="thingEncoder"/> > > Instantiate the encoder in onPrepareForRender() and onPrepareForSubmit(). If > the model can be the same in every row then instantiate it, too, in > onPrepareForRender() and onPrepareForSubmit(), else instantiate it for every > row, eg. in setEntity(Entity entity) or in getThingEncoder(). > > HTH, > > Geoff > > On 8 Oct 2014, at 1:35 pm, Chris Mylonas <ch...@opencsta.org> wrote: > > > you will probably have to save between requests what is displayed in your > > grid or at least the range > > > > taking a guess, i'd say grid data source may be where to look > > http://jumpstart.doublenegative.com.au/jumpstart/examples/tables/griddatasources > > > > then run a query accordingly > > > > > > > > > > On Wed, 08 Oct 2014 13:07:35 +1100, Name Surname > > <wintertime0...@outlook.com> wrote: > > > >> Lets say I want to update/edit 10 or 20 or any number records from DB in > >> grid, and I want this action to happen only for one value. That value is > >> to be changed using select component, now when I click on Update all > >> button, it updates all edited records with new values. Now my Q. regarding > >> this is "Is this possible and how to achieve it?". > >> > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > > For additional commands, e-mail: users-h...@tapestry.apache.org > > >