dynamic reference to an input-control-id

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

dynamic reference to an input-control-id

hospbene
Hello,

i've got a problem with references. I would like to set the value of the variable called "SEARCH_HELP_VALUES" with the value of the input above.

Here is the code i wrote.
I dont want to write the id (WF_Miscellaneous_NEXTAGENT) directly into the value-tag. I do more want, to do it dynamically. So let's say, something like

<xf:setvalue ref="SEARCH_HELP_VALUES" value="reference-to-the-id-of-the-above-input-control"/>




    <xf:input type="text" id="WF_Miscellaneous_NEXTAGENT" ref="instance('...')/..." class="next-agent"/>
       <xf:trigger appearance="minimal">
             <xf:label>
                <xhtml:img src="/resources/img/help_16.png"  style="position:relative; top:0px;" />
             </xf:label>
             <xf:action ev:event="DOMActivate">
                <xf:setvalue ref="SEARCH_HELP_VALUES" value=" "/>
                <xf:dispatch name="showF4contextualMenu" target="theModel" xxforms:show-progress="true"/>
            </xf:action>                               
        </xf:trigger>



Is it possible to do that? Or does it have to be the static way?

greetz and thx

bene
Reply | Threaded
Open this post in threaded view
|

Re: dynamic reference to an input-control-id

fl.schmitt(ops-users)
Benedikt,

> Here is the code i wrote.
> I dont want to write the id (WF_Miscellaneous_NEXTAGENT) directly into the
> value-tag. I do more want, to do it dynamically. So let's say, something
> like
>
> <xf:setvalue ref="SEARCH_HELP_VALUES"
> value="reference-to-the-id-of-the-above-input-control"/>

this looks quite similar to one of the xforms sandbox examples - "XForms
Event Context" demonstrates accessing the id of the target of a xforms
event using value="event('xxforms:targetid')". You'll find the source in
orbeon,war in the file
WEB-INF/resources/apps/xforms-sandbox/samples/event-context.xhtml

HTH
florian


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