Hey there.
My form is empty, no data Code:
@ModelAttribute public AdminPanel getPanel() {
AdminPanel panel = new AdminPanel();
panel.setSimulators(this.simulatorDao.getAll());
return panel; }
this.simulatorDao.getAll() returns a list (size = 3)
And my JSP:Code:
lt;form:form modelAttribute=quot;adminPanelquot; id=quot;adminPanelquot; name=quot;adminPanelquot;gt; lt;div id=quot;simulatorsquot; class=quot;simulatorquot;gt; lt;!-- simulators --gt; lt;table width=quot;100%quot; border=quot;0quot; cellspacing=quot;0quot; cellpadding=quot;0quot;gt; lt;trgt;lt;td colspan=quot;3quot; class=quot;simulator_headerquot;gt;lt;h1gt;SIMULADORSlt;/h1gt;lt;/tdgt; lt;/trgt; lt;trgt; lt;thgt;IDlt;/thgt;lt;thgt;Nombrelt;/thgt; lt;/trgt; lt;core:forEach items=quot;${simulators}quot; var=quot;simquot;gt; lt;tr class=quot;H1quot;gt;lt;tdgt;lt;core ut value=quot;${sim.id}quot;gt;lt;/core utgt;lt;/tdgt;lt;tdgt;lt;core ut value=quot;${sim.name}quot;gt;lt;/core utgt;lt;/tdgt;lt;tdgt;lt;button name=quot;${sim.name} + 'Button'quot; onclick=quot;quot;gt;Editlt;/buttongt;lt;/tdgt; lt;/trgt; lt;/core:forEachgt; lt;/tablegt; lt;/divgt;
lt;/form:formgt;
My model AdminPanel has a member:Code:
private Listlt;Simulatorgt; simulators;
//get and set
Class simulatorsCode:
@Entity
@Table(name=quot;T1_PSF_SIMULATORS_SIMULATORSquot;)
public class Simulator {
@Id
@Column(name=quot;UUIDquot;)
@GeneratedValue(strategy=GenerationType.AUTO, generator=quot;commonGeneratorquot;)
@TableGenerator(name=quot;commonGeneratorquot;, allocationSize=1)
private int uuid;
@Column(name=quot;NAMEquot;)
private String name;
@Column(name=quot;IDENTIFIERquot;)
private int id;
//getters and setters
}
am i missing something?? ideas??
I'm really an idiot
Thanks vuzbuz, you save my life in showthread.php?t=77717
I had a error with my model name:
lt;core:forEach items=quot;${adminPanel.simulators}quot; var=quot;simquot;gt; |