Why does <dtml-in expr="getCsbans(sort='<dtml-var "REQUEST.get('sortid')">')" size=100 start=query_start> give "Invalid attribute name, "REQUEST.get('sortid')", for tag <dtml-in expr="getCsbans(sort='<dtml-var "REQUEST.get('sortid')">')" size=100 start=query_start>, on line 56 of displayCSBans" when trying to save. it seems like valid code? Regards /Med vänlig hälsning Jan Johansson Field Support Engineer _______________________________________ Viking Telecom AB Askims Verkstadsväg 4. S-436 34 Askim. Sweden Phone +46 31 720 69 00. Fax +46 31 28 69 78 Mobile +46 73 682 69 59. Email: jan.johansson@viking-telecom.com Internet: w w w . v i k i n g - t e l e c o m . c o m Visit us at CeBIT Hannover March 13 - 20, 2002 Stand 013:C09, www.cebit.de _______________________________________
You can't nest dtml-var statements! Why do you use the inner dtml-var to get the value of 'sortid' ? Try: <dtml-in expr="getCsbans(sort=sortid)" size=100 start=query_start> or <dtml-in expr="getCsbans(sort=REQUEST.get('sortid'))" size=100 start=query_start> Looks much better - doesn't it ? -aj ----- Original Message ----- From: "Jan Johansson" <jan.johansson@viking-telecom.com> To: <zope@zope.org> Sent: Tuesday, February 26, 2002 06:50 Subject: [Zope] REQUEST.get? Why does <dtml-in expr="getCsbans(sort='<dtml-var "REQUEST.get('sortid')">')" size=100 start=query_start> give "Invalid attribute name, "REQUEST.get('sortid')", for tag <dtml-in expr="getCsbans(sort='<dtml-var "REQUEST.get('sortid')">')" size=100 start=query_start>, on line 56 of displayCSBans" when trying to save. it seems like valid code? Regards /Med vänlig hälsning Jan Johansson Field Support Engineer _______________________________________ Viking Telecom AB Askims Verkstadsväg 4. S-436 34 Askim. Sweden Phone +46 31 720 69 00. Fax +46 31 28 69 78 Mobile +46 73 682 69 59. Email: jan.johansson@viking-telecom.com Internet: w w w . v i k i n g - t e l e c o m . c o m Visit us at CeBIT Hannover March 13 - 20, 2002 Stand 013:C09, www.cebit.de _______________________________________ _______________________________________________ Zope maillist - Zope@zope.org 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 )
[Jan Johansson] Why does <dtml-in expr="getCsbans(sort='<dtml-var "REQUEST.get('sortid')">')" size=100 start=query_start> give "Invalid attribute name, "REQUEST.get('sortid')", for tag <dtml-in expr="getCsbans(sort='<dtml-var "REQUEST.get('sortid')">')" size=100 start=query_start>, on line 56 of displayCSBans" when trying to save. it seems like valid code? Well, for one thing you don't want to put dtml markup tags inside other dtml markup tags, and you don't have to do that. If you want to refer to a variable in the REQUEST, just say REQUEST['sortid'] directly. For another, you are trying to have nested double quotes, which is also invalid syntax for dtml, and which you also don't need. No wonder Zope is getting confused. Cheers, Tom P
participants (3)
-
Andreas Jung -
Jan Johansson -
Thomas B. Passin