Win a copy of The Java Performance Companion this week in the Performance 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.
Thanks,
Vlad
<%
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)itr.next();

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";

brojac++;

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>
</tr>
<%
}
%>
<tr>
<td colspan="8"></td>
</tr>
<tr>
<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%>);" > 
<%
}
%>

------------------
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic