• Post Reply Bookmark Topic Watch Topic
  • New Topic

Howto call a Javascript Function with a dynamic JSF EL parameter  RSS feed

 
Raymund Nickel
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
im using a Javascript from Richfaces to close a modal panel. Everything works fine, but i want to make the parameter, which is given to the javascript function, dynamic.

Now:
<h:commandButton ... onclick="#{rich:component('warning_message_modal_panel')}.hide()" ... />

Should be like:
<h:commandButton ... onclick="#{rich:component('#{JavaBean.modalPanelId}')}.hide()" ... />

This EL entry doesnt work, but how must it look like?
I hope the explanation of my problem was ok...

Any ideas?

Thank you,
Ray
 
Srini Mutpur
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Can you move this code into some javascript function.. and send the param to that function..


funtion testFunction(panelName){

#{rich:component(panelName)}.hide()"
}
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!