File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Applets and the fly likes Applets and beans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Applets and beans" Watch "Applets and beans" New topic

Applets and beans

Vladimir Ergovic
Ranch Hand

Joined: Apr 22, 2001
Posts: 63
Well, situation is like this:
I'm using JSP combined with beans (I fill the beans with user informations and now I have to read all the beans and to put it in applet for processing. So my question is: How can I read and write to the beans from the applets?
Here is some JSP code and how could I do it via applets?
I want to read from get methods and to write to some other bean via set.
String strServiceGroup = null;
Iterator itr = null;
int tmpServiceGroupID= -1,brojac=0;
int popust = 0;

if (myServices != null)
itr = myServices.iterator();

while ((itr != null) && (itr.hasNext())) {
Service tmpService = (Service);

if (tmpService.getType() == Service.SERVICE_TYPE_UNIT)
strServiceGroup = "UNIT SERVICES";
else if (tmpService.getType() == Service.SERVICE_TYPE_STOREY)
strServiceGroup = "STOREY SERVICES";
else if (tmpService.getType() == Service.SERVICE_TYPE_FACILITY)
strServiceGroup= "FACILITY SERVICES";


if (tmpServiceGroupID != tmpService.getType()) {
tmpServiceGroupID = tmpService.getType();
<tr bgcolor="#FBF0B5" align="left">
<td colspan="8">
<font face="Verdana" size="2"><b>  <%= strServiceGroup %></b></font>
<td colspan="8"></td>
<td width="20">
if (tmpService.isBasicService()) {
<input type="radio" value="<%= tmpService.getServiceID() %>" name="serviceID" id = "bnt<%=brojac%>" onClick = "toggle ( this,<%=brojac%>);" unchecked> 
<%} else { %>
<input type="checkbox" value="<%= tmpService.getServiceID() %>" name="serviceID" id = "bnt<%=brojac%>" onClick = "toggle (this,<%=brojac%>);" > 


Vladimir Ergovic
jQuery in Action, 3rd edition
subject: Applets and beans
It's not a secret anymore!