From 1ef3a7667565271ab7dea85baddb464d25eaf549 Mon Sep 17 00:00:00 2001 From: elgekko Date: Thu, 6 Jul 2023 21:39:44 +0200 Subject: [PATCH] Added unversioned resources --- .idea/.gitignore | 3 ++ .../converter/AssociateIdToNameConverter.java | 28 ++++++++++++++++++ .../main/resources/web/static/images/logo.png | Bin 0 -> 1893 bytes 3 files changed, 31 insertions(+) create mode 100644 lis-ui/src/main/java/hu/user/lis/ui/converter/AssociateIdToNameConverter.java create mode 100644 lis-ui/src/main/resources/web/static/images/logo.png diff --git a/.idea/.gitignore b/.idea/.gitignore index 26d3352..982ef17 100644 --- a/.idea/.gitignore +++ b/.idea/.gitignore @@ -1,3 +1,6 @@ # Default ignored files /shelf/ /workspace.xml +/jpa-buddy.xml +/jpa-buddy-datasource.xml +/mongoSettings.xml diff --git a/lis-ui/src/main/java/hu/user/lis/ui/converter/AssociateIdToNameConverter.java b/lis-ui/src/main/java/hu/user/lis/ui/converter/AssociateIdToNameConverter.java new file mode 100644 index 0000000..4d1e8e3 --- /dev/null +++ b/lis-ui/src/main/java/hu/user/lis/ui/converter/AssociateIdToNameConverter.java @@ -0,0 +1,28 @@ +package hu.user.lis.ui.converter; + +import hu.user.lis.db.Associate; +import hu.user.lis.services.data.AssociateService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.zkoss.bind.BindContext; +import org.zkoss.bind.Converter; +import org.zkoss.zul.impl.XulElement; + +@Component +public class AssociateIdToNameConverter implements Converter { + @Autowired + AssociateService associateService; + + @Override + public String coerceToUi(String associateId, XulElement element, BindContext bindContext) { + Associate associate = StringUtils.isBlank(associateId) ? null : associateService.getById(associateId); + return associate == null ? null : associate.getName(); + } + + @Override + public String coerceToBean(String s, XulElement element, BindContext bindContext) { + + return null; + } +} \ No newline at end of file diff --git a/lis-ui/src/main/resources/web/static/images/logo.png b/lis-ui/src/main/resources/web/static/images/logo.png new file mode 100644 index 0000000000000000000000000000000000000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