cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 黄 海冬 <lingererhu...@hotmail.com>
Subject what is the woody form binding encoding?
Date Wed, 11 Feb 2004 09:31:43 GMT
<html><div style='background-color:'><DIV class=RTE>I saw the woody's&nbsp;binding&nbsp;samples
and&nbsp;use dom to save&nbsp;form data.I modified js like:</DIV>
<DIV class=RTE>&nbsp;if (isbind=="true") {<BR>&nbsp;&nbsp;&nbsp;
&nbsp;document = loadDocument(documentURI);<BR>&nbsp;&nbsp;&nbsp; &nbsp;//
bind the document data to the form<BR>&nbsp;&nbsp;&nbsp; &nbsp;form.load(document);<BR>&nbsp;&nbsp;&nbsp;
}<BR>&nbsp;&nbsp;&nbsp; // shows the form to the user until is validated
successfully<BR>&nbsp;&nbsp;&nbsp; form.showForm(formname+"-display");<BR>&nbsp;&nbsp;&nbsp;
<BR>&nbsp;if (form.binding != null){<BR>&nbsp;&nbsp;&nbsp; //
bind the form's data back to the document<BR>&nbsp;&nbsp;&nbsp; &nbsp;form.save(document);<BR>&nbsp;&nbsp;&nbsp;
&nbsp;cocoon.sendPage(formname+"-save",{"data":document});<BR>&nbsp;}&nbsp;</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>Object document is a dom object then.</DIV>
<DIV class=RTE>I use a pipeline to display the result:</DIV>
<DIV class=RTE>&nbsp;&nbsp;&nbsp;&lt;map:match pattern="*-save"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;map:generate
type="jxt" src="forms/{1}/test_data.xml" /&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;map:serialize
type="xml"/&gt;<BR>&nbsp;&nbsp;&nbsp;&lt;/map:match&gt;</DIV>
<DIV class=RTE>Everything goes fine until I enter Simplyfied Chinese in the form,the
xml result apear wrong encoding character:</DIV>
<DIV class=RTE>
<DIV class=e>
<DIV style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em"><SPAN class=b><STRONG><FONT
face="Courier New" color=#ff0000>&nbsp;</FONT></STRONG></SPAN> <SPAN
class=m><FONT color=#0000ff>&lt;</FONT></SPAN><SPAN class=t><FONT
color=#990000>laiwendanwei</FONT></SPAN><SPAN class=m><FONT color=#0000ff>&gt;</FONT></SPAN><SPAN
class=tx><STRONG>test</STRONG></SPAN><SPAN class=m><FONT color=#0000ff>&lt;/</FONT></SPAN><SPAN
class=t><FONT color=#990000>laiwendanwei</FONT></SPAN><SPAN class=m><FONT
color=#0000ff>&gt;</FONT></SPAN> </DIV></DIV>
<DIV class=e>
<DIV style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em"><SPAN class=b><STRONG><FONT
face="Courier New" color=#ff0000>&nbsp;</FONT></STRONG></SPAN> <SPAN
class=m><FONT color=#0000ff>&lt;</FONT></SPAN><SPAN class=t><FONT
color=#990000>shouwenmingcheng</FONT></SPAN><SPAN class=m><FONT color=#0000ff>&gt;</FONT></SPAN><SPAN
class=tx><STRONG>ä¸&shy;æ&#150;&#135;</STRONG></SPAN><SPAN
class=m><FONT color=#0000ff>&lt;/</FONT></SPAN><SPAN class=t><FONT
color=#990000>shouwenmingcheng</FONT></SPAN><SPAN class=m><FONT color=#0000ff>&gt;</FONT></SPAN>
&lt;--error here</DIV>
<DIV style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em">&nbsp; the form encoding is unicode.</DIV>
<DIV style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em">&nbsp; If I use action to get the
value from the context using JXPathContext is the same result?</DIV>
<DIV style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em">&nbsp; It must be woody form binding
encoding problem.</DIV>
<DIV style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em">&nbsp; What can I do to solve the
problem?</DIV>
<DIV style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em">&nbsp;</DIV>
<DIV style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em">&nbsp;roy huang</DIV>
<DIV style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em">&nbsp;<A href="mailto:lingererhuang@hotmail.com">lingererhuang@hotmail.com</A>
or <A href="mailto:roy_huang@nbmgroup.com">roy_huang@nbmgroup.com</A></DIV>
<DIV style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em">&nbsp;</DIV>
<DIV style="MARGIN-LEFT: 1em; TEXT-INDENT: -2em">&nbsp;</DIV></DIV></DIV></div><br
clear=all><hr>ʹ  <a href="http://g.msn.com/8HMBCNCN/2731??PS=">MSN Messenger
</a> ѽн </html>

Mime
View raw message