那个大哥有在 ZOPE 2 开发 AJAX 的经验?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

那个大哥有在 ZOPE 2 开发 AJAX 的经验?

Dreamer-3
我是个ZOPE菜鸟,最近尝试把我的一个AJAX应用程序从Java移植到ZOPE 2。但是在server代码移植的时候遇到了问题:
 
在Java中:
 
  ……
  res.setContentType("text/xml");
  res.getWriter().write(msgXml);
  ……
 
该怎么翻译成Python?
 
 
哪位大哥有这方面的经验?跪求一个 ZOPE 2 下 JAXA 的小例子 !
 

_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to  [hidden email]
Detail Info: http://python.cn/mailman/listinfo/python-chinese
Reply | Threaded
Open this post in threaded view
|

Re: 那个大哥有在 ZOPE 2 开发 AJAX 的经验?

沈崴
context.REQUEST.RESPONSE.setHeader('Content-Type', 'text/xml')
# print msgXml; return printed
return msgXml

--------------- 8< ----------------

<tal:block define="charset
here/portal_properties/site_properties/default_charset|here/portal_properties/default_charset|string:utf-8;
        content_type python:request.RESPONSE.setHeader('Content-Type',
'text/xml;;charset=%s' % charset);"
 replace='structure string:&lt;?xml version="1.0" encoding="${charset}" ?&gt;'>
<?xml version="1.0"?>
</tal:block>

<msgXml />

在 07-9-12,Dreamer<[hidden email]> 写道:

>
>
> 我是个ZOPE菜鸟,最近尝试把我的一个AJAX应用程序从Java移植到ZOPE
> 2。但是在server代码移植的时候遇到了问题:
>
> 在Java中:
>
>   ……
>   res.setContentType("text/xml");
>   res.getWriter().write(msgXml);
>   ……
>
> 该怎么翻译成Python?
>
>
> 哪位大哥有这方面的经验?跪求一个 ZOPE 2 下 JAXA 的小例子 !
>
> _______________________________________________
> python-chinese
> Post: send [hidden email]
> Subscribe: send subscribe to
> [hidden email]
> Unsubscribe: send unsubscribe to
> [hidden email]
> Detail Info:
> http://python.cn/mailman/listinfo/python-chinese

---
沈崴 (努力学习 Python 中 ...)
http://blog.163.com/eishn
_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to  [hidden email]
Detail Info: http://python.cn/mailman/listinfo/python-chinese
Reply | Threaded
Open this post in threaded view
|

Re: [CPyUG:32191] Re: 那个大哥有在 ZOPE 2 开发 AJAX 的经验?

Dreamer-3
非常感谢!但是这位大哥,能给个详细一点点的例子吗?小弟是菜鸟,下面的例子有点看不懂...

----- Original Message -----
From: "沈崴" <[hidden email]>
To: <[hidden email]>
Sent: Wednesday, September 12, 2007 11:41 PM
Subject: [CPyUG:32191] Re: [python-chinese] 那个大哥有在 ZOPE 2 开发 AJAX 的经验?


