Re: [Zope] Newbie: manage_changeProperties and wrong permission
> <--the point is to adress the propertysheet of the ZClass you are > adressing--> > >expr="propertysheets.Name_of_the_propertysheet.manage_changeProperties({'lstName':newlstName})"> But the lstName is not part of propertysheet of Fir ZClass. It is a simple property of 'cz' subfolder of Fir ZClass. If lstName were inside a property sheet of Fir ZClass, there could not exist multiple 'lstName' properties in different property sheets, because all property sheets have common namespace. Therefore I have my properties in subfolders "cz", "en", "de"... -- Milos Prudek ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE:[Zope] Newbie: manage_changeProperties and wrong permission
Hello Milos, I think the following is working: <--You pass via form the needed values--> <--Then you iterate over a certain meta-type in your folder--> <-- You have to put the correct meta-type you want--> <--and you compare the id of the found objects with any property you want(here the language)--> <--the point is to adress the propertysheet of the ZClass you are adressing--> <--Also you don't have to use REQUEST['value'],because the values of the REQUEST-Object are, if you have used a form action, directly useable)--> Bye Sven ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: [Zope]Newbie: manage_changeProperties and wrong permission
Sven Hohage wrote: > > Hallo Milos, > I'm not sure if I understand your problem right. > First of all what do you mean with 'Fir-class'?Is it a ZClass or a > usual Zope-Folder.I suppose a Zope-Folder!. Oh no. "Fir" is a Product, with a single Z Class "Fir". Within Fir there are two folders and three methods: Products +-- Fir (product) +Fir (Z Class) +--cz (folder) +lst_name (property of cz folder) +lst_text (property of cz folder) +--en (folder) +lst_name (property of cz folder) +lst_text (property of cz folder) +--changeLST_form (method) +--changeLST (method) +--display(method) > You have to call the method "manage_changeProperties" on an Object. An object in my case is a property "lst_name" in "cz" folder. After creating an instance called AAA of Fir ZClass, I can access the "display" method: http://.AAA/cz/display The "display" method simply contains just . Depending on the URL, it displays the "cz/lst_name" or "en/lst_name". Using the same acquisition thinking, the "changeLST" method contains where "lst_name_new" is obtained from a trivial form. I thought that "changeLST" would change the "cz/lst_name" property when called with http://.AAA/cz/changeLST. > This should work: expr="cz.manage_changeProperties({'lst_name':lst_name_new})"> Unfortunately this would require to write many almost identical changeLST methods: one with cz.manage_changeProperties, one with en.manage_changeProperties, and there are many more language versions. As you may have guessed this is a database where every record contains many identical fields (name, text, etc.) for many languages. Like this: +--cz +lst_name +lst_text +--en +lst_name +lst_text +--de +lst_name +lst_text +--ru +lst_name +lst_text The idea is that once a new user selects her preferred language (and a Cookie is set for her), she is transferred to a starting url "http://www.website.org/de/start.htm" and from there she can access the database in her language by simple acquisition, without the need for having each method in many "language" versions, like I said above. I may figured it wrong. Is there a more clever way to do this? -- Milos Prudek ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] RE: [Zope]Newbie: manage_changeProperties and wrong permission
Hallo Milos, I'm not sure if I understand your problem right. First of all what do you mean with 'Fir-class'?Is it a ZClass or a usual Zope-Folder.I suppose a Zope-Folder!. You have to call the method "manage_changeProperties" on an Object. You find in the Zope Quick reference: - manage_changeProperties(REQUEST) Change existing object properties. Change object properties by passing either a mapping object of name:value pairs {'foo':6} or passing name=value parameters URL: -> http://zdp.zope.org/projects/zqr/ZopeQR - This should work: Hope it helps! Sven ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )