Re: Re: RE: Re: Textarea to handle a nodeset

Posted by bsteuhl on
URL: https://discuss.orbeon.com/Textarea-to-handle-a-nodeset-tp2717564p2718076.html

I have recently done this in textArea control and it took me the whole weekend to figure out the complexities when dealing with styling as well and escaping tags using nothing but xform extensions and xpath.  Pretty complex but I can preload a textarea with a template and have controls change data in the textarea as well as have users change data in the textarea keeping things in synch.
 

Brian Steuhl
website: http://BTMSoftwareSolutions.com
business email: [hidden email]
cell: 908-421-0742

home office: 732-961-3187
RSS Feed To My Blog:

Business Process Modeling - BTMSoftwareSolutions.com




From: Erik Bruchez <[hidden email]>
To: [hidden email]
Sent: Tue, September 28, 2010 5:45:03 PM
Subject: [ops-users] Re: RE: Re: Textarea to handle a nodeset

Stephanie,

Just trying to understand the use case here.

What you are doing in this example is pointing to so-called complex
content, i.e. an element containing "stuff" other than just text.

Right now, XForms disallows that: you can only point to elements
without nested content, or attributes.

So the question is: what do you do with that content, both ways:

* when reading from the instance to the control
* when writing to the instance from the control

What's your algorithm for those operations?

-Erik

On Tue, Sep 28, 2010 at 2:31 PM, Stephanie Hall (TT)
<[hidden email]> wrote:

> Hold data from an instance? I'm sorry, I don't know exactly what you're looking for.  Right now if you bind a nodeset to a textarea, it will display all of the contents of the nodeset, but I want, upon changes to the nodeset in the textarea, that the appropriate node be updated in the instance. That doesn't happen now - it just gets reset to the original instance's data.
>
> So if I have
>
> <instance id="myinstance">
>        <project>
>                <files>
>                        <file>
>                                <filename>name1</filename>
>                                <createdBy>steve</createdBy>
>                        </file>
>                        <file>
>                                <filename>name2</filename>
>                                <createdBy>bob</createdBy>
>                        </file>
>                </files>
>        </project>
> </instance>
>
> I would see (if I do ref="instance('myInstance')/files" in the xforms:textarea)
>
> Name1
> Steve
>
> Name2
> Bob
>
> In the textarea.  And then if I make changes in the textarea, like bob becomes Ted, I want it to update the instance to be:
>
>  <instance id="myinstance">
>        <project>
>                <files>
>                        <file>
>                                <filename>name1</filename>
>                                <createdBy>steve</createdBy>
>                        </file>
>                        <file>
>                                <filename>name2</filename>
>                                <createdBy>Ted</createdBy>
>                        </file>
>                </files>
>        </project>
> </instance>
>
> It has to be displayed in a textarea, also (or something that looks like one to the normal user at least) :)
>
> Thanks,
> Stephanie
>
>
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On Behalf Of Erik Bruchez
> Sent: Tuesday, September 28, 2010 4:22 PM
> To: [hidden email]
> Subject: [ops-users] Re: Textarea to handle a nodeset
>
> Stephanie,
>
> What would the nodeset do?
>
> -Erik
>
> On Tue, Sep 28, 2010 at 10:10 AM, Stephanie Hall (TT) <[hidden email]> wrote:
>> Hi all,
>>
>>
>>
>> Is there support anywhere for a textarea to handle a nodeset?  Or,
>> would it be difficult to extend the existing textarea component to
>> support this via XBL?
>>
>>
>>
>> Thanks,
>>
>> Stephanie
>>
>> --
>> 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
>>
>>
>
>
> --
> 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
>
>



--
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