How to access multpile instances in XPL

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

How to access multpile instances in XPL

safraz
Hi,

I'm trying to implement an auto complete component. (referring xforms-controls:auto complete). I'm populating data into an instance (which used by itemset) from the db when the form initialization.

I want to update the instance which uses in itemset when value change. What i want to know is how can i pass instances (which bind the auto complete & itemset.) to an XPL from a single submission.

Regards,
Safraz
Reply | Threaded
Open this post in threaded view
|

Re: How to access multpile instances in XPL

Alessandro Vernet
Administrator
Safraz,

safraz wrote
I'm trying to implement an auto complete component. (referring xforms-controls:auto complete). I'm populating data into an instance (which used by itemset) from the db when the form initialization.

I want to update the instance which uses in itemset when value change. What i want to know is how can i pass instances (which bind the auto complete & itemset.) to an XPL from a single submission.
I'd recommend you use the new <fr:autocomplete> for this. And to update the itemset based on the result of a submission as the user types, see the section "Dynamic Itemset" under:

http://wiki.orbeon.com/forms/doc/developer-guide/xbl-existing-xbl-components#TOC-Autocomplete

Alex
Reply | Threaded
Open this post in threaded view
|

Re: How to access multpile instances in XPL

safraz
Alex,

Alessandro Vernet wrote
I'd recommend you use the new <fr:autocomplete> for this. And to update the itemset based on the result of a submission as the user types, see the section "Dynamic Itemset" under:

http://wiki.orbeon.com/forms/doc/developer-guide/xbl-existing-xbl-components#TOC-Autocomplete

Alex
The links were useful. However, it doesn't address the XPL section.
I can see two instances were used for the autocomplete, one for the autocomplete binding and other for the itemset binding. I guess when in a value change, the instance which bound to autocomplete is passed to XPL and itemset instance is assigned with an external xml ( like xforms-controls in the orbeon examples)

My scenario is little different. when the form initialized a db call in performed and result is stored in a instance which is bound to the itemset. When in a value change i'm submitting the instance which is bound to autocomplete to a XPL.

What i want to know is how can i access the instance which bound to itemset from the called XPL. (which can access only the autocomplete instance)


Any Suggestions?

I have used one instance for both. It works recursively when analyzing the log.

for your convenience  i'm attaching the codes.

view.xhtml
updated-filenames.xpl 


 
Reply | Threaded
Open this post in threaded view
|

Re: How to access multpile instances in XPL

Alessandro Vernet
Administrator
Safraz,

safraz wrote
The links were useful. However, it doesn't address the XPL section.
I can see two instances were used for the autocomplete, one for the autocomplete binding and other for the itemset binding. I guess when in a value change, the instance which bound to autocomplete is passed to XPL and itemset instance is assigned with an external xml ( like xforms-controls in the orbeon examples)

My scenario is little different. when the form initialized a db call in performed and result is stored in a instance which is bound to the itemset. When in a value change i'm submitting the instance which is bound to autocomplete to a XPL.

What i want to know is how can i access the instance which bound to itemset from the called XPL. (which can access only the autocomplete instance)
I see; so you are using just one instance which contains the itemset and the value typed by the user. So this will be in the instance that you'll submit to your service, and the instance that you will return from your service. So I am not sure what your question is about accessing the instance from XPL, as this will be the instance you submit to your XPL. I looked at your code, but I must be still missing something.

Alex
Reply | Threaded
Open this post in threaded view
|

Re: How to access multpile instances in XPL

safraz
Alex,

Alessandro Vernet wrote
I looked at your code, but I must be still missing something.
Any updates on this?