Lift row Autocomplete & co

23 views
Skip to first unread message

Markus Knecht

unread,
Apr 14, 2014, 3:19:34 AM4/14/14
to lif...@googlegroups.com
Hi,

Some years ago I have created an small application with lift and now i want to improve it.
I have a simple table which i populate by rendering  a row for each object in a list i have, where the coloumns are properties of the object.
These coloums are editable and sended back when a submit button is clicked and are then saved on the server. In adition their are some read only coloumns with some calculated values.

So now to my question (info: i'm relatively unexperienced with lift, this is the only thing I have done until now)

1. I would like to have a per row auto complition:
      Example:
          if we have Persons: Name, Surname, Age
          and he types "Car" into the name, then i want to go to the db and display an auto completion box with for example:
              Carlo | Nicola | 54
              Carla | Frei | 29
              .........................
          and if he chooses one of them all three fields in the table are filled.
       So what i want is to make suggestions for the whole row from the current values typed into te row.
     Is their an easy way to do this?

2. Is their an easy way which allows me only to send the diffs to the server and only change the rows in the db with really have changed. Because often I send down 30+ rows, the user edits one field, send all data back. This leads sometimes to bad respons times if multiple people type data in.

3. Is their an easier way to edit a whole table then the one I choose (some fancy widget or so?)

Kind Regard Markus Knecht

Antonio Salazar Cardozo

unread,
Apr 15, 2014, 6:47:33 PM4/15/14
to lif...@googlegroups.com
Sorry no one's had a chance to get back to you—this is a pretty complex quesiton.

The simplest pointer I could give you is to have a look at Wiring. It may or may not help with your use case;
my knowledge of Wiring isn't super-deep. But I feel like it could be useful. Wiring should help with diffs and
a variety of other things as well, as it keeps server state synced to the client, if I remember correctly.

I don't think wiring will help you do auto-completion necessarily (though I'm not sure), but you can probably
hook up autocompletion separately via a JSON API built on RestHelper.
Thanks,
Antonio
Reply all
Reply to author
Forward
0 new messages