Reply
Mon 2 Jul, 2012 10:21 pm
In java 1.7 how to write getter and setter method for "property='<%= "duration[" + ind + "]" %>'"
If i am using the below methods
public String setDuration(int index, String duration) {
System.out.println("Index==>"+index);
System.out.println("Duration==>"+duration);
// make sure list is not null
if (this.durationList == null) {
this.durationList = new ArrayList();
}
// indexes do not come in order, populate empty spots
while (index >= this.durationList.size()) {
this.durationList.add(new String());
}
// return the requested item
return (String) durationList.set(index, duration);
}
It is not working. Please any one can help me to resolve this problem.