[Cppcms-users] Loading data into forms
Brought to you by:
artyom-beilis
From: <ele...@ex...> - 2012-01-30 02:40:47
|
Hi, I've just recently started experimenting with cppcms and so far I quite like it. (thanks!) I've been studying the message board code in the examples section to get my head around things and at the same time developing a simple blog application. My question is this - what is the best way to load data from database into a typical edit form, make it available for user to edit and submit changes? One way I think I could do it is simply cpdbb::result >> user.id >> user.name >> user.title etc and then copy the values into the members of the form struct. Is this the preferred way or is there another? Should this be done in the controller or elsewhere? Thanks, Petr |