[Plone-IT] Attributo storage=MySQLSQLStorage() per ComputedField

Yuri yurj a alfa.it
Mer 22 Lug 2009 15:12:49 UTC


crirusso78 ha scritto:
> Ah ok, non sapevo.
> Non ho mai usato mutator, quindi ho cercato qualche es. in rete, ma mi da
> ques'eccezione IndexError: tuple index out of range
>
> Il codice č il seguente: 
>
>  StringField(
>         name='stato',
>         mutator = 'setStato',
>         widget=StringField._properties['widget'](
>             label='stato',
>             #visible={'edit': 'invisible', 'view': 'invisible'},
>             label_msgid='Arch_label_stato',
>             i18n_domain='Arch',
>         ),
>         label="stato",
>         storage=MySQLSQLStorage(),
>     ),
>
> def setStato(self,stato):
>   

non č (self, value)?

http://www.devshed.com/c/a/Zope/Plone-Content-Types-With-Archetypes/2/

Non so se c'entra...

>         wf_tool = getToolByName(self,'portal_workflow')
>         statoX = wf_tool.getInfoFor(self, 'review_state')
>         self.getField('stato').set(self, statoX)
>
> Cosa sbaglio?
> Grazie!
> Cri
>
>
> Luca-7 wrote:
>   
>> 2009/7/21 Yuri <yurj a alfa.it>:
>>     
>>> Il computedfield viene calcolato, credo, in fase di visualizzazione, in
>>> plone non viene memorizzato nulla, di conseguenza lo storage non serve:
>>>       
>> Giusto cosė.
>>
>> -- 
>> -- luca
>>
>> _______________________________________________
>> Plone-IT mailing list
>> Plone-IT a lists.plone.org
>> http://lists.plone.org/mailman/listinfo/plone-it
>> http://www.nabble.com/Plone---Italy-f21728.html
>>
>>
>>     
>
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> Plone-IT mailing list
> Plone-IT a lists.plone.org
> http://lists.plone.org/mailman/listinfo/plone-it
> http://www.nabble.com/Plone---Italy-f21728.html





Maggiori informazioni sulla lista Plone-IT