Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JSF and asynchronous update  RSS feed

 
Marcello Tiso
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All,
Is it possible to display a JSF Page but one of the components gets updates.
Example. lets say I have a TextArea on a page.
User presses a button which goes and does some calculation(calcBean.java).
What I would like to have is the TextArea get updates to the results.

How would this be possible?
Does my calcBean
1) hold a ref to the textarea and
2) calcBean.calculation is executed on a separate thread?

Thanks in advance for you help.
 
Sergey Smirnov
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes! It is possible, even without taking care about a separate thread.
[ April 28, 2006: Message edited by: Sergey Smirnov ]
 
Marcello Tiso
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Sergey Smirnov:
Yes! It is possible, even without taking care about a separate thread.

[ April 28, 2006: Message edited by: Sergey Smirnov ]


Thanks for responding Sergey. Could you perhaps provide an example.
Or perhaps a link to an explanation on how this can be done.
Thank you
[ April 28, 2006: Message edited by: Mark Johnsen ]
 
Sergey Smirnov
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mark, send an e-mail to admin _at_ jsftutorials _dot_ net . I knew something that I could not say on the public yet. It perfectly matches what you want and it is not about any commerce product.
 
g madhava
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are couple of options available to you.
1]AJAX
2]Applets
3]Iframes
4] Hidden frames.
5] Form submit, so that JSF can do a postback of the updated value.
etc..

I am assuming overhere that when you change the value in one of the text fields, the value for the "text area" should change right ? This can be best achieved using AJAX in conjunction with JSF.

Try https://blueprints.dev.java.net/ajaxcomponents.html

There are some JSF components out there in the market that are AJAX aware. So you might want to research which best fits your requirements.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!