i get the checkbox value from jsp page, and multiple selection, send to hibernate,
and when do the second cycle,
Person person = (Person)this.getHibernateTemplate().get(Person.class,id
);
person value is null
what's problem? the first cycle, there is a value.But the second cycle, the value is null.
public void deletePersons(String[] id) {
for(int i = 0;i < id.length;i++){
Person person = (Person)this.getHibernateTemplate().get(Person.class,id[i]);
String ttid = person.getAttid();
Photo ph = new Photo();
ph.setId(ttid);
this.getHibernateTemplate().delete(ph);
this.getHibernateTemplate().delete(person);
}
}
[i]Linda Dinghttp://www.telesail.com