I have a strange behaviour. The following code will work :
<xforms:instance id="news-template"> <news xmlns=""> <item mode="<b>view"> <subject /> <date/> <contributors/> <content/> <comment/> </item> </news> </xforms:instance> <xforms:bind nodeset="item" relevant="<b>@mode = 'view'" /> <xforms:group class="addNews" ref="instance('news-template') "> <xforms:trigger id="addNews" ref="<b>.[item/@mode != 'view']" appearance="minimal"> <xforms:label></xforms:label> <xforms:setvalue ref="item/@mode" ev:event="DOMActivate" value="'view'" /> </xforms:trigger> <br /> <br /> <xforms:textarea mediatype="text/html" ref="content" > <xforms:label class="news-label">Content</xforms:label> </xforms:textarea> As you can see, like I set mode to view, to bind revelant is true, so FCKEditor appears and it works fine. Now, if I modifiy in my news-template instance mode to noView. Relevant will be false. So the editor will not appear. That's ok too. When I click on my add button, the trigger will change to view, so the editor will appear. Right to this point, everything is perfect. But now, I cannot write INSIDE the editor. Impossible. If I then go over a button in the editor, let's say the bold button, I see the following error in firefox's firebug console: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLDocument.execCommand]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://localhost:8080/mepia2/ops/fckeditor/editor/js/fckeditorcode_gecko.js :: anonymous :: line 37" data: no] before_unload(beforeunload ) in common.js, line 121 So how come the relevant property screws up everything ? I tried a setfocus, but it didn't work out. Anybody has an idea ? |
Administrator
|
Mmm, there are a few issues with the FCKeditor, including these:
http://forge.objectweb.org/tracker/index.php?func=detail&aid=307371&group_id=168&atid=350207 http://forge.objectweb.org/tracker/index.php?func=detail&aid=306264&group_id=168&atid=350207 http://forge.objectweb.org/tracker/index.php?func=detail&aid=305555&group_id=168&atid=350207 Also, we don't use the latest version of FCKeditor: http://forge.objectweb.org/tracker/index.php?func=detail&aid=307150&group_id=168&atid=350207 One plan was to migrate to the Yahoo! RTE and hope that it is better supported: http://forge.objectweb.org/tracker/index.php?func=detail&aid=307370&group_id=168&atid=350207 RTE also supports Safari and Opera, which is great plus. The upgrade to the latest YUI library, which is a prerequisite for RTE, is almost completed, so hopefully RTE can be integrated soon (maybe by keeping FCK in at the same time for people who prefer it). FCKeditor works in a dialog though. Maybe you could use that as a workaround for now. -Erik StephR wrote: > I have a strange behaviour. The following code will work : > > <xforms:instance id="news-template"> > <news xmlns=""> > <item mode="view"> > <subject /> > <date/> > <contributors/> > <content/> > <comment/> > </item> > </news> > </xforms:instance> > > <xforms:bind nodeset="item" relevant="@mode = 'view'" /> > > <xforms:group class="addNews" ref="instance('news-template') "> > <xforms:trigger id="addNews" ref=".[item/@mode != 'view']" > appearance="minimal"> > <xforms:label> ../design/images/add.gif </xforms:label> > <xforms:setvalue ref="item/@mode" ev:event="DOMActivate" > value="'view'" /> > </xforms:trigger> > <br /> > <br /> > <xforms:textarea mediatype="text/html" ref="content" > > <xforms:label class="news-label">Content</xforms:label> > </xforms:textarea> > > As you can see, like I set mode to view, to bind revelant is true, so > FCKEditor appears and it works fine. Now, if I modifiy in my news-template > instance mode to noView. Relevant will be false. So the editor will not > appear. That's ok too. When I click on my add button, the trigger will > change to view, so the editor will appear. Right to this point, everything > is perfect. But now, I cannot write INSIDE the editor. Impossible. If I then > go over a button in the editor, let's say the bold button, I see the > following error in firefox's firebug console: > > uncaught exception: [Exception... "Component returned failure code: > 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLDocument.execCommand]" nsresult: > "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: > http://localhost:8080/mepia2/ops/fckeditor/editor/js/fckeditorcode_gecko.js > :: anonymous :: line 37" data: no] > before_unload(beforeunload ) > in common.js, line 121 > > So how come the relevant property screws up everything ? I tried a setfocus, > but it didn't work out. Anybody has an idea ? > > -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
What a bummer :(
Steph Erik Bruchez a écrit : Mmm, there are a few issues with the FCKeditor, including these: -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Stephane,
> What a bummer :( > > * Can I "easily" upgrade the version of FCKeditor? We haven't tried this yet, but somebody reported that upgrading it seemed to work pretty much out of the box. You will have to unzip ops-resources-public.jar and look at where the FCKeditor files are, then replace them with those of the latest version. > * I understand that migrating to Yahoo! RTE is not a top priority, > but do you have an idea when you think this will be done ? Unfortunately not, but we hope to get some help to do this sooner rather than later. > * "FCKeditor works in a dialog though. Maybe you could use that as a > workaround for now". Didn't get this. It's maybe my english, but > what do you mean by "dialog"? Do you have an example? Yes, use xxforms:dialog, xxforms:show, and xxforms:hide. This I fear is not much documented, but we have a sample, dialog.xhtml: http://www.orbeon.com/ops/xforms-sandbox/sample/dialog http://www.orbeon.com/ops/source-viewer/xforms-sandbox/samples/dialog.xhtml -Erik -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |