How to implement any keypress events in Orbeon XForms

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

How to implement any keypress events in Orbeon XForms

joyce.wang
Hi,
We are planning to use Orbeon with Java and Firefox or IE to develop a part of our software. We are currently in the design phase. We have two questions to ask you:

1. We need to implement trapping fuction keys or any keypress events in Orbeon. I checked all examples, mailing-list, and some documents, but I didn't find any related information. Could you help us with this, or give us some suggestions on how to do it?

2. If we want to implement our own menubar in firefox or IE from Orbeon, how do we to do it?

Please give us some suggestions.

Thanks,

Joyce



--
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: How to implement any keypress events in Orbeon XForms

Alessandro Vernet
Administrator
Joyce,

On 8/14/07, [hidden email] <[hidden email]> wrote:
> 1. We need to implement trapping fuction keys or any keypress events in Orbeon. I checked all examples, mailing-list, and some documents, but I didn't find any related information. Could you help us with this, or give us some suggestions on how to do it?

What do you mean by implementing trapping function keys? If you have
incremental="true" on controls (say xforms:input), you will receive an
event (xforms-value-changed) every time the user types something. You
can react on this event and implement your own logic there. But I am
not sure this is what you are looking for.

> 2. If we want to implement our own menubar in firefox or IE from Orbeon, how do we to do it?

You can get a menu rendered in the page by adding
appearance="xxforms:menu" to <xforms:select1>. See the example "menu"
in the XForms sandbox.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.com/



--
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: How to implement any keypress events in Orbeon XForms

joyce.wang
Alessandro Vernet wrote:

>Joyce,
>
>On 8/14/07, [hidden email] <[hidden email]> wrote:
>  
>
>>1. We need to implement trapping fuction keys or any keypress events in Orbeon. I checked all examples, mailing-list, and some documents, but I didn't find any related information. Could you help us with this, or give us some suggestions on how to do it?
>>    
>>
>
>What do you mean by implementing trapping function keys? If you have
>incremental="true" on controls (say xforms:input), you will receive an
>event (xforms-value-changed) every time the user types something. You
>can react on this event and implement your own logic there. But I am
>not sure this is what you are looking for.
>
>  
>
What do I mean by trapping function keys is: in Orbeon, can I do some
action by pressing keys on the keyborad, for example "Ctrl + x" for
action "CUT", or "Shift + F8" for delete line by line, or etc. Basiclly,
We need to provide our users some functions, so the users can press some
keys on keyboard to do some action in stead of mouse click.
As well, we need to have the options available on right clicking. How
can we implement this in Orbeon? Do you have any examples for these?

Thanks,

Joyce

>>2. If we want to implement our own menubar in firefox or IE from Orbeon, how do we to do it?
>>    
>>
>
>You can get a menu rendered in the page by adding
>appearance="xxforms:menu" to <xforms:select1>. See the example "menu"
>in the XForms sandbox.
>
>Alex
>  
>
>------------------------------------------------------------------------
>
>
>--
>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
>  
>


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

joyce.wang.vcf (217 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to implement any keypress events in Orbeon XForms

Alessandro Vernet
Administrator
Joyce,

On 8/16/07, Joyce Wang <[hidden email]> wrote:
> What do I mean by trapping function keys is: in Orbeon, can I do some
> action by pressing keys on the keyborad, for example "Ctrl + x" for
> action "CUT", or "Shift + F8" for delete line by line, or etc. Basiclly,
> We need to provide our users some functions, so the users can press some
> keys on keyboard to do some action in stead of mouse click.
> As well, we need to have the options available on right clicking. How
> can we implement this in Orbeon? Do you have any examples for these?

I understand. There are no event handlers of this kind in XForms, but
in future versions we could support this as an extension, building on
the DOM events. Right now you have to implement your own event handler
in JavaScript. You can register it with:

YAHOO.util.Event.addListener(document, "keypress", myKeypress);

And then in that event handler you can dispatch an XForms event:

function myKeypress(event) {
    if (test on event that shit-f8 was pressed)
        ORBEON.xforms.Document.dispatchEvent("main-model", "shift-f8");
}

And on the XForms model you declare the XForms event handler for the
shift-f8 event:

<xforms:model id="main-model" xxforms:external-events="shift-f8">
    <xforms:action ev:event="shift-f8">
        ...
    </xforms:action>
</xforms:model>

You'll let us know if this works for you!

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.com/



--
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: How to implement any keypress events in Orbeon XForms

joyce.wang
Hi Alex,
Thank you very much for your suggestion. My events are working now.
Thanks again,

Joyce

Alessandro Vernet wrote:

>Joyce,
>
>On 8/16/07, Joyce Wang <[hidden email]> wrote:
>  
>
>>What do I mean by trapping function keys is: in Orbeon, can I do some
>>action by pressing keys on the keyborad, for example "Ctrl + x" for
>>action "CUT", or "Shift + F8" for delete line by line, or etc. Basiclly,
>>We need to provide our users some functions, so the users can press some
>>keys on keyboard to do some action in stead of mouse click.
>>As well, we need to have the options available on right clicking. How
>>can we implement this in Orbeon? Do you have any examples for these?
>>    
>>
>
>I understand. There are no event handlers of this kind in XForms, but
>in future versions we could support this as an extension, building on
>the DOM events. Right now you have to implement your own event handler
>in JavaScript. You can register it with:
>
>YAHOO.util.Event.addListener(document, "keypress", myKeypress);
>
>And then in that event handler you can dispatch an XForms event:
>
>function myKeypress(event) {
>    if (test on event that shit-f8 was pressed)
>        ORBEON.xforms.Document.dispatchEvent("main-model", "shift-f8");
>}
>
>And on the XForms model you declare the XForms event handler for the
>shift-f8 event:
>
><xforms:model id="main-model" xxforms:external-events="shift-f8">
>    <xforms:action ev:event="shift-f8">
>        ...
>    </xforms:action>
></xforms:model>
>
>You'll let us know if this works for you!
>
>Alex
>  
>
>------------------------------------------------------------------------
>
>
>--
>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
>  
>


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

joyce.wang.vcf (217 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to implement any keypress events in Orbeon XForms

Alessandro Vernet
Administrator
Joyce,

On 8/30/07, Joyce Wang <[hidden email]> wrote:
> Thank you very much for your suggestion. My events are working now.
> Thanks again,

You're welcome. I am glad to read that this worked for you.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.com/



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