Hi:
I'm trying this: an output that references an instance with html content and a trigger that fires an html area for editing the content with a button that returns to the output with the modified content. It worked with text and textarea but it's not working with html area. Thanks in advance. Regards! Here is the code (reproducible in xforms sandbox): <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:widget="http://orbeon.org/oxf/xml/widget" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" xmlns:f="http://orbeon.org/oxf/xml/formatting" xmlns:ui="http://orbeon.org/oxf/xml/examples/ui" xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <head> <title>XSLT and JAXP Processors</title> <xforms:model> <xforms:instance id="editables"> <root xmlns=""> <html ui:mode="view" ui:output="" ui:input=""><ul> <li>Type</li> <li>Name</li> <li>Purpose</li> <li>Mandatory</li> </ul></html> </root> </xforms:instance> <xforms:bind nodeset="html/@ui:output" relevant="instance('editables')/html/@ui:mode = 'view'"/> <xforms:bind nodeset="html/@ui:input" relevant="instance('editables')/html/@ui:mode = 'edit'"/> </xforms:model> </head> <body> <xforms:group ref="html"> <xforms:group ref="@ui:output"> <xforms:output id="content-html-output" mediatype="text/html" value=".."/> <xforms:trigger appearance="minimal" ref="../@ui:mode"> <xforms:label> <img src="../apps/xforms-todo/images/edit.gif"/> Edit </xforms:label> <xforms:action ev:event="DOMActivate"> <xforms:setvalue ref="." value="'edit'"/> <xforms:setfocus control="content-html-input"/> </xforms:action> </xforms:trigger> </xforms:group> <xforms:group ref="@ui:input"> <xforms:textarea mediatype="text/html" id="content-html-input" ref=".."/> <xforms:trigger appearance="minimal" ref="../@ui:mode"> <xforms:label> <img src="../apps/xforms-todo/images/save.gif"/> Save </xforms:label> <xforms:action ev:event="DOMActivate"> <xforms:setvalue ref="." value="'view'"/> <xforms:setfocus control="content-html-output"/> </xforms:action> </xforms:trigger> </xforms:group> </xforms:group> </body> </html> -- Don't try to bend the spoon, that's impossible. Instead, only try to realize the truth. -What truth?- There is no spoon. -There is no spoon?- Then you'll see that it's not the spoon that bends, it is only yourself. -- 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 Rodrigo,
> I'm trying this: an output that references an instance with html content > and a trigger that fires an html area for editing the content with a > button that returns to the output with the modified content. It worked > with text and textarea but it's not working with html area. I'm not sure about the cause, but i noticed that it works if one removes the four xforms:group elements: <xforms:output id="content-html-output" mediatype="text/html" value="instance('editables')/html"/> <xforms:trigger appearance="minimal" ref="instance('editables')/html/@ui:mode"> <xforms:label> <img src="../apps/xforms-todo/images/edit.gif"/> Edit </xforms:label> <xforms:action ev:event="DOMActivate"> <xforms:setvalue ref="." value="'edit'"/> <xforms:setfocus control="content-html-input"/> </xforms:action> </xforms:trigger> <xforms:textarea mediatype="text/html" id="content-html-input" ref="instance('editables')/html"/> <xforms:trigger appearance="minimal" ref="instance('editables')/html/@ui:mode"> <xforms:label> <img src="../apps/xforms-todo/images/save.gif"/> Save </xforms:label> <xforms:action ev:event="DOMActivate"> <xforms:setvalue ref="." value="'view'"/> <xforms:setfocus control="content-html-output"/> </xforms:action> </xforms:trigger> Of course, that's no solution, because now, the "read-only" control and the edit control are shown at the same time. I couldn't find a solution using the xforms:group mechanism. I have similar use cases, and i've implemented the html area control inside a xxforms:dialog. The "read-only" control is updated every time the html area looses the focus. I've attached an example with four content tags that are dynamically referenced by the html area depending on the trigger that called the dialog. HTH florian -- 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 dialog.xhtml (6K) Download Attachment |
Administrator
|
In reply to this post by Rodrigo Ojeda
Rodrigo,
We can reproduce this bug. So yes it is a bug. We have found plenty of issues like this with the FCK Editor component. For now I entered a bug: http://forge.objectweb.org/tracker/index.php?func=detail&aid=307371&group_id=168&atid=350207 As suggested, you may want to try making this work in a dialog instead. The longer-term solution will likely be to switch to the new YUI RTE component, which also works in Safari and Opera and is likely to be better supported. -Erik Rodrigo Ojeda wrote: > Hi: > > I'm trying this: an output that references an instance with html content > and a trigger that fires an html area for editing the content with a > button that returns to the output with the modified content. It worked > with text and textarea but it's not working with html area. > > Thanks in advance. > Regards! > > Here is the code (reproducible in xforms sandbox): > > <html xmlns="http://www.w3.org/1999/xhtml" > xmlns:xhtml="http://www.w3.org/1999/xhtml" > xmlns:widget="http://orbeon.org/oxf/xml/widget" > xmlns:xi="http://www.w3.org/2001/XInclude" > xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" > xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" > xmlns:f="http://orbeon.org/oxf/xml/formatting" > xmlns:ui="http://orbeon.org/oxf/xml/examples/ui" > xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" > xmlns:ev="http://www.w3.org/2001/xml-events" > xmlns:xforms="http://www.w3.org/2002/xforms" > xmlns:xsd="http://www.w3.org/2001/XMLSchema"> > <head> > <title>XSLT and JAXP Processors</title> > <xforms:model> > <xforms:instance id="editables"> > <root xmlns=""> > <html ui:mode="view" ui:output="" ui:input=""><ul> > <li>Type</li> <li>Name</li> <li>Purpose</li> > <li>Mandatory</li> </ul></html> > </root> > </xforms:instance> > <xforms:bind nodeset="html/@ui:output" > relevant="instance('editables')/html/@ui:mode = 'view'"/> > <xforms:bind nodeset="html/@ui:input" > relevant="instance('editables')/html/@ui:mode = 'edit'"/> > </xforms:model> > </head> > <body> > <xforms:group ref="html"> > <xforms:group ref="@ui:output"> > <xforms:output id="content-html-output" mediatype="text/html" > value=".."/> > <xforms:trigger appearance="minimal" ref="../@ui:mode"> > <xforms:label> > <img src="../apps/xforms-todo/images/edit.gif"/> Edit > </xforms:label> > <xforms:action ev:event="DOMActivate"> > <xforms:setvalue ref="." value="'edit'"/> > <xforms:setfocus control="content-html-input"/> > </xforms:action> > </xforms:trigger> > </xforms:group> > <xforms:group ref="@ui:input"> > <xforms:textarea mediatype="text/html" id="content-html-input" > ref=".."/> > <xforms:trigger appearance="minimal" ref="../@ui:mode"> > <xforms:label> > <img src="../apps/xforms-todo/images/save.gif"/> Save > </xforms:label> > <xforms:action ev:event="DOMActivate"> > <xforms:setvalue ref="." value="'view'"/> > <xforms:setfocus control="content-html-output"/> > </xforms:action> > </xforms:trigger> > </xforms:group> > </xforms:group> > </body> > </html> > > -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- 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 |
Thanks Florian and Erik, I'll be waiting for the bug resolution.
Regards! On Thu, 2007-08-02 at 17:57 +0200, Erik Bruchez wrote: > Rodrigo, > > We can reproduce this bug. So yes it is a bug. We have found plenty of > issues like this with the FCK Editor component. For now I entered a bug: > > http://forge.objectweb.org/tracker/index.php?func=detail&aid=307371&group_id=168&atid=350207 > > As suggested, you may want to try making this work in a dialog instead. > > The longer-term solution will likely be to switch to the new YUI RTE > component, which also works in Safari and Opera and is likely to be > better supported. > > -Erik > > Rodrigo Ojeda wrote: > > Hi: > > > > I'm trying this: an output that references an instance with html content > > and a trigger that fires an html area for editing the content with a > > button that returns to the output with the modified content. It worked > > with text and textarea but it's not working with html area. > > > > Thanks in advance. > > Regards! > > > > Here is the code (reproducible in xforms sandbox): > > > > <html xmlns="http://www.w3.org/1999/xhtml" > > xmlns:xhtml="http://www.w3.org/1999/xhtml" > > xmlns:widget="http://orbeon.org/oxf/xml/widget" > > xmlns:xi="http://www.w3.org/2001/XInclude" > > xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" > > xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" > > xmlns:f="http://orbeon.org/oxf/xml/formatting" > > xmlns:ui="http://orbeon.org/oxf/xml/examples/ui" > > xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" > > xmlns:ev="http://www.w3.org/2001/xml-events" > > xmlns:xforms="http://www.w3.org/2002/xforms" > > xmlns:xsd="http://www.w3.org/2001/XMLSchema"> > > <head> > > <title>XSLT and JAXP Processors</title> > > <xforms:model> > > <xforms:instance id="editables"> > > <root xmlns=""> > > <html ui:mode="view" ui:output="" ui:input=""><ul> > > <li>Type</li> <li>Name</li> <li>Purpose</li> > > <li>Mandatory</li> </ul></html> > > </root> > > </xforms:instance> > > <xforms:bind nodeset="html/@ui:output" > > relevant="instance('editables')/html/@ui:mode = 'view'"/> > > <xforms:bind nodeset="html/@ui:input" > > relevant="instance('editables')/html/@ui:mode = 'edit'"/> > > </xforms:model> > > </head> > > <body> > > <xforms:group ref="html"> > > <xforms:group ref="@ui:output"> > > <xforms:output id="content-html-output" mediatype="text/html" > > value=".."/> > > <xforms:trigger appearance="minimal" ref="../@ui:mode"> > > <xforms:label> > > <img src="../apps/xforms-todo/images/edit.gif"/> Edit > > </xforms:label> > > <xforms:action ev:event="DOMActivate"> > > <xforms:setvalue ref="." value="'edit'"/> > > <xforms:setfocus control="content-html-input"/> > > </xforms:action> > > </xforms:trigger> > > </xforms:group> > > <xforms:group ref="@ui:input"> > > <xforms:textarea mediatype="text/html" id="content-html-input" > > ref=".."/> > > <xforms:trigger appearance="minimal" ref="../@ui:mode"> > > <xforms:label> > > <img src="../apps/xforms-todo/images/save.gif"/> Save > > </xforms:label> > > <xforms:action ev:event="DOMActivate"> > > <xforms:setvalue ref="." value="'view'"/> > > <xforms:setfocus control="content-html-output"/> > > </xforms:action> > > </xforms:trigger> > > </xforms:group> > > </xforms:group> > > </body> > > </html> > > > > > > > plain text document attachment (message-footer.txt) > -- > 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 realize the truth. -What truth?- There is no spoon. -There is no spoon?- Then you'll see that it's not the spoon that bends, it is only yourself. -- 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 |