use of com.netsteadfast.greenstep.po.hbm.TbSysIcon in project bamboobsc by billchen198318.
the class IconUtils method getUrl.
public static String getUrl(String basePath, String iconId) throws ServiceException, Exception {
String url = "";
if (StringUtils.isBlank(iconId)) {
return url;
}
TbSysIcon sysIcon = new TbSysIcon();
sysIcon.setIconId(iconId);
sysIcon = sysIconService.findByEntityUK(sysIcon);
if (sysIcon != null && StringUtils.defaultString(sysIcon.getFileName()).trim().length() > 0) {
url = basePath + "/" + ICON_FOLDER + StringUtils.defaultString(sysIcon.getFileName());
}
return url;
}
use of com.netsteadfast.greenstep.po.hbm.TbSysIcon in project bamboobsc by billchen198318.
the class IconUtils method getIconsSelectData.
public static Map<String, String> getIconsSelectData() throws ServiceException, Exception {
Map<String, String> dataMap = new LinkedHashMap<String, String>();
List<TbSysIcon> iconList = sysIconService.findListByParams(null);
if (null == iconList || iconList.size() < 1) {
return dataMap;
}
for (TbSysIcon entity : iconList) {
String label = "<img src='./icons/" + entity.getFileName() + "' border='0'/> " + entity.getIconId();
dataMap.put(entity.getOid(), label);
}
return dataMap;
}
use of com.netsteadfast.greenstep.po.hbm.TbSysIcon in project bamboobsc by billchen198318.
the class ConfigJsAction method putImagePreload.
private void putImagePreload(StringBuilder sb) throws Exception {
List<TbSysIcon> searchList = sysIconService.findListByParams(null);
sb.append("var _coreIconsList = [");
for (int i = 0; searchList != null && i < searchList.size(); i++) {
TbSysIcon sysIcon = searchList.get(i);
sb.append("\"./icons/").append(sysIcon.getFileName()).append("\"");
if ((i + 1) < searchList.size()) {
sb.append(",");
}
}
sb.append("];");
sb.append("\n");
sb.append("var _coreIconsIdList = [");
for (int i = 0; searchList != null && i < searchList.size(); i++) {
TbSysIcon sysIcon = searchList.get(i);
sb.append("\"").append(sysIcon.getIconId()).append("\"");
if ((i + 1) < searchList.size()) {
sb.append(",");
}
}
sb.append("];");
sb.append("\n");
}
use of com.netsteadfast.greenstep.po.hbm.TbSysIcon in project bamboobsc by billchen198318.
the class ApplicationSystemManagementAction method loadSysData.
private void loadSysData() throws ServiceException, Exception {
this.transformFields2ValueObject(this.sys, new String[] { "oid" });
DefaultResult<SysVO> result = this.sysService.findObjectByOid(this.sys);
if (result.getValue() == null) {
throw new ServiceException(result.getSystemMessage().getValue());
}
this.sys = result.getValue();
TbSysIcon sysIcon = new TbSysIcon();
sysIcon.setIconId(sys.getIcon());
sysIcon = this.sysIconService.findByEntityUK(sysIcon);
if (sysIcon != null) {
this.editIconValue = super.defaultString(sysIcon.getOid());
}
}
use of com.netsteadfast.greenstep.po.hbm.TbSysIcon in project bamboobsc by billchen198318.
the class SystemProgramManagementAction method loadSysProgData.
/**
* 修改模式載入 TB_SYS_PROG 資料
*
* @throws ServiceException
* @throws Exception
*/
private void loadSysProgData() throws ServiceException, Exception {
this.transformFields2ValueObject(this.sysProg, new String[] { "oid" });
DefaultResult<SysProgVO> result = this.sysProgService.findObjectByOid(this.sysProg);
if (result.getValue() == null) {
throw new ServiceException(result.getSystemMessage().getValue());
}
this.sysProg = result.getValue();
TbSysIcon sysIcon = new TbSysIcon();
sysIcon.setIconId(sysProg.getIcon());
sysIcon = this.sysIconService.findByEntityUK(sysIcon);
if (sysIcon != null) {
this.editIconValue = sysIcon.getOid();
}
TbSys sys = new TbSys();
sys.setSysId(this.sysProg.getProgSystem());
sys = this.sysService.findByEntityUK(sys);
if (sys != null) {
this.editProgSystemValue = sys.getOid();
}
}
Aggregations