Solved

Is it p;ossible to call a javabean method from a javascript function?

Posted on 2006-06-22
2
269 Views
Last Modified: 2008-02-01
I have a JSP in which I have defined a javabean

<jsp:useBean id="myUtility" scope="request" class="utilities.MyUtilities"/>
 this bean has a method String [] getValues().

Then I have a java script piece like this

<script type="text/javascript">
function update()
{
 
 //Is it possible to call the myUtility.getValues() from here? if so how am
 //I to define the return String array?
}

Please someone throw some light here.

0
Comment
Question by:prain
  • 2
2 Comments
 
LVL 27

Expert Comment

by:rrz
ID: 16963766
If you use AJAX, then yes.  There are a million hits on google. Here are a few.
http://developers.sun.com/ajax/ 
http://java.sun.com/developer/technicalArticles/J2EE/AJAX/ 
http://getahead.ltd.uk/dwr/
0
 
LVL 27

Accepted Solution

by:
rrz earned 100 total points
ID: 16963781
But you would have to change the bean's scope to session.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
gZip compression filter 2 179
countXY challenge 28 171
import as existing maven project 3 33
batch vs regular insert in spring DAO 2 20
After-hours service is a fact of life for most MSPs. While not the most pleasant aspect of the job, there are ways to make after-hours servicing a more profitable and organized enterprise.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question