This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes JSF and the fly likes Howto call a Javascript Function with a dynamic JSF EL parameter Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » JSF
Reply Bookmark "Howto call a Javascript Function with a dynamic JSF EL parameter" Watch "Howto call a Javascript Function with a dynamic JSF EL parameter" New topic
Author

Howto call a Javascript Function with a dynamic JSF EL parameter

Raymund Nickel
Greenhorn

Joined: Aug 17, 2009
Posts: 8
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

Joined: Mar 29, 2008
Posts: 24

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


funtion testFunction(panelName){

#{rich:component(panelName)}.hide()"
}


SCJP 1.5
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Howto call a Javascript Function with a dynamic JSF EL parameter
 
Similar Threads
Problem with double INVOKE APPLICATION in JSF 2.0
How to display richPopupPanel wondow from javascript
Javascript in JSF
Problem inside a richModalPanel
problem in paging using javascript