select1 action setvalue selected node ref how?

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

select1 action setvalue selected node ref how?

Jeremiah Jahn-4
I have to set multiple values in my main instance. they are in
different parts of the model. What I have below works, but after the
fact. What I need to get is the @name out of the selected node, but I
can't seem to find a way to reference it from with in the action. Is
there some built in variable or instance name that refers to it? Or am
I just doing it all wrong? I'd expect my value xpath to read something
like : value = "instance('programs')/program[@name =
$selectedNode/@name]/@pciRelated". But I just can't seem to find a way
to refer to the node in question.

<xforms:select1 ref="instance('newtask')/program/@name" appearance="minimal">
  <xforms:label>label</xforms:label>
  <xforms:help>help</xforms:help>
  <xforms:item>
    <xforms:label>Choose Program</xforms:label>
    <xforms:value />
 </xforms:item>
 <xforms:itemset nodeset="instance('programs')/program">
   <xforms:label ref="@name"/>
   <xforms:value ref="@name"/>
 </xforms:itemset>
 <xforms:action ev:event="xforms-select">

            <xforms:setvalue  ref="instance('newtask')/@isPCIRelated"
value="instance('programs')/program[@name =
instance('newtask')/program/@name]/@pciRelated"/>

 </xforms:action>
</xforms:select1>


--
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: select1 action setvalue selected node ref how?

Erik Bruchez
Administrator
Jeremiah,

Do you still need help with this?

-Erik

On Sun, Aug 30, 2009 at 8:16 PM, Jeremiah Jahn <[hidden email]> wrote:

> I have to set multiple values in my main instance. they are in
> different parts of the model. What I have below works, but after the
> fact. What I need to get is the @name out of the selected node, but I
> can't seem to find a way to reference it from with in the action. Is
> there some built in variable or instance name that refers to it? Or am
> I just doing it all wrong? I'd expect my value xpath to read something
> like : value = "instance('programs')/program[@name =
> $selectedNode/@name]/@pciRelated". But I just can't seem to find a way
> to refer to the node in question.
>
> <xforms:select1 ref="instance('newtask')/program/@name" appearance="minimal">
>  <xforms:label>label</xforms:label>
>  <xforms:help>help</xforms:help>
>  <xforms:item>
>    <xforms:label>Choose Program</xforms:label>
>     <xforms:value />
>  </xforms:item>
>  <xforms:itemset nodeset="instance('programs')/program">
>    <xforms:label ref="@name"/>
>    <xforms:value ref="@name"/>
>  </xforms:itemset>
>  <xforms:action ev:event="xforms-select">
>
>             <xforms:setvalue  ref="instance('newtask')/@isPCIRelated"
> value="instance('programs')/program[@name =
> instance('newtask')/program/@name]/@pciRelated"/>
>
>  </xforms:action>
> </xforms:select1>
>
>
> --
> 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
Reply | Threaded
Open this post in threaded view
|

Re: Re: select1 action setvalue selected node ref how?

Jeremiah Jahn-4
nope, I'm good, thanks. just picked the wrong event to watch
On Sep 17, 2009, at 6:42 PM, Erik Bruchez wrote:

> Jeremiah,
>
> Do you still need help with this?
>
> -Erik
>
> On Sun, Aug 30, 2009 at 8:16 PM, Jeremiah Jahn  
> <[hidden email]> wrote:
>> I have to set multiple values in my main instance. they are in
>> different parts of the model. What I have below works, but after the
>> fact. What I need to get is the @name out of the selected node, but I
>> can't seem to find a way to reference it from with in the action. Is
>> there some built in variable or instance name that refers to it? Or  
>> am
>> I just doing it all wrong? I'd expect my value xpath to read  
>> something
>> like : value = "instance('programs')/program[@name =
>> $selectedNode/@name]/@pciRelated". But I just can't seem to find a  
>> way
>> to refer to the node in question.
>>
>> <xforms:select1 ref="instance('newtask')/program/@name"  
>> appearance="minimal">
>>  <xforms:label>label</xforms:label>
>>  <xforms:help>help</xforms:help>
>>  <xforms:item>
>>    <xforms:label>Choose Program</xforms:label>
>>     <xforms:value />
>>  </xforms:item>
>>  <xforms:itemset nodeset="instance('programs')/program">
>>    <xforms:label ref="@name"/>
>>    <xforms:value ref="@name"/>
>>  </xforms:itemset>
>>  <xforms:action ev:event="xforms-select">
>>
>>             <xforms:setvalue  ref="instance('newtask')/@isPCIRelated"
>> value="instance('programs')/program[@name =
>> instance('newtask')/program/@name]/@pciRelated"/>
>>
>>  </xforms:action>
>> </xforms:select1>
>>
>>
>> --
>> 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