Jack
Jack

Reputation: 455

How to change webflow variable on key pressed?

I have flowScope variable in Spring WebFlow. I want to change it by pressing particular key from keyboard. So i need some ability to change it. I think about rich:hotkey, but what can be the function?

<rich:hotKey key="esc"  onkeyup="???" />

May be some other ideas? I need call to the backend

Upvotes: 0

Views: 236

Answers (1)

Makhiel
Makhiel

Reputation: 3884

a4j:jsFunction is what you want, you can use it like this:

<a4j:jsFunction name="myFunction" actionListener="#{bean.changeFlow}" /> 

<rich:hotKey key="esc" onkeyup="myFunction()"/>

Upvotes: 1

Related Questions