cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From echarp <ech...@gmail.com>
Subject Re: cforms htmlarea and xmlbinding
Date Sun, 13 Feb 2005 21:02:02 GMT

  The cforms binding can not handle this (easily)

  see:
  http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=110146268307395&w=2
  http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=108127256626966&w=2

  Personnaly I'm loading it in my flow like this:

  // bind the document data to the form
  form.load(document);

  var tf  = Packages.javax.xml.transform.TransformerFactory.newInstance()
    .newTransformerHandler().getTransformer();
  for (var i = 0; i < form.getChild("page").size; i++) {
    var page = getNodeById(document,
      form.getChild("page").getRow(i).getChild("id").value);
    var result = new Packages.javax.xml.transform.stream.StreamResult(
      new Packages.java.io.StringWriter);
    var paras = page.getElementsByTagName("para");
    for (var j = 0; j < paras.length; j++) {
      var source = new Packages.javax.xml.transform.dom.DOMSource(paras.item(j));
      tf.transform(source, result);
    }
    form.getChild("page").getRow(i).getChild("content").value = result.writer.toString();
  }

  // show the form to the user until it is validated successfully
  form.showForm("book/display-pipeline");


  manu


On Thu, Feb 10, 2005 at 02:13:54PM +0200, gounis@osmosis.gr wrote:
> hi
> 
> i have a simple xml
> <root>
> <title></title>
> <desc></desc>
> </root>
> 
> i want to edit with a cform
> 
> everything works fine but i want to edit the content of <desc> element 
> with htmlarea control
> 
> the problem is that html elements from htmlarea after update are escaped 
> in my xml
> 
> is it any solution to this problem ?
> 
> has anyone else edit the content of a xml node as xml (xhtml) fragmet 
> succesfull with cforms and html area?
> 
> 
> regards
> --stavros
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message