Re: Altering dynamic itemset does not alter select control reference

Posted by Erik Bruchez-3 on
URL: https://discuss.orbeon.com/Altering-dynamic-itemset-does-not-alter-select-control-reference-tp1461843p1469680.html

Hank,

That sounds weird. Yes, a sandbox-able example would be good!

-Erik

On Wed, Feb 3, 2010 at 2:15 PM, Hank Ratzesberger
<[hidden email]> wrote:

> Hi programmers and residents of Saturn (see @orbeon ;)
>
> The itemset for a select control is an instance that other
> controls in the form insert into.  A trigger allows the user
> to delete from the list -- click one or more in the select
> control and click the "Remove" button/trigger.
>
> All is working except that the reference to the select
> is not recalculated  -- it lists all the strings that
> were ever selected.
>
> I am not sure if there was another step or this is a bug.
>
> I can point you to a the form, or, complete what I started below
> for the sandbox. I didn't recognize anything in the Forge that
> looked like this issue.
>
> Cheers,
> Hank
>
> <xforms:instance id="things">
>        <things xmlns=""/>
> </xforms:instance>
>
> <xforms:instance id="select-form">
>    <config xmlns="">
>        <thing-names/>
>        <remove>true</remove> <!-- Initially disabled -->
>    </config>
> </xforms:instance>
>
> <xforms:bind nodeset="instance('select-form')">
>    <xforms:bind nodeset="remove" type="xs:boolean"
>        readonly="boolean-from-string(.)"
>        calculate="empty(instance('things')//thing)"/>
> </xforms:bind>
>
>
> <!-- In the form, the select lists "things" that were added elsewhere, and
>     below it, a trigger deletes the things.  The UI is in sync, but the
>      instance('thing-form')/remove retains values.
> -->
>
> <xforms:select ref="instance('select-form')/thing-names" appearance="compact">
>  <xforms:itemset nodeset="instance('things')//thing">
>     <xforms:value value="name"/>
>     <xforms:label><xforms:output value="name"/></xforms:label>
>   </xforms:itemset>
>  </xforms:select>
>
> <xforms:trigger ref="instance('select-form')/remove">
>    <xforms:label> Remove Selected Things </xforms:label>
>    <xforms:action ev:event="DOMActivate">
>        <xforms:delete nodeset="instance('things')/thing[name=tokenize(instance('select-form')/remove,'\s')]"/>
>    </xforms:action>
> </xforms:trigger>
>
>
>
> Hank Ratzesberger
> NEES@UCSB
> Institute for Crustal Studies,
> University of California, Santa Barbara
> 805-893-8042
>
>
>
>
>
>
>
> --
> 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