• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

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.
 
keep an eye out for scorpions and black widows. But the tiny ads are safe.
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic