Hi,

    I am facing one problem while using Enumeration .
    I have written one findByAllStatus (JOnas 2.1.2 with jdk1.2.2)
    (in my enity bean whose where caluse is null
    that means it shud return me all the data from the table.
    This Table is having  composite primary key )
    method which returns Enumeration  .

   I am calling this method from jsp page.
   Before going ahead with my problem
   I shud tell you that  my data in table is

    Code           level     Value
    CSC           1             New Proposal
    CSC           2             Good
    CSC           3             Very Good
    FSC          1             Fund
    FSC          2          Fund Of Fund


In jsp page i am looping through the Enumeration
and casting each object into my entity beans remote interface and calling  its get 
method.

On screen i am getting only first record of the each code. and it display the number of
times i am having code "CSC"
 i.e
    CSC           1             New Proposal
    CSC           1             New Proposal
    CSC            1            New Proposal
    FSC          1             Fund
    FSC          1             Fund

can anybody tell me how Enumeration stores data internally
when the elements are objects

Here is my code:::::

ssta.eb.StatusMaster statusRem = null;
  obj = objStatusMaster.getStatusEnumeration();
  if((obj != null) && (obj instanceof Enumeration)){
   Enumeration gotEnu = (Enumeration) obj;
   long cntr =1 ;
   String alterBgColor;

   while(gotEnu.hasMoreElements()){
    statusRem = (ssta.eb.StatusMaster) gotEnu.nextElement();
 if((cntr%2)==0)
 {alterBgColor=alterColor2;}
 else{alterBgColor=alterColor1;}
 %>
 <td bgcolor='<%= alterBgColor %>'> <%= cntr++ %> <%= gotEnu %></td>
 <td bgcolor='<%= alterBgColor %>'> <%= statusRem.getStatusCode() %> </td>
 <td bgcolor='<%= alterBgColor %>'> <%= statusRem.getStatusType() %> </td>
 <td bgcolor='<%= alterBgColor %>'> <%= statusRem.getStatusName() %> </td>
 </tr>
 <% statusRem = null ; }  %>







----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".

Reply via email to