Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Applets and beans

Vladimir Ergovic
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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%>);" > 

Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!