Re: [Zope] how to do this?

2007-03-15 Thread Andreas Jung



--On 15. März 2007 11:19:17 +0100 javi lopez <[EMAIL PROTECTED]> wrote:


Hello everyone and thaks for your help:

I have this things:
Zdatabase Conection
zsql method
Controller page template(form)
Controller python script(call zsql method)
controller validator
page template

it´s a form, it stores email and comments in database and it works. I
need put all this inside a product i did,  and when I have to push a
button from a page template (of the product), show me the form, i fill
in it, and it stores data in db.
Can i do it?Can you help me please?


I recommend reading "The Zope Book". It tells you almost everything. If not
you should tell us where it does not explain the basics.

-aj

pgp8NmQw3CC5Z.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] How to do this trick..

2006-03-28 Thread Chris Withers

Hi Jason,

I see a few people have had a stab at this, but I have a feeling I know 
what you really meant ;-)


Jason C. Leach wrote:

I'm wondering how I can do this little trick (sp_info is a globaly devide
var, it's a dictionary obj):




So based on my the value of 'group' from my repeat, I want to use the value
to look up another value in a different dictionary.  It works if I do this:
(event, '${sp_info/whatever/common_name}') but does not like me using the
embedded ${group}.


try this:


  
  


cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] How to do this trick..

2006-03-27 Thread David H

Jason C. Leach wrote:


Hi,

I'm wondering how I can do this little trick (sp_info is a globaly 
devide var, it's a dictionary obj):


tal:attributes="onmouseover string:doTooltip(event, 
'${sp_info/${group}/common_name}')" 
   onmouseout="hideTip()">



So based on my the value of 'group' from my repeat, I want to use the 
value to look up another value in a different dictionary.  It works if 
I do this:  (event, '${sp_info/whatever/common_name}') but does not 
like me using the embedded ${group}.


Thanks,
Jason.


Hi Jason,

I didn't know you could nest ${} objects in a string: construct.

You might make life easier using python.  Maybe something like:

tal:attributes="onmouseover python: sp_info[ group ] + '/' + common_name"

I have no idea what "common_name" is supposed to be, here I assumed its 
a global var.


David



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] How to do this trick..

2006-03-27 Thread J Cameron Cooper

Jason C. Leach wrote:

I'm wondering how I can do this little trick (sp_info is a globaly 
devide var, it's a dictionary obj):


tal:attributes="onmouseover string:doTooltip(event, 
'${sp_info/${group}/common_name}')" 
   onmouseout="hideTip()">



So based on my the value of 'group' from my repeat, I want to use the 
value to look up another value in a different dictionary.  It works if 
I do this:  (event, '${sp_info/whatever/common_name}') but does not 
like me using the embedded ${group}. 


The ${var} syntax is only for inserting a value in a string expression. 
Path expressions only take known names. If you want to look up a value 
based on a variable, you must use Python. Look at the first half of this:


http://plone.org/documentation/how-to/addContentProgrammatically

  --jcc

--
"Building Websites with Plone"
http://plonebook.packtpub.com

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] How to do this trick..

2006-03-27 Thread Ross Patterson





The  tags are to make sure the order of TAL operations
works properly with the tal:define being done *after* the tal:repeat.
Hope this helps.

Ross
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )