RichFaces editor: how to intercept the “return” key to submit a form
Hello,
I'll try to write more on my blog and keep you update about every technique I use and that can be very useful to you as well.
Today I needed to submit a form with an editor element when the user pressed the "return" key (instead of creating a new line).
The code is not so complicate but as the rich:editor uses the TinyMCE component you have to search all around to find the right way. Better to have a complete solution.
It consists on creating an handler onKeyPress and call a javascript function (created by a:jsFunction) to submit our form. Simpler doing then saying it.
To read all the article click the following link:
http://blog.demetrio.it/2010/02/12/richfaces-editor-how-to-intercept-the-return-key-to-submit-a-form/
Demetrio Filocamo
------
JBoss RichFaces 3.3 (book) - http://www.packtpub.com/jboss-richfaces-3-3
Learn RichFaces step by step developing a sample application.
I'll try to write more on my blog and keep you update about every technique I use and that can be very useful to you as well.
Today I needed to submit a form with an editor element when the user pressed the "return" key (instead of creating a new line).
The code is not so complicate but as the rich:editor uses the TinyMCE component you have to search all around to find the right way. Better to have a complete solution.
It consists on creating an handler onKeyPress and call a javascript function (created by a:jsFunction) to submit our form. Simpler doing then saying it.
To read all the article click the following link:
http://blog.demetrio.it/2010/02/12/richfaces-editor-how-to-intercept-the-return-key-to-submit-a-form/
Demetrio Filocamo
------
JBoss RichFaces 3.3 (book) - http://www.packtpub.com/jboss-richfaces-3-3
Learn RichFaces step by step developing a sample application.
Labels: editor, install howto "jboss as" jboss debian system init linux, intercept, java cdk richfaces skypecall howto jsf component, onkeypress, return key
1 Comments:
nice post. I would love to follow you on twitter.
By Anonymous, At February 16, 2010 at 4:14 AM
Post a Comment
Subscribe to Post Comments [Atom]
<< Home