diff --git a/office-alexander-logistics-app/src/main/java/org/imixs/workflow/office/dataview/DataViewController.java b/office-alexander-logistics-app/src/main/java/org/imixs/workflow/office/dataview/DataViewController.java index 2e7916b..4e05176 100644 --- a/office-alexander-logistics-app/src/main/java/org/imixs/workflow/office/dataview/DataViewController.java +++ b/office-alexander-logistics-app/src/main/java/org/imixs/workflow/office/dataview/DataViewController.java @@ -58,8 +58,8 @@ import jakarta.servlet.http.HttpServletRequest; /** * The DataViewController is used to display a data view *

- * The controller uses a cacheId provided together with the uniqueId of the - * dataViewDefinition in the URL. The bean reads optional cached query data form + * The controller uses the uniqueId from the URL to load the definition. + * The bean reads optional cached query data form * a session scoped cache EJB and reloads the last state. This is useful for * situations where the user navigates to a new page (e.g. open a workitem) and * late uses browser history back. @@ -128,7 +128,7 @@ public class DataViewController extends ViewController { * This method loads the custom form sections */ public void onLoad() { - String cacheid = null; + String uniqueid = null; // Important: start a new conversation beause of the usage of the // CustomFormController! @@ -140,8 +140,7 @@ public class DataViewController extends ViewController { FacesContext fc = FacesContext.getCurrentInstance(); Map paramMap = fc.getExternalContext().getRequestParameterMap(); // try to extract the uniqueid form the query string... - cacheid = paramMap.get("cacheid"); - String uniqueid = paramMap.get("id"); + uniqueid = paramMap.get("id"); if (uniqueid == null || uniqueid.isEmpty()) { // alternative 'workitem=...' uniqueid = paramMap.get("workitem"); @@ -149,9 +148,8 @@ public class DataViewController extends ViewController { dataDefinition = documentService.load(uniqueid); } - logger.finest("> cacheid=" + cacheid); - if (cacheid != null && !cacheid.isEmpty()) { - filter = dataViewCache.get(cacheid); + if (uniqueid != null && !uniqueid.isEmpty()) { + filter = dataViewCache.get(uniqueid); } else { filter = new ItemCollection(); } @@ -227,6 +225,7 @@ public class DataViewController extends ViewController { * @throws QueryException */ public void run() throws QueryException { + reset(); // build new query from template @@ -257,6 +256,8 @@ public class DataViewController extends ViewController { // Prefetch data to update total count and page count viewHandler.getData(this); + // cache filter + dataViewCache.put(dataDefinition.getUniqueID(), filter); } diff --git a/office-alexander-logistics-app/src/main/java/org/imixs/workflow/office/dataview/DataViewDefinitionController.java b/office-alexander-logistics-app/src/main/java/org/imixs/workflow/office/dataview/DataViewDefinitionController.java index b1030ba..75e93f9 100644 --- a/office-alexander-logistics-app/src/main/java/org/imixs/workflow/office/dataview/DataViewDefinitionController.java +++ b/office-alexander-logistics-app/src/main/java/org/imixs/workflow/office/dataview/DataViewDefinitionController.java @@ -131,9 +131,8 @@ public class DataViewDefinitionController extends AbstractDataController { * * @return */ - public String getViewURI() { - return "/pages/dataviews/data.xhtml?id=" + data.getUniqueID() + "&cacheid=" + System.currentTimeMillis() - + "&faces-redirect=true"; + public String getViewURI(ItemCollection dataDef) { + return "/pages/dataviews/data.xhtml?id=" + dataDef.getUniqueID() + "&faces-redirect=true"; } @Override diff --git a/office-alexander-logistics-app/src/main/webapp/layout/css/custom.css b/office-alexander-logistics-app/src/main/webapp/layout/css/custom.css index 007f3b9..e67949c 100644 --- a/office-alexander-logistics-app/src/main/webapp/layout/css/custom.css +++ b/office-alexander-logistics-app/src/main/webapp/layout/css/custom.css @@ -8,7 +8,7 @@ background-position: 4px 6px, center !important; padding-left: 22px !important; } -.tooltip-link { +.tooltip-link { position: relative; display: inline-block; } @@ -33,4 +33,15 @@ .tooltip-link:hover .tooltip-text { visibility: visible; opacity: 1; -} \ No newline at end of file +} + + +.dataview .align-right { + text-align: right; +} +.dataview .align-center { + text-align: center; +} +.dataview td { + padding: 5px 10px !important; +} diff --git a/office-alexander-logistics-app/src/main/webapp/pages/admin/dataViewDefinition.xhtml b/office-alexander-logistics-app/src/main/webapp/pages/admin/dataViewDefinition.xhtml index 6baaaea..0fb0328 100644 --- a/office-alexander-logistics-app/src/main/webapp/pages/admin/dataViewDefinition.xhtml +++ b/office-alexander-logistics-app/src/main/webapp/pages/admin/dataViewDefinition.xhtml @@ -44,7 +44,7 @@

Query Definition Test View @@ -223,7 +223,7 @@

Form Definition Test View @@ -254,7 +254,7 @@

Template Test View @@ -296,7 +296,6 @@ -
Source File : @@ -305,13 +304,8 @@ -
- - - - @@ -319,8 +313,8 @@