> context.REQUEST.RESPONSE.setHeader('Content-Type', 'text/xml')
> # print msgXml; return printed
> return msgXml
>
> --------------- 8< ----------------
>
> <tal:block define="charset
> here/portal_properties/site_properties/default_charset|here/portal_properties/default_charset|string:utf-8;
>        content_type python:request.RESPONSE.setHeader('Content-Type',
> 'text/xml;;charset=%s' % charset);"
> replace='structure string:&lt;?xml version="1.0" encoding="${charset}" ?&gt;'>
> <?xml version="1.0"?>
> </tal:block>
>
> <msgXml />
>
> 在 07-9-12,Dreamer<[hidden email]> 写道:
>>
>>
>> 我是个ZOPE菜鸟,最近尝试把我的一个AJAX应用程序从Java移植到ZOPE
>> 2。但是在server代码移植的时候遇到了问题:
>>
>> 在Java中:
>>
>>   ......
>>   res.setContentType("text/xml");
>>   res.getWriter().write(msgXml);
>>   ......
>>
>> 该怎么翻译成Python?
>>
>>
>> 哪位大哥有这方面的经验?跪求一个 ZOPE 2 下 JAXA 的小例子 !
>>
>> _______________________________________________
>> python-chinese
>> Post: send [hidden email]
>> Subscribe: send subscribe to
>> [hidden email]
>> Unsubscribe: send unsubscribe to
>> [hidden email]
>> Detail Info:
>> http://python.cn/mailman/listinfo/python-chinese
>
> ---
> 沈崴 (努力学习 Python 中 ...)
> http://blog.163.com/eishn
> _______________________________________________
> python-chinese
> Post: send [hidden email]
> Subscribe: send subscribe to [hidden email]
> Unsubscribe: send unsubscribe to  [hidden email]
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
> --~--~---------~--~----~------------~-------~--~----~
> '''邮件来自Groups "python-cn"--China Py User Group
> 详情: http://groups-beta.google.com/group/python-cn
> 发言: [hidden email]
> 退订: [hidden email]
> 维基: http://wiki.woodpecker.org.cn/moin/CPUG
> 同类列表: http://python.cn/mailman/listinfo/python-chinese
> 社区事务: http://groups.google.com/group/CPUG
> 北京事务: http://groups.google.com/group/bpug
> 东南事务: http://groups.google.com/group/cpug-eastchina
> '''
> -~----------~----~----~----~------~----~------~--~---
>
>
_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to  [hidden email]
Detail Info: http://python.cn/mailman/listinfo/python-chinese
Reply | Threaded
Open this post in threaded view
|

Re: [CPyUG:32191] Re: 那个大哥有在 ZOPE 2 开发 AJAX 的经验?

tkdchen
On 9/13/07, Dreamer <[hidden email]> wrote:

> 非常感谢!但是这位大哥,能给个详细一点点的例子吗?小弟是菜鸟,下面的例子有点看不懂...
>
> ----- Original Message -----
> From: "沈崴" <[hidden email]>
> To: <[hidden email]>
> Sent: Wednesday, September 12, 2007 11:41 PM
> Subject: [CPyUG:32191] Re: [python-chinese] 那个大哥有在 ZOPE 2 开发 AJAX 的经验?
>
>
> > context.REQUEST.RESPONSE.setHeader('Content-Type', 'text/xml')
> > # print msgXml; return printed
> > return msgXml
> >
> > --------------- 8< ----------------
> >
> > <tal:block define="charset
> > here/portal_properties/site_properties/default_charset|here/portal_properties/default_charset|string:utf-8;
> >        content_type python:request.RESPONSE.setHeader('Content-Type',
> > 'text/xml;;charset=%s' % charset);"
> > replace='structure string:&lt;?xml version="1.0" encoding="${charset}" ?&gt;'>
> > <?xml version="1.0"?>
> > </tal:block>
> >
> > <msgXml />
> >
> > 在 07-9-12,Dreamer<[hidden email]> 写道:
> >>
> >>
> >> 我是个ZOPE菜鸟,最近尝试把我的一个AJAX应用程序从Java移植到ZOPE
> >> 2。但是在server代码移植的时候遇到了问题:
> >>
> >> 在Java中:
> >>
> >>   ......
> >>   res.setContentType("text/xml");
> >>   res.getWriter().write(msgXml);
> >>   ......
> >>
> >> 该怎么翻译成Python?
> >>
> >>
> >> 哪位大哥有这方面的经验?跪求一个 ZOPE 2 下 JAXA 的小例子 !
> >>

去Zope的网站上看The Zope Book
涉及到的内容包括:tal:define,tal:replace,以及合法的tal表达式的类型。在Using Page Template章节中查找相应的主题。

--
GoogleTalk: [hidden email]
MSN: [hidden email]
My Space: tkdchen.spaces.live.com
BOINC: boinc.berkeley.edu
中国分布式计算总站: www.equn.com
_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to  [hidden email]
Detail Info: http://python.cn/mailman/listinfo/python-chinese
Reply | Threaded
Open this post in threaded view
|

Re: [CPyUG:32191] Re: 那个大哥有在 ZOPE 2 开发 AJAX 的经验?

Dreamer-3
这位大哥,首先非常感谢你的建议。但是这些基本的东西我还是知道的,但你的例子我真的看不懂,能不能稍微详细的解释一下这个例子的运行机制?多谢!


----- Original Message -----
From: "tkdchen" <[hidden email]>
To: <[hidden email]>
Sent: Friday, September 14, 2007 9:27 AM
Subject: Re: [python-chinese][CPyUG:32191] Re: 那个大哥有在 ZOPE 2 开发 AJAX 的经验?


> On 9/13/07, Dreamer <[hidden email]> wrote:
>> 非常感谢!但是这位大哥,能给个详细一点点的例子吗?小弟是菜鸟,下面的例子有点看不懂...
>>
>> ----- Original Message -----
>> From: "沈崴" <[hidden email]>
>> To: <[hidden email]>
>> Sent: Wednesday, September 12, 2007 11:41 PM
>> Subject: [CPyUG:32191] Re: [python-chinese] 那个大哥有在 ZOPE 2 开发 AJAX 的经验?
>>
>>
>> > context.REQUEST.RESPONSE.setHeader('Content-Type', 'text/xml')
>> > # print msgXml; return printed
>> > return msgXml
>> >
>> > --------------- 8< ----------------
>> >
>> > <tal:block define="charset
>> > here/portal_properties/site_properties/default_charset|here/portal_properties/default_charset|string:utf-8;
>> >        content_type python:request.RESPONSE.setHeader('Content-Type',
>> > 'text/xml;;charset=%s' % charset);"
>> > replace='structure string:&lt;?xml version="1.0" encoding="${charset}" ?&gt;'>
>> > <?xml version="1.0"?>
>> > </tal:block>
>> >
>> > <msgXml />
>> >
>> > 在 07-9-12,Dreamer<[hidden email]> 写道:
>> >>
>> >>
>> >> 我是个ZOPE菜鸟,最近尝试把我的一个AJAX应用程序从Java移植到ZOPE
>> >> 2。但是在server代码移植的时候遇到了问题:
>> >>
>> >> 在Java中:
>> >>
>> >>   ......
>> >>   res.setContentType("text/xml");
>> >>   res.getWriter().write(msgXml);
>> >>   ......
>> >>
>> >> 该怎么翻译成Python?
>> >>
>> >>
>> >> 哪位大哥有这方面的经验?跪求一个 ZOPE 2 下 JAXA 的小例子 !
>> >>
>
> 去Zope的网站上看The Zope Book
> 涉及到的内容包括:tal:define,tal:replace,以及合法的tal表达式的类型。在Using Page Template章节中查找相应的主题。
>
> --
> GoogleTalk: [hidden email]
> MSN: [hidden email]
> My Space: tkdchen.spaces.live.com
> BOINC: boinc.berkeley.edu
> 中国分布式计算总站: www.equn.com
> _______________________________________________
> python-chinese
> Post: send [hidden email]
> Subscribe: send subscribe to [hidden email]
> Unsubscribe: send unsubscribe to  [hidden email]
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to  [hidden email]
Detail Info: http://python.cn/mailman/listinfo/python-chinese
Reply | Threaded
Open this post in threaded view
|

Re: [CPyUG:32191] Re: 那个大哥有在 ZOPE 2 开发 AJAX 的经验?

沈崴
Hi, Dreamer 同學, 您不屈不撓的學習精神, 令在下景仰。

您使用的是 Zope2, 故使用第一段 Python Script 就可以了。
第二段是給 Plone 用的, 當您需要這段代碼的時候您自然會明白的。
所以下面那段代碼請您無視。

如果您對此非常非常感興趣, 您可以安裝 Plone, 并在
    http://your-plone-site/portal_skins/kupu_plone/kupucollection.xml/manage_main

這個位置得到一個實際例子。

在 07-9-14,Dreamer<[hidden email]> 写道:

> 这位大哥,首先非常感谢你的建议。但是这些基本的东西我还是知道的,但你的例子我真的看不懂,能不能稍微详细的解释一下这个例子的运行机制?多谢!
>
>
> ----- Original Message -----
> From: "tkdchen" <[hidden email]>
> To: <[hidden email]>
> Sent: Friday, September 14, 2007 9:27 AM
> Subject: Re: [python-chinese][CPyUG:32191] Re: 那个大哥有在 ZOPE 2 开发 AJAX 的经验?
>
>
> > On 9/13/07, Dreamer <[hidden email]> wrote:
> >> 非常感谢!但是这位大哥,能给个详细一点点的例子吗?小弟是菜鸟,下面的例子有点看不懂...
> >>
> >> ----- Original Message -----
> >> From: "沈崴" <[hidden email]>
> >> To: <[hidden email]>
> >> Sent: Wednesday, September 12, 2007 11:41 PM
> >> Subject: [CPyUG:32191] Re: [python-chinese] 那个大哥有在 ZOPE 2 开发 AJAX 的经验?
> >>
> >>
> >> > context.REQUEST.RESPONSE.setHeader('Content-Type', 'text/xml')
> >> > # print msgXml; return printed
> >> > return msgXml
> >> >
> >> > --------------- 8< ----------------
> >> >
> >> > <tal:block define="charset
> >> > here/portal_properties/site_properties/default_charset|here/portal_properties/default_charset|string:utf-8;
> >> >        content_type python:request.RESPONSE.setHeader('Content-Type',
> >> > 'text/xml;;charset=%s' % charset);"
> >> > replace='structure string:&lt;?xml version="1.0" encoding="${charset}" ?&gt;'>
> >> > <?xml version="1.0"?>
> >> > </tal:block>
> >> >
> >> > <msgXml />
> >> >
> >> > 在 07-9-12,Dreamer<[hidden email]> 写道:
> >> >>
> >> >>
> >> >> 我是个ZOPE菜鸟,最近尝试把我的一个AJAX应用程序从Java移植到ZOPE
> >> >> 2。但是在server代码移植的时候遇到了问题:
> >> >>
> >> >> 在Java中:
> >> >>
> >> >>   ......
> >> >>   res.setContentType("text/xml");
> >> >>   res.getWriter().write(msgXml);
> >> >>   ......
> >> >>
> >> >> 该怎么翻译成Python?
> >> >>
> >> >>
> >> >> 哪位大哥有这方面的经验?跪求一个 ZOPE 2 下 JAXA 的小例子 !
> >> >>
> >
> > 去Zope的网站上看The Zope Book
> > 涉及到的内容包括:tal:define,tal:replace,以及合法的tal表达式的类型。在Using Page Template章节中查找相应的主题。
> >
> > --
> > GoogleTalk: [hidden email]
> > MSN: [hidden email]
> > My Space: tkdchen.spaces.live.com
> > BOINC: boinc.berkeley.edu
> > 中国分布式计算总站: www.equn.com
> > _______________________________________________
> > python-chinese
> > Post: send [hidden email]
> > Subscribe: send subscribe to [hidden email]
> > Unsubscribe: send unsubscribe to  [hidden email]
> > Detail Info: http://python.cn/mailman/listinfo/python-chinese
> _______________________________________________
> python-chinese
> Post: send [hidden email]
> Subscribe: send subscribe to [hidden email]
> Unsubscribe: send unsubscribe to  [hidden email]
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to  [hidden email]
Detail Info: http://python.cn/mailman/listinfo/python-chinese
Reply | Threaded
Open this post in threaded view
|

Re: [CPyUG:32287] Re: [CPyUG:32191] Re: 那个大哥有在 ZOPE 2 开发 AJAX 的经验?

Dreamer-3
哦... 多谢了

----- Original Message -----
From: "沈崴" <[hidden email]>
To: <[hidden email]>
Sent: Friday, September 14, 2007 3:36 PM
Subject: [CPyUG:32287] Re: [python-chinese] [CPyUG:32191] Re: 那个大哥有在 ZOPE 2 开发 AJAX 的经验?


> Hi, Dreamer 同學, 您不屈不撓的學習精神, 令在下景仰。
>
> 您使用的是 Zope2, 故使用第一段 Python Script 就可以了。
> 第二段是給 Plone 用的, 當您需要這段代碼的時候您自然會明白的。
> 所以下面那段代碼請您無視。
>
> 如果您對此非常非常感興趣, 您可以安裝 Plone, 并在
>    http://your-plone-site/portal_skins/kupu_plone/kupucollection.xml/manage_main
>
> 這個位置得到一個實際例子。
>
> 在 07-9-14,Dreamer<[hidden email]> 写道:
>> 这位大哥,首先非常感谢你的建议。但是这些基本的东西我还是知道的,但你的例子我真的看不懂,能不能稍微详细的解释一下这个例子的运行机制?多谢!
>>
>>
>> ----- Original Message -----
>> From: "tkdchen" <[hidden email]>
>> To: <[hidden email]>
>> Sent: Friday, September 14, 2007 9:27 AM
>> Subject: Re: [python-chinese][CPyUG:32191] Re: 那个大哥有在 ZOPE 2 开发 AJAX 的经验?
>>
>>
>> > On 9/13/07, Dreamer <[hidden email]> wrote:
>> >> 非常感谢!但是这位大哥,能给个详细一点点的例子吗?小弟是菜鸟,下面的例子有点看不懂...
>> >>
>> >> ----- Original Message -----
>> >> From: "沈崴" <[hidden email]>
>> >> To: <[hidden email]>
>> >> Sent: Wednesday, September 12, 2007 11:41 PM
>> >> Subject: [CPyUG:32191] Re: [python-chinese] 那个大哥有在 ZOPE 2 开发 AJAX 的经验?
>> >>
>> >>
>> >> > context.REQUEST.RESPONSE.setHeader('Content-Type', 'text/xml')
>> >> > # print msgXml; return printed
>> >> > return msgXml
>> >> >
>> >> > --------------- 8< ----------------
>> >> >
>> >> > <tal:block define="charset
>> >> > here/portal_properties/site_properties/default_charset|here/portal_properties/default_charset|string:utf-8;
>> >> >        content_type python:request.RESPONSE.setHeader('Content-Type',
>> >> > 'text/xml;;charset=%s' % charset);"
>> >> > replace='structure string:&lt;?xml version="1.0" encoding="${charset}" ?&gt;'>
>> >> > <?xml version="1.0"?>
>> >> > </tal:block>
>> >> >
>> >> > <msgXml />
>> >> >
>> >> > 在 07-9-12,Dreamer<[hidden email]> 写道:
>> >> >>
>> >> >>
>> >> >> 我是个ZOPE菜鸟,最近尝试把我的一个AJAX应用程序从Java移植到ZOPE
>> >> >> 2。但是在server代码移植的时候遇到了问题:
>> >> >>
>> >> >> 在Java中:
>> >> >>
>> >> >>   ......
>> >> >>   res.setContentType("text/xml");
>> >> >>   res.getWriter().write(msgXml);
>> >> >>   ......
>> >> >>
>> >> >> 该怎么翻译成Python?
>> >> >>
>> >> >>
>> >> >> 哪位大哥有这方面的经验?跪求一个 ZOPE 2 下 JAXA 的小例子 !
>> >> >>
>> >
>> > 去Zope的网站上看The Zope Book
>> > 涉及到的内容包括:tal:define,tal:replace,以及合法的tal表达式的类型。在Using Page Template章节中查找相应的主题。
>> >
>> > --
>> > GoogleTalk: [hidden email]
>> > MSN: [hidden email]
>> > My Space: tkdchen.spaces.live.com
>> > BOINC: boinc.berkeley.edu
>> > 中国分布式计算总站: www.equn.com
>> > _______________________________________________
>> > python-chinese
>> > Post: send [hidden email]
>> > Subscribe: send subscribe to [hidden email]
>> > Unsubscribe: send unsubscribe to  [hidden email]
>> > Detail Info: http://python.cn/mailman/listinfo/python-chinese
>> _______________________________________________
>> python-chinese
>> Post: send [hidden email]
>> Subscribe: send subscribe to [hidden email]
>> Unsubscribe: send unsubscribe to  [hidden email]
>> Detail Info: http://python.cn/mailman/listinfo/python-chinese
> _______________________________________________
> python-chinese
> Post: send [hidden email]
> Subscribe: send subscribe to [hidden email]
> Unsubscribe: send unsubscribe to  [hidden email]
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
> --~--~---------~--~----~------------~-------~--~----~
> '''邮件来自Groups "python-cn"--China Py User Group
> 详情: http://groups-beta.google.com/group/python-cn
> 发言: [hidden email]
> 退订: [hidden email]
> 维基: http://wiki.woodpecker.org.cn/moin/CPUG
> 同类列表: http://python.cn/mailman/listinfo/python-chinese
> 社区事务: http://groups.google.com/group/CPUG
> 北京事务: http://groups.google.com/group/bpug
> 东南事务: http://groups.google.com/group/cpug-eastchina
> '''
> -~----------~----~----~----~------~----~------~--~---
>
>
_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to  [hidden email]
Detail Info: http://python.cn/mailman/listinfo/python-chinese