| Author |
java.util.ArrayList
|
Krupa Eng
Ranch Hand
Joined: Sep 05, 2003
Posts: 60
|
|
Hi, I have a java class called myObject with three properties like prop1,prop2,prop3. I have another object called objectslist with an arraylist of myobjects as its properties and objlistprop. myObject{ prop1; prop2; prop3; } Objectslist{ arraylist myobjects prop2 } in my jsp I want to update prop1 of my object where myobject is [objectlist.get(i)] ith element of the list. Thanks, Krupa
|
Krupa
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24054
|
|
Please don't post the same thread to multiple forums -- it's just a waste of people's time. Now: do you have a question?
|
[Jess in Action][AskingGoodQuestions]
|
 |
Krupa Eng
Ranch Hand
Joined: Sep 05, 2003
Posts: 60
|
|
Sorry about posting in 2 places. I didn't know which one is the right place. My question is how can I update the object. for example. iterator it = mylist.getIterator while (it.next){ (MyObject)currobj = (MyObject) it.next(); if(currobj.getProp2.equals("AB")){ currobj.setProp3("XYZ"); } } The setProp3 is giving me an error. How can I set the prop3 value. Thanks
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24054
|
|
Originally posted by Krupa Eng: The setProp3 is giving me an error.
What's the error message? Is it a runtime error, or a compiler error? If it's the latter, does it point to a particular line of code? I don't think we can help unless we understand the problem you're having.
|
 |
 |
|
|
subject: java.util.ArrayList
|
|
|