• Post Reply Bookmark Topic Watch Topic
  • New Topic

Setting values of f:param using javascript

 
selvakumar Thiyagarajan
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,

is it possible to set the values of f:param using javascript? below is the sample.

JSF:



Javascript:

 
Gerbrand van Dieijen
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The f:param tags works serverside, while javascripts works client side.

You can use ajax to accomplish that. You can use a library such as ajax4j (part of richfaces) to have ajax support for JSF 1.2 - if you use JSF 2.0 (very new, so not very likely) you'll have ajax support by default.

Using ajax4j, you can (amongst others) bind javascript events to serverside methods:


myPanelId refers to an ajax4j region that should be rerendered.

See documentation on ajax4j website, and the many examples on the web for more information.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!