|
|
|
@ -59,24 +59,29 @@ public class TemplateResourceSearchWorkerManager implements SearchManager {
|
|
|
|
|
try { |
|
|
|
|
List<TemplateResource> list = get(); |
|
|
|
|
hasSearchResult = !list.isEmpty(); |
|
|
|
|
if (networkError && !hasSearchResult) { |
|
|
|
|
alphaFineFrame.showResult(AlphaFineConstants.NETWORK_ERROR); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (alphaFineFrame.getSelectedType() == cellType) { |
|
|
|
|
if (!hasSearchResult) { |
|
|
|
|
alphaFineFrame.showResult(CellType.NO_RESULT.getFlagStr4None()); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
TemplateShopPane.getInstance().refreshPagePane(list); |
|
|
|
|
AlphaFineHelper.getAlphaFineDialog().showResult(cellType.getFlagStr4None()); |
|
|
|
|
} |
|
|
|
|
showResult(list); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void showResult(List<TemplateResource> list) { |
|
|
|
|
if (networkError && !hasSearchResult) { |
|
|
|
|
alphaFineFrame.showResult(AlphaFineConstants.NETWORK_ERROR); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (alphaFineFrame.getSelectedType() == cellType) { |
|
|
|
|
if (!hasSearchResult) { |
|
|
|
|
alphaFineFrame.showResult(CellType.NO_RESULT.getFlagStr4None()); |
|
|
|
|
} else { |
|
|
|
|
TemplateShopPane.getInstance().refreshPagePane(list); |
|
|
|
|
AlphaFineHelper.getAlphaFineDialog().showResult(cellType.getFlagStr4None()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}; |
|
|
|
|
this.searchWorker.execute(); |
|
|
|
|
} |
|
|
|
|