[Grok-dev] Inline edit forms

Sebastian Ware sebastian at urbantalk.se
Tue Aug 14 11:16:39 EDT 2007


I think that I am managing to generate the correct fields by using a  
custom method "get_schema()"...

   self.form_fields = grok.AutoFields(obj.get_schema())

...where obj is the object I am editing inline (the context is still  
the parent object). What I am failing to do is to generate the  
widgets from these custom fields. All I get are the widgets of the  
parent (context) object. Any ideas?

Mvh Sebastian

14 aug 2007 kl. 16.10 skrev Sebastian Ware:

> I am trying to use...
>
>   get_context_schema_fields(context)
>
> ...substituting context with the object that I wish to edit, but it  
> still renders the parent containers form fields instead.
>
> Mvh Sebastian
>
> 14 aug 2007 kl. 14.37 skrev Sebastian Ware:
>
>> I have a grok.Container() object that contains som grok.Model()  
>> objects. I want to edit the latter "inline" (master/detail view on  
>> the same page).
>>
>> How do I create the form and form handling code for the inline  
>> edited child. Do I have to do it all manually using formlib, or  
>> can I use the grok edit form.
>>
>>  *******************
>>  * Parent          *
>>  * --------------- *
>>  *|  Inline Form  |*
>>  * --------------- *
>>  *   - child 1     *
>>  *   - child 2     *
>>  *   - child 3     *
>>  *   - child 4     *
>>  *******************
>>
>> Mvh Sebastian
>>
>> _______________________________________________
>> Grok-dev mailing list
>> Grok-dev at zope.org
>> http://mail.zope.org/mailman/listinfo/grok-dev
>
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> http://mail.zope.org/mailman/listinfo/grok-dev



More information about the Grok-dev mailing list