Unable to pass instance elements attribute data to other instance src url parameter

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

Unable to pass instance elements attribute data to other instance src url parameter

Hasan
I have a instance in xform with id "feed "

<xforms:instance id="feed">
     <Data xmlns="">
         <Collection  ID="Dynamic01"  Name="Dynamic Collection 01"/>
     </Data>
<xforms:instance>

I have anther instance which is populated with some url and passed with a parameter from instance feed

<xforms:instance id="View-instance" src="http://localhost:8080/exist/getViews.xql?subCollectionType={{xforms:instance('feed')//Collection/@ID}}"/>
                       

I am unable to pass the value of attribute ID of element Collection  as a paramater to the src url of the second instance.

Kindly let me know if i am ding something wrong.
Regards,
Hasan
Reply | Threaded
Open this post in threaded view
|

Re: Unable to pass instance elements attribute data to other instance src url parameter

Louis Ratzesberger-2
Hi Hasan,

On XForms instances, the src attribute is evaluated during model  
construction and hence attribute value templates {}, are not supported  
there:

http://wiki.orbeon.com/forms/doc/developer-guide/xforms-attribute-value-templates

However, it is common practice to use the xforms-ready or  
xforms-model-construct-done event for further model/instance  
initialization. In that action element, you could build your url  
string and run a submission.

--Hank

Quoting Hasan <[hidden email]>:

>
> I have a instance in xform with id "feed "
>
> <xforms:instance id="feed">
>      <Data xmlns="">
>          <Collection  ID="Dynamic01"  Name="Dynamic Collection 01"/>
>      </Data>
> <xforms:instance>
>
> I have anther instance which is populated with some url and passed with a
> parameter from instance feed
>
> <xforms:instance id="View-instance"
> src="http://localhost:8080/exist/getViews.xql?subCollectionType={{xforms:instance('feed-instance')//Collection/@ID}}"/>
>
>
> I am unable to pass the value of attribute ID of element Collection  as a
> paramater to the src url of the second instance.
>
> Kindly let me know if i am ding something wrong.
>
> -----
> Hasan
> --
> View this message in context:  
> http://orbeon-forms-ops-users.24843.n4.nabble.com/Unable-to-pass-instance-elements-attribute-data-to-other-instance-src-url-parameter-tp2244041p2244041.html
> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.
>


--
Hank Ratzesberger
[hidden email]



--
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
Reply | Threaded
Open this post in threaded view
|

Re: Re: Unable to pass instance elements attribute data to other instance src url parameter

Erik Bruchez
Administrator
Good advice. Try to use xforms:send and xforms:submission on
xforms-model-construct-done.

Granted, it would be great if this was possible directly with
xforms:instance, but right now unfortunately it isn't.

-Erik

On Mon, Jun 7, 2010 at 4:05 PM, Louis Ratzesberger <[hidden email]> wrote:

> Hi Hasan,
>
> On XForms instances, the src attribute is evaluated during model
> construction and hence attribute value templates {}, are not supported
> there:
>
> http://wiki.orbeon.com/forms/doc/developer-guide/xforms-attribute-value-templates
>
> However, it is common practice to use the xforms-ready or
> xforms-model-construct-done event for further model/instance initialization.
> In that action element, you could build your url string and run a
> submission.
>
> --Hank
>
> Quoting Hasan <[hidden email]>:
>
>>
>> I have a instance in xform with id "feed "
>>
>> <xforms:instance id="feed">
>>     <Data xmlns="">
>>         <Collection  ID="Dynamic01"  Name="Dynamic Collection 01"/>
>>     </Data>
>> <xforms:instance>
>>
>> I have anther instance which is populated with some url and passed with a
>> parameter from instance feed
>>
>> <xforms:instance id="View-instance"
>>
>> src="http://localhost:8080/exist/getViews.xql?subCollectionType={{xforms:instance('feed-instance')//Collection/@ID}}"/>
>>
>>
>> I am unable to pass the value of attribute ID of element Collection  as a
>> paramater to the src url of the second instance.
>>
>> Kindly let me know if i am ding something wrong.
>>
>> -----
>> Hasan
>> --
>> View this message in context:
>> http://orbeon-forms-ops-users.24843.n4.nabble.com/Unable-to-pass-instance-elements-attribute-data-to-other-instance-src-url-parameter-tp2244041p2244041.html
>> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.
>>
>
>
>
> --
> Hank Ratzesberger
> [hidden email]
>
>
>
> --
> 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