Re: ReferenceField sortieren klappt nicht

"Hedrich, Benjamin" <[email protected]>
Newsgroups gmane.comp.web.zope.german
Message-ID <[email protected]>
Hallo,
vielleicht hilft dir das folgende Produkt weiter:
http://pypi.python.org/pypi/archetypes.referencebrowserwidget/1.0a1

Features:
[...]
allow_sorting: allows you change the order of referenced objects
(requires multiValued=1)
[...]

Gruß aus Berlin.

-- 
Benjamin Hedrich
Informationssysteme
--
Condat AG
Alt-Moabit 91 d | 10559 Berlin | Germany
Tel: +49.30.39 49-1166 | Fax: +49.30.39 49-1300
[email protected] | http://www.condat.de/

Vorstand: Dr. Olaf Schemczyk (CEO), Dr. Christof Peltason
Aufsichtsratsvorsitzender: Dr. Wolfgang Babeck
HRB Berlin Charlottenburg 83319




On Mon, 2009-10-12 at 15:04 +0200, Nico Grubert wrote:
> Hallo zusammen
> 
> Ich möchte gern ein ReferenceField sortieren, das wie folgt definiert ist:
> 
> atapi.ReferenceField('interne_links',
>      widget = ReferenceBrowserWidget(label = u'interne Links'),
>      multiValued = True,
>      relationship='navcontenttyp_interne_links',
>      accessor='getInterneLinks',
>      mutator='setInterneLinks',
>      ),
> 
> Das Problem ist, dass sich die Reihenfolge diese Liste nicht verändert.
> Ich verwende die definierte Mutator Methode 'setInterneLinks' und 
> übergebe eine sortierte Liste 'intlinks', die die referenzierten Objekte 
> enthält:
> 
>    self.setInterneLinks(intlinks)
> 
> 
> Wenn ich danach auf self.getInterneLinks() oder auch self.interne_links 
> zugreife, ist immer noch die alte Liste drin und nicht die neu sortierte.
> 
> Habe ich etwas übersehen?
> 
> 
> Viele Grüsse
> Nico
> 
> 
> _______________________________________________
> zope mailing list
> [email protected]
> https://mail.dzug.org/mailman/listinfo/zope



_______________________________________________
zope mailing list
[email protected]
https://mail.dzug.org/mailman/listinfo/zope
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.