private void updateTable(List<S3ViewerEntity> result ){
for( S3ViewerEntity ent : result){//for-1
List<String[]> tmpArr = ent.getValue();
int len = tmpArr.size();
for(int i = 0, j = 1; i< len; i++, j++){//for-2
Button btnDel = new
Button("Delete");
Button btnResultView = new Button("View
Result");
String[] colArr = tmpArr.get(i);
flexTable.setText(j, 0, colArr[0]);
flexTable.setText(j, 1, colArr[1]);
flexTable.setText(j, 2, "processed");
flexTable.setWidget(j, 3, btnDel);
flexTable.setWidget(j, 4, btnResultView);
flexTable.addClickHandler(new ClickHandler(){
@Override
public void onClick(ClickEvent event) {
final HTMLTable htmlTable =
(HTMLTable)event.getSource();
final Cell cell =
htmlTable.getCellForEvent(event);
final String fileName =
htmlTable.getHTML(cell.getRowIndex(),
1);
oneFileName = fileName;
if( cell.getCellIndex() == 3
){//if else if-1
setMessage("Deleting...");
s3Service.deleteSpecificFile(bucketName, fileName, new
AsyncCallback<String>(){
@Override
public void
onFailure(Throwable caught) {
Window.alert(caught.toString());
}
@Override
public void
onSuccess(String result) {
if(
"OK".equals(result)){
go("-1");
}
}
});
}else if( cell.getCellIndex()
== 4){
setMessage("Checking
Result...");
s3Service.checkingResultMbean(bucketName, fileName, new
AsyncCallback<Boolean>(){
@Override
public void
onFailure(Throwable caught) {
Window.alert("Seems like It is still Mbean profiling...
\nPlese try again shortly..:-P");
Window.alert(caught.toString());
}
@Override
public void
onSuccess(Boolean result) {//onSuccess-1
// if(
result ){
s3Service.checkingResultMem(bucketName, fileName, new
AsyncCallback<Boolean>(){
@Override
public void onFailure(
Throwable caught) {
Window.alert("Seems like It is still Memory profiling...
\nPlese try again shortly..:-P");
Window.alert(caught.toString());
}
@Override
public void onSuccess(
Boolean result) {
boolResult = result;
//
if( result ){
cookie.setCookies("bucketName" , bucketName);
cookie.setCookies("key", fileName);
instance.removeWidget(instance.getServerWidget());
instance.loadServerResult();
//
}
}
});
// }
}//onSuccess-1
});
}//if else if-1
}
});
}//for-2
}//for-1
}//updateTable
I have a situation like this, before I am forwarding to another page,
I need to check 2 things which files are exits or not.
First I should check some file using s3Service.checkingResultMbean
(bucketName, fileName, new AsyncCallback<Boolean>() <-- this method.
and if and only if this method is success then I need to check another
file using s3Service.checkingResultMem(bucketName, fileName, new
AsyncCallback<Boolean>() <-- this method.
and If they are both success then I need to change the current page
into some other.
But, somehow, this is calling infinite and I can't figure it out why.
Can anyone know why? or how to avoid this situation?
Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---
