suppose I have the following table:
db.define_table('product',
Field('name', 'string'),
Field('price', 'integer'),
...)
and other tables referencing the product, e.g.
db.define_table('product_value',
Field('product', db.product),
Field('value', 'integer'))
now I want a page where I can see and edit all details of the product
(price, etc.). Further there should be a list of all product_values of this
product. This list should be a table where I can directly edit all values
and also add new rows. When I submit the product page I want all input
values to be validated and saved (this means also deleting or creating
product_value entries).
Currently I'm doing this manually which is quite time consuming. In the
controller I have to create all input controls for the product values (and
set name/id of input fields to 'product_value_<id>' so I can identify them
later on), when the form is submitted I have to validate all input fields
and then find out which rows of the product_value were deleted, added or
edited.
I'm wondering if there is an easier way in web2py to do this? is it
possible to achieve this with SQLFORM.grid? I want in-place edit for the
product values and only perform db operations when the whole product page
is submitted. Seperate view or edit buttons as shown in the documentation
screenshots are not needed.
Alex
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.