Tony Johnson

Greenhorn
+ Follow
since Apr 23, 2013
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Tony Johnson

Hi,

I am new to java and jsf. previously used to work in .net 3.5. I am trying to figure out how can i invoke a bean method from javascript. Here is the problem.

I have a richfaces tabPanel on a jsf page having a switchType="ajax". There are several tabs in this tab panel. What i want to accomplish is that when a tab is clicked or enetered the backing bean initialization method is invoked. The problem is whenever a tab is clicked all methods for different tabs are invoked and data is fetched for all tabs. So i thought i would use a javascript function to be called on "ontabenter" method which will in turn call the relevant backing bean method but i dun know if its the right approach and if it is how to do it (dun know the syntax). i am complete blank.

Here is my code:




With the above code all the methods are invoked every time page loads or a tab is clicked\enetered. Hope i made my problem clear. Waiting for help
11 years ago
JSF