Hi,
this could all be my imagination, but it seems that if I use a regular HTML form talking to some cgi, and I have a textarea, then on the server I see the carriage returns and blank lines, but if I use an XForms textarea then the carriage returns and blank lines are replaced with a space. Is there any way to control this? Thanks & regards Colin -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Hi
I have tested this every way I can think of, with and without the appearance attribute, using every possible value the spec and previous threads on the list suggest, and nothing seems to make any difference. What I am working on is a textarea, and the user types something like This is para 1 This is para2 but on the server my pipeline receives it as This is para 1 This is para2 Does anybody have a way to retain the line break on the server? Is there something in OPS processing that is taking it out? Am I really the only person who would want the user to be able to type some text and be able to reproduce it as is afterwards?!? This seems to me to be normal behavior outside, in other environments such as HTML forms and CGI. Thanks for any help Colin On Jan 17, 2006, at 1:47 PM, Colin O'Brien wrote: > Hi, > > this could all be my imagination, but it seems that if I use a regular > HTML form talking to some cgi, and I have a textarea, then on the > server I see the carriage returns and blank lines, but if I use an > XForms textarea then the carriage returns and blank lines are replaced > with a space. > > Is there any way to control this? > > Thanks & regards > Colin -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Hi
just in case anyone else wanders down this hole, let me explain. I was looking at the text returned from my form using the OPS debug facility in Eclipse. This indeed shows multiple cr/lfs as a single space. Now that I have actually gotten to writing some code to do something with the text returned from the form, I realize that the cr/lfs have been there all along. So they are where it matters, but debug can be misleading (normally I hope it will explain what I am doing wrong ;-) Best regards Colin On Jan 19, 2006, at 3:22 PM, Colin O'Brien wrote: > Hi > > I have tested this every way I can think of, with and without the > appearance attribute, using every possible value the spec and previous > threads on the list suggest, and nothing seems to make any difference. > What I am working on is a textarea, and the user types something like > This is para 1 > > This is para2 > > but on the server my pipeline receives it as > This is para 1 This is para2 > > Does anybody have a way to retain the line break on the server? > Is there something in OPS processing that is taking it out? > Am I really the only person who would want the user to be able to type > some text and be able to reproduce it as is afterwards?!? > > This seems to me to be normal behavior outside, in other environments > such as HTML forms and CGI. > > Thanks for any help > Colin -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
In reply to this post by Colin O'Brien
Colin,
How are you accessing the content of the text area? I tried entering text with line returns in the "Translate This" example. That example uses an XForms submission to send the instance to a service implemented with XPL: <xforms:submission ref="instance('request-instance')" id="default-submission" method="post" action="/direct/xforms-translate/post" replace="instance" instance="response-instance"/> The service is implemented in post.xpl. I modified it to use the File serializer to store the submitted instance to a file: <p:processor name="oxf:xml-converter"> <p:input name="config"> <config> <encoding>utf-8</encoding> </config> </p:input> <p:input name="data" href="#instance"/> <p:output name="data" id="converted"/> </p:processor> <p:processor name="oxf:file-serializer"> <p:input name="data" href="#converted"/> <p:input name="config"> <config> <content-type>text/xml</content-type> <file>c:/test-cr.xml</file> </config> </p:input> </p:processor> The resulting file does have line breaks. Note that the particular "Translate This" example doesn't return line breaks, but that's because it sends the data to Google, etc., so more processing is involved. But the point is that all the way until the submission, I get the line breaks. Now you are using a Mac, right? Maybe that makes a difference. Can you reproduce what I did above (of course modifying the resulting file destination / name) and check if you do get the line breaks? -Erik Colin O'Brien wrote: > Hi > > I have tested this every way I can think of, with and without the > appearance attribute, using every possible value the spec and previous > threads on the list suggest, and nothing seems to make any difference. > What I am working on is a textarea, and the user types something like > This is para 1 > > This is para2 > > but on the server my pipeline receives it as > This is para 1 This is para2 > > Does anybody have a way to retain the line break on the server? > Is there something in OPS processing that is taking it out? > Am I really the only person who would want the user to be able to type > some text and be able to reproduce it as is afterwards?!? > > This seems to me to be normal behavior outside, in other environments > such as HTML forms and CGI. > > Thanks for any help > Colin > > > On Jan 17, 2006, at 1:47 PM, Colin O'Brien wrote: > >> Hi, >> >> this could all be my imagination, but it seems that if I use a regular >> HTML form talking to some cgi, and I have a textarea, then on the >> server I see the carriage returns and blank lines, but if I use an >> XForms textarea then the carriage returns and blank lines are replaced >> with a space. >> >> Is there any way to control this? >> >> Thanks & regards >> Colin > > > > ------------------------------------------------------------------------ > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
In reply to this post by Colin O'Brien
Colin O'Brien wrote:
> Hi > > just in case anyone else wanders down this hole, let me explain. > > I was looking at the text returned from my form using the OPS debug > facility in Eclipse. > This indeed shows multiple cr/lfs as a single space. > > Now that I have actually gotten to writing some code to do something > with the text returned from the form, I realize that the cr/lfs have > been there all along. > > So they are where it matters, but debug can be misleading (normally I > hope it will explain what I am doing wrong ;-) know that we do get line breaks upon XForms submission ;-) -Erik -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |