if (Boolean.TRUE.equals(GuiUtil.getSessionValue("_noNetwork"))){
handlerCtx.setOutputValue("result", result);
return;
}
try {
Image img = getUpdateCenterImage();
if (img == null){
handlerCtx.setOutputValue("result", result);
return;
}
String state= (String)handlerCtx.getInputValue("state");
if (state.equals("update")){
handlerCtx.setOutputValue("result", getUpdateDisplayList(img, false));
return;
}
List<Fmri> displayList = null;
if (state.equals("installed"))
displayList = getInstalledList(img);
else
if (state.equals("addOn"))
displayList = getAddOnList(img);
if (displayList != null){
for (Fmri fmri : displayList){
Map oneRow = new HashMap();
try{
Manifest manifest = img.getManifest(fmri);
oneRow.put("selected", false);
oneRow.put("fmri", fmri);
oneRow.put("fmriStr", fmri.toString());
putInfo(oneRow, "pkgName", fmri.getName());
putInfo(oneRow, "version", getPkgVersion(fmri.getVersion()));