Hi,
I am busy customizing the checkin component. When a user edits and checks in the imported spreadsheet, a type needs to be updated with the updated values from the spreadsheet. I have tried using the code below to get the data from the repository:
try {
IDfSysObject sysObj = (IDfSysObject)getDfSession().getObject(new DfId("0900303980006ccd"));
ByteArrayInputStream bais = sysObj.getContent();
if (bais.available() > 0)
{
System.out.println("// Data successfully fetched from the server...");
}
//added code
byte[] b = new byte[1];
bais.read(b,0,1);
int number;
int linelength = 0;
int item=0;
do{
number = bais.read();
System.out.print(Character.toUpperCase((char)number));
linelength++;
if(linelength==25){
System.out.println();
}
item++;
}while(item < 100000);
for (int countery = 0; countery < b.length; countery++) {
System.out.println(b[countery]);
}
} catch (DfException ex) {
Logger.getLogger(CommitmentRegisterCheckin.class.getName()).log(Level.SEVERE, null, ex);
}
I got the code from the internet. I tried testing the code by printing some characters to the log (i.e the added code). There are rectangles and symbols printed in the logs and the characters are not in the spreadsheet. Is the code correct? How can I capture the updated information and update the type with that updated information?
Thanks. Kenrick.