Re: Edit broadcasting
Denis Laprise <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.rdf |
|---|---|
| Organization | Another Netscape Collabra Server User |
| Message-ID | <[email protected]> |
Axel Hecht wrote:
> Denis Laprise wrote:
>
>> Hi,
>>
>> I'd like to know if there is any way to make XUL elements having the
>> same datasource to update their content upon edition.
>>
>> I doubt it would be possible with a broadcaster since I'm using a
>> template.
>>
>> What I would like is to have the textboxes from the example below
>> showing the same ?authorfirstname syncing their content. Do I have to
>> manually update the datasource with javascript?
>
>
> Yes, that's just the beauty of RDF templates, that they reflect changes
> in the datasource.
>
> JUST, you can't write those changes back to the server by standard
> means, if you want to do edits, you need to use some soap or xml-rpc and
> feed your changes manually.
>
> Axel
consider the template below:
<vbox datasources="bookstore_ext.rdf.php?classname=Book"
ref="http://localhost/genericStore/Book">
<label value="test" />
<template>
<rule>
<textbox id="one" uri="rdf:*"
value="rdf:http://localhost/genericStore/Book#Title" />
<textbox id="two" uri="rdf:*"
value="rdf:http://localhost/genericStore/Book#Title"/>
</rule>
</template>
</vbox>
Both textboxes show the same data. However, if I edit the value in one,
it won't propagate to two. I guess I must tell the datasource by some
JS process that the value changed and would like to know the right way
to do it.
Thank you for your help
Denis Laprise