Solved

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

Posted on 2006-06-22
2
262 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
We need a new way to communicate time sensitive or critical info.   The best part of my role at xMatters is visiting our clients all over the world to learn about how they operate their businesses, share insights that xMatters has gleaned across…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

867 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now