Well you need to cast the returned from the list to an appropriate type.
Therefore in your for loop do the cast like so
out.println("Selected " + list.size() + " records.<br><br>");
for (int i=0; i < list.size(); i++) {
MyType obj = (MyType)list.get(i);
out.println( obj.mymethod + "<br>");
}
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Mittwoch, 4. April 2007 17:48
To: [email protected]
Subject: Tutorial questions
Hi all,
I am trying to develop a web using jsp and ibatis.
I am new for this environment so this would be a tutorial question ;).
I use jsp and AbatorForEclipse1.0 for the code generation.
it creates crud classes.
but I cannot find the class for queries all records from the table.
May I use SelectByExample()?
when I try this code:
myTableExample objExample = new myTableExample();
list = myTableDAO.selectByExample(objExample);
out.println("Selected " + list.size() + " records.<br><br>");
for (int i=0; i < list.size(); i++) {
out.println(list.get(i) + "<br>");
}
it returns:
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
How to return the field's value from the table I select?
Thanks in advance.
OHSuria
This e-mail and any attachment is for authorised use by the intended
recipient(s) only. It may contain proprietary material, confidential
information and/or be subject to legal privilege. It should not be copied,
disclosed to, retained or used by, any other party. If you are not an intended
recipient then please promptly delete this e-mail and any attachment and all
copies and inform the sender. Thank you.