• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts 2 iteration tags usage

 
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi I need to iterate the bean data in jsp for data population wrt to UI design like lables and text boxes.for the I am using below code.Could you please provide me inputs to use the bean data and iterate for the same.

<S:Iterator name="adBean "/>

Action class :

AdminMgmt adBean = {I am getting the data from DB properly}


Bean class data :


Class AdminMgmt{
int AdminMgmtId;
String AdminMgmtName;
boolean AdminMgmtPrice;

List<DemoAdmin> demoAdmin = new ArrayList<DemoAdmin>();

// Getters and Setters

}

Class DemoAdmin{

int demoAdminId;
String demoAdminName;
boolean demoAdminPrice;

List<Demo> demo = new ArrayList<Demo>();

// Getters and Setters

}

class Demo{

int demoId;
String demoName;
boolean fixedDemoType;
boolean fixedDemoPrice;

// Getters and Setters.

}


Thanks,
Naga Prathap,
 
prathap venkata naga yelugula
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
we are using like below

<s:iterator value="adBean.demoAdmin" >

<tr class="service">
<s:property value="adBean.adminMgmtId" />
<td class="adminMgmt-tab"><s:property value="adminMgmtName" /></td>
<td></td>
<td class="vcenter"><input type="checkbox" id="read" value="1" /></td>
</s:iterator>


We need to get the complete data in the screen for table data population for names and properties like check boxes for boolean values.

Thanks,
naga Prathap.
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It sounds like you are trying to make an editable table. Look at this example and see if it helps.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic