Menu Problem

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

Menu Problem

hcr
Hi.
   I use OPS3.5M1. I have a problem when I use menu. The problem is that: I run action "action-A" when I click MenuItem "item-1". The action "action-A" is run when I first click MenuItem "item-1". But when I second click MenuItem "item-1", The action "action-A" doesn't run. 
   The code is this:
<xforms:select1  appearance="xxforms:menu" incremental="true"
    ref="instance('menu-data')/selected">
    <xforms:itemset nodeset="instance('menu-data')/items//item">
         <xforms:label ref="@name"/>
         <xforms:value ref="@name"/>
         <xforms:action ev:event="xforms-value-changed">
             <xforms:action if="instance('menu-data')/selected = 'item1'">
                 <xxforms:script>
                     alert("action-A");
                 </xxforms:script>
             </xforms:action>
         </xforms:action> 
   </xforms:itemset>
</xforms:select1>
 
   Can I use 'xforms-value-changed' for this? Or have other method? I try to use 'xforms-select'. But this doesn't work for select1. How can I do it?
 
 
 
 
 



昨 天 和 女 友 b u y 疯 了 ! ! !
年 末 万 种 精 品 大 促 销 , 8 0 万 大 奖 天 天 送 ( 绝 对 保 真 )

--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Menu Problem

Alessandro  Vernet
Administrator
On 12/27/06, hechengrong <[hidden email]> wrote:
>    I use OPS3.5M1. I have a problem when I use menu. The problem is that: I
> run action "action-A" when I click MenuItem "item-1". The action "action-A"
> is run when I first click MenuItem "item-1". But when I second click
> MenuItem "item-1", The action "action-A" doesn't run.

I am not aware of this issue. Would you be able to put this in
stand-alone example that we can run in the XForms sandbox?

BTW, instead of:

> <xxforms:script>
>     alert("action-A");
> </xxforms:script>

You can write the following, which is more standard as it does not use
the xxforms:script, which is an extension to XForms:

<xforms:message level="modal">action-A</xforms:message>

Alex
--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet