Re: Will Moz-Xform be able to support some form of deep copy?

Adam FLinton <[email protected]>
Newsgroups gmane.comp.mozilla.devel.xml
Organization Another Netscape Collabra Server User
Message-ID <[email protected]>
Allan Beaufour wrote:

> Tuesday 18 October 2005 10:59 skrev Adam FLinton:
> 
>>I am trying to write an Xforms app which allows a user to add & change
>>annotations written in XHTML where the annotation is contained within a
>>textarea
> 
> 
> Did you get a sufficient answer on www-forms?
> 
> btw, many of your problems can be solved with a "Mozilla solution" by doing 
> custom controls: http://developer.mozilla.org/en/docs/XForms:Custom_Controls
> 
> It would be nice to see an implementation for <xforms:textarea 
> appearence="richedit"/>. Should be doable. Any volunteers? :-)
> 

<G>

At the moment I am having to back off & go for the tomcat running local 
route as to edit the XHTML in the textarea (at present) I have to pass 
it as HTML so as to allow the JScript editors to work.

i.e I am putting an "edit" button within each editable textarea which 
contains the Xpath to the annotation & fires up a html popup window 
which gets the annotation text from tomcat & then saving goes back 
through tomcat to the xml.

Also in a converstation with David Landwehr he mentioned that :

"Repeats within repeats/within a table.

No this don't work and that is because IE will not allow for any other 
tag under table than tr or thead. The xforms:repeat element is placed in 
a wierd place in the DOM and that is the reason it is not working.
I have not been able to solve this scenario in a suitable way and simply 
have to say that since xhtml does not allow for xforms:repeat under 
table that the document must be regarded as invalid and therefore should 
not work. That xforms:repeat cannot be under table is correct and 
therefore you might in the future see that the functionality in firefox 
removed.
I know this is a big problem and there is no real workaround for it. For 
a full CSS 2 implementation one could have used CSS tables, but with IE 
that isn't implement and therefore useless.
"

But he did pass me some javascript which deals with the extract & then 
put back the contents of an element :

"In my plug-in you can get to the bound node for a control, get the xml 
modify it and write it back on the node (you have to parse it also). 
After you have done that for must do rebuild, recalculate, revalidate 
and refresh on the model. "

I would prefer however that there was a specified method for this within 
the XForms std bcause you need to be able to:

A) Extract the text
B) Be able to explicitly save the text as otherwise you're locked into a 
battle between the editor try to edit & the plugin trying to keep track 
of changes.

Adam
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.