Hi Guys,
I need your help, I'm going crazy.
I'm just trying to iterate through a ViewObject like I've done thousand times but despite getEstimatedRowCount return 1 and the Row object inside the WHILE is not null, getattribute return always null, doesn't care if I call getAttribute(String) or getAttribut(int)
This is the last code I'm testing:
PeopleFinderAppModuleImpl appMod = (PeopleFinderAppModuleImpl)this.getApplicationModule();
PfUserGetInfoImpl pf_Info = (PfUserGetInfoImpl)appMod.getPfUserGetInfo1();
pf_Info.setp_userid(userid);
pf_Info.executeQuery();
System.out.println("############################################## View getEstimatedRowCount: "+pf_Info.getEstimatedRowCount());
PfUserGetInfoRowImpl r = null;
RowSetIterator rsIterator = pf_Info.createRowSetIterator(null);
while (rsIterator.hasNext()) {
r = (PfUserGetInfoRowImpl)rsIterator.next();
System.out.println("############################################## AttributeCount: "+r.getAttributeCount());
String[] attrs = r.getAttributeNames();
for (int i=0 ; i < attrs.length;i++) {
System.out.println(i + " " + attrs[i]+"="+r.getAttributeValues()[i]);
}
}
rsIterator.closeRowSetIterator();
Output is:
############################################## userid: EPETRANG
############################################## View getEstimatedRowCount: 1
############################################## AttributeCount: 13
0 Userid=null
1 Name=null
2 Givenname=null
3 Surname=null
4 Title=null
5 Dn=null
6 Mail=null
7 Company=null
8 Department=null
9 Telephonenumber=null
10 Mobile=null
11 Ipphone=null
12 Manager=null
My Env specs:
Build JDEVADF_11.1.1.7.0_GENERIC_130226.1400.6493
JVM 1.6.0_45 64bit
Of course the query return 1 row in SQLDeveloper and using ApplicationModule Tester as well.
Can you see something wrong in this code? I tried to drop and recreate the ViewObject without any luck.