panel.add(rightArrow);
final ArrayList<Photo> photos = new ArrayList<Photo>(goods
.length());
for (int i = 0; i < goods.length(); i++) {
GoodJavascriptObject good = goods.get(i);
String imageUrl = getImageUrl(good.getImageBlobKey(), 600, 600);
Photo photo = new Photo(imageUrl, good.getName(), good
.getDescription(), good.getKeyStr());
photos.add(photo);
}
parent.getDtoService().isAdmin(new AsyncCallback<UserStatus>() {
@Override
public void onSuccess(UserStatus result) {
if (UserStatus.ADMIN == result) {
for (int i = 0; i < photos.size(); i++) {
Photo photo = photos.get(i);
GoodJavascriptObject good = goods.get(i);
photo.setEditClickHandler(getEditClickHandler(
good, editGoodForm));
photo.setDeleteClickHandler(getDeleteClickHandler(
good, goodDeletion));