[jira] [Resolved] (OFBIZ-8411) popup image takes full width of browser window for ecommerce multiflex theme
[ https://issues.apache.org/jira/browse/OFBIZ-8411?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Arun Patidar resolved OFBIZ-8411. - Resolution: Fixed > popup image takes full width of browser window for ecommerce multiflex theme > > > Key: OFBIZ-8411 > URL: https://issues.apache.org/jira/browse/OFBIZ-8411 > Project: OFBiz > Issue Type: Bug > Components: ecommerce >Affects Versions: Trunk, 16.11.04 >Reporter: Wai >Assignee: Arun Patidar >Priority: Major > Fix For: 17.12.01, 16.11.05 > > Attachments: OFBIZ-8411.patch > > > go to https://localhost:8443/catalog/control/FindProductStore > select multiflex theme > go to ecommerce > hover mouse over an image. > notice that the width of popup image take width of browser window -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Comment Edited] (OFBIZ-8411) popup image takes full width of browser window for ecommerce multiflex theme
[ https://issues.apache.org/jira/browse/OFBIZ-8411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16349837#comment-16349837 ] Arun Patidar edited comment on OFBIZ-8411 at 2/2/18 6:51 AM: - Thanks [~jacques.le.roux] for reporting. Committed missing changes in release branches 16.11 at rev: 1822926 17.12 at rev: 1822925 was (Author: arunpati): Thanks [~jacques.le.roux] for reporting. I will check this and push remaining changes. > popup image takes full width of browser window for ecommerce multiflex theme > > > Key: OFBIZ-8411 > URL: https://issues.apache.org/jira/browse/OFBIZ-8411 > Project: OFBiz > Issue Type: Bug > Components: ecommerce >Affects Versions: Trunk, 16.11.04 >Reporter: Wai >Assignee: Arun Patidar >Priority: Major > Fix For: 17.12.01, 16.11.05 > > Attachments: OFBIZ-8411.patch > > > go to https://localhost:8443/catalog/control/FindProductStore > select multiflex theme > go to ecommerce > hover mouse over an image. > notice that the width of popup image take width of browser window -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OFBIZ-8411) popup image takes full width of browser window for ecommerce multiflex theme
[ https://issues.apache.org/jira/browse/OFBIZ-8411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16349837#comment-16349837 ] Arun Patidar commented on OFBIZ-8411: - Thanks [~jacques.le.roux] for reporting. I will check this and push remaining changes. > popup image takes full width of browser window for ecommerce multiflex theme > > > Key: OFBIZ-8411 > URL: https://issues.apache.org/jira/browse/OFBIZ-8411 > Project: OFBiz > Issue Type: Bug > Components: ecommerce >Affects Versions: Trunk, 16.11.04 >Reporter: Wai >Assignee: Arun Patidar >Priority: Major > Fix For: 17.12.01, 16.11.05 > > Attachments: OFBIZ-8411.patch > > > go to https://localhost:8443/catalog/control/FindProductStore > select multiflex theme > go to ecommerce > hover mouse over an image. > notice that the width of popup image take width of browser window -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Issue Comment Deleted] (OFBIZ-9350) Deprecate Mini Lang
[ https://issues.apache.org/jira/browse/OFBIZ-9350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nicolas Malin updated OFBIZ-9350: - Comment: was deleted (was: Hi Dennis, Integration tests failed with your patch {quote} ...--> marketing-tests.testCreateAndUpdateContactList...The following required parameter is missing: [IN] [genericBasePermissionCheck.primaryPermission]]] {quote} Do you have the same result ?) > Deprecate Mini Lang > --- > > Key: OFBIZ-9350 > URL: https://issues.apache.org/jira/browse/OFBIZ-9350 > Project: OFBiz > Issue Type: Improvement > Components: ALL APPLICATIONS, ALL COMPONENTS >Affects Versions: Trunk >Reporter: Michael Brohl >Assignee: Michael Brohl >Priority: Minor > Labels: documentation > > According to the proposal thread in [1] we decided to deprecate mini lang. > This issue tracks the next steps proposed in the aformentioned thread, namely: > 1. create a Wiki page for the documentation and description of the migration > process and how mini lang will be replaced. > 2. prominently state in the Wiki that minilang will be deprecated, e.g. in [2] > 3. put deprecation tags in the corresponding code > 4. kindly ask contributors with open patches written in mini lang to replace > them by Java code [3] > 5. start an initiative to replace existing mini lang code with Java code > where applicable. This needs some more planning and discussion which parts > we'll like to replace with Java code and which parts will better be replaced > by some kind of DSL. A good starting point can be [4][5][6]. > [1] > https://lists.apache.org/thread.html/253b41060a295b8ab68bc78763cc129fc74b712cf776f8716022097f@%3Cdev.ofbiz.apache.org%3E > [2] > https://cwiki.apache.org/confluence/display/OFBADMIN/Mini+Language+-+minilang+-+simple-method+-+Reference > [3] does anyone know a way to batch comment Jira issues like it is possible > in Redmine? > [4] > https://cwiki.apache.org/confluence/display/OFBIZ/Groovy+DSL+for+OFBiz+business+logic > [5] > https://cwiki.apache.org/confluence/display/OFBIZ/OFBiz+Tutorial+-+A+Beginners+Development+Guide > [6] https://cwiki.apache.org/confluence/display/OFBADMIN/Coding+Conventions -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OFBIZ-9993) Convert CommonPermissionServices.xml mini lang to groovy
[ https://issues.apache.org/jira/browse/OFBIZ-9993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16349460#comment-16349460 ] Nicolas Malin commented on OFBIZ-9993: -- Hi Dennis, Integration tests failed with your patch {quote}...--> marketing-tests.testCreateAndUpdateContactList...The following required parameter is missing: [IN] [genericBasePermissionCheck.primaryPermission]]] {quote} Do you have the same result ? > Convert CommonPermissionServices.xml mini lang to groovy > > > Key: OFBIZ-9993 > URL: https://issues.apache.org/jira/browse/OFBIZ-9993 > Project: OFBiz > Issue Type: Sub-task > Components: framework >Affects Versions: Trunk >Reporter: Dennis Balkir >Assignee: Nicolas Malin >Priority: Minor > Attachments: > OFBIZ-9993_org.apache.ofbiz.common.permission.CommonPermissionServices_convert.patch, > > OFBIZ-9993_org.apache.ofbiz.common.permission.CommonPermissionServices_convert.patch > > > Migration of the CommonPermissionServices.xml to Groovy -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OFBIZ-9350) Deprecate Mini Lang
[ https://issues.apache.org/jira/browse/OFBIZ-9350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16349452#comment-16349452 ] Nicolas Malin commented on OFBIZ-9350: -- Hi Dennis, Integration tests failed with your patch {quote} ...--> marketing-tests.testCreateAndUpdateContactList...The following required parameter is missing: [IN] [genericBasePermissionCheck.primaryPermission]]] {quote} Do you have the same result ? > Deprecate Mini Lang > --- > > Key: OFBIZ-9350 > URL: https://issues.apache.org/jira/browse/OFBIZ-9350 > Project: OFBiz > Issue Type: Improvement > Components: ALL APPLICATIONS, ALL COMPONENTS >Affects Versions: Trunk >Reporter: Michael Brohl >Assignee: Michael Brohl >Priority: Minor > Labels: documentation > > According to the proposal thread in [1] we decided to deprecate mini lang. > This issue tracks the next steps proposed in the aformentioned thread, namely: > 1. create a Wiki page for the documentation and description of the migration > process and how mini lang will be replaced. > 2. prominently state in the Wiki that minilang will be deprecated, e.g. in [2] > 3. put deprecation tags in the corresponding code > 4. kindly ask contributors with open patches written in mini lang to replace > them by Java code [3] > 5. start an initiative to replace existing mini lang code with Java code > where applicable. This needs some more planning and discussion which parts > we'll like to replace with Java code and which parts will better be replaced > by some kind of DSL. A good starting point can be [4][5][6]. > [1] > https://lists.apache.org/thread.html/253b41060a295b8ab68bc78763cc129fc74b712cf776f8716022097f@%3Cdev.ofbiz.apache.org%3E > [2] > https://cwiki.apache.org/confluence/display/OFBADMIN/Mini+Language+-+minilang+-+simple-method+-+Reference > [3] does anyone know a way to batch comment Jira issues like it is possible > in Redmine? > [4] > https://cwiki.apache.org/confluence/display/OFBIZ/Groovy+DSL+for+OFBiz+business+logic > [5] > https://cwiki.apache.org/confluence/display/OFBIZ/OFBiz+Tutorial+-+A+Beginners+Development+Guide > [6] https://cwiki.apache.org/confluence/display/OFBADMIN/Coding+Conventions -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OFBIZ-10188) Add new FileUtil methods for zip management
[ https://issues.apache.org/jira/browse/OFBIZ-10188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16349310#comment-16349310 ] Jacques Le Roux commented on OFBIZ-10188: - Thanks Gil, This seems almost ready to be commited :) Maybe UtilProperties could be replaced by EntityUtilProperties ? Why did you pick zos.setLevel(9) instead of default (DEFAULT_COMPRESSION == -1) Note that I have nothing against, just a question. Most of the time default are better, that's why I ask. You use byte bufferData[] = new byte[2048]; and byte[] buffer = new byte[1024]; Maybe we could follow the same way than at https://bugs.openjdk.java.net/browse/JDK-4953311 and use a normalised buffer of 8k? > Add new FileUtil methods for zip management > --- > > Key: OFBIZ-10188 > URL: https://issues.apache.org/jira/browse/OFBIZ-10188 > Project: OFBiz > Issue Type: New Feature >Reporter: Gil Portenseigne >Assignee: Gil Portenseigne >Priority: Minor > Fix For: Upcoming Branch > > Attachments: OFBIZ-10188.patch, OFBIZ_10188.patch > > > Add new FileUtil methods for zip management. > Add zipFileStream method that will zip FileStream to a zipped one. > Add unzipFileToFolder method to unzip a given archive to a given Folder -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Reopened] (OFBIZ-8411) popup image takes full width of browser window for ecommerce multiflex theme
[ https://issues.apache.org/jira/browse/OFBIZ-8411?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux reopened OFBIZ-8411: No real changes in release branches, reopening [http://svn.apache.org/viewvc?view=revision&revision=1822387] http://svn.apache.org/viewvc?view=revision&revision=1822388 > popup image takes full width of browser window for ecommerce multiflex theme > > > Key: OFBIZ-8411 > URL: https://issues.apache.org/jira/browse/OFBIZ-8411 > Project: OFBiz > Issue Type: Bug > Components: ecommerce >Affects Versions: Trunk, 16.11.04 >Reporter: Wai >Assignee: Arun Patidar >Priority: Major > Fix For: 17.12.01, 16.11.05 > > Attachments: OFBIZ-8411.patch > > > go to https://localhost:8443/catalog/control/FindProductStore > select multiflex theme > go to ecommerce > hover mouse over an image. > notice that the width of popup image take width of browser window -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-8411) popup image takes full width of browser window for ecommerce multiflex theme
[ https://issues.apache.org/jira/browse/OFBIZ-8411?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux updated OFBIZ-8411: --- Fix Version/s: 17.12.01 > popup image takes full width of browser window for ecommerce multiflex theme > > > Key: OFBIZ-8411 > URL: https://issues.apache.org/jira/browse/OFBIZ-8411 > Project: OFBiz > Issue Type: Bug > Components: ecommerce >Affects Versions: Trunk, 16.11.04 >Reporter: Wai >Assignee: Arun Patidar >Priority: Major > Fix For: 17.12.01, 16.11.05 > > Attachments: OFBIZ-8411.patch > > > go to https://localhost:8443/catalog/control/FindProductStore > select multiflex theme > go to ecommerce > hover mouse over an image. > notice that the width of popup image take width of browser window -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OFBIZ-10196) Set security object on groovy context
[ https://issues.apache.org/jira/browse/OFBIZ-10196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16349294#comment-16349294 ] Jacques Le Roux commented on OFBIZ-10196: - Good idea, thanks Nicolas > Set security object on groovy context > - > > Key: OFBIZ-10196 > URL: https://issues.apache.org/jira/browse/OFBIZ-10196 > Project: OFBiz > Issue Type: Improvement > Components: framework >Affects Versions: Trunk >Reporter: Nicolas Malin >Assignee: Nicolas Malin >Priority: Minor > > In a groovy service to call the security object you need to do : > {code}Security security = dispatcher.dispatchContext.security{code} > For simplification, I set the security object in groovy context like > dispatcher and delegator > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Closed] (OFBIZ-10196) Set security object on groovy context
[ https://issues.apache.org/jira/browse/OFBIZ-10196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nicolas Malin closed OFBIZ-10196. - Resolution: Implemented done on trunk at revision 1822908 > Set security object on groovy context > - > > Key: OFBIZ-10196 > URL: https://issues.apache.org/jira/browse/OFBIZ-10196 > Project: OFBiz > Issue Type: Improvement > Components: framework >Affects Versions: Trunk >Reporter: Nicolas Malin >Assignee: Nicolas Malin >Priority: Minor > > In a groovy service to call the security object you need to do : > {code}Security security = dispatcher.dispatchContext.security{code} > For simplification, I set the security object in groovy context like > dispatcher and delegator > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Comment Edited] (OFBIZ-9498) Improve DevOps using environment variable configuration
[ https://issues.apache.org/jira/browse/OFBIZ-9498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16348864#comment-16348864 ] Jacques Le Roux edited comment on OFBIZ-9498 at 2/1/18 9:07 PM: Hi Gil, Thanks for the update, we all have priorities ;) was (Author: jacques.le.roux): Hi Gil, Thanks for the update, we have all priorities ;) > Improve DevOps using environment variable configuration > --- > > Key: OFBIZ-9498 > URL: https://issues.apache.org/jira/browse/OFBIZ-9498 > Project: OFBiz > Issue Type: Improvement > Components: framework >Affects Versions: Trunk >Reporter: Gil Portenseigne >Assignee: Gil Portenseigne >Priority: Minor > Attachments: OFBIZ-9498.patch > > > Discussed in thread : https://s.apache.org/Mh3q > This Jira will present the improvment proposal giving a way to configure > OFBiz using environment variable. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-10196) Set security object on groovy context
[ https://issues.apache.org/jira/browse/OFBIZ-10196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nicolas Malin updated OFBIZ-10196: -- Description: In a groovy service to call the security object you need to do : {code}Security security = dispatcher.dispatchContext.security{code} For simplification, I set the security object in groovy context like dispatcher and delegator was: In a groovy service to call the security object you need to do : {code}Security security = dispatcher.dispatchContext.security\{code} For simplification, I set the security object in groovy context like dispatcher and delegator > Set security object on groovy context > - > > Key: OFBIZ-10196 > URL: https://issues.apache.org/jira/browse/OFBIZ-10196 > Project: OFBiz > Issue Type: Improvement > Components: framework >Affects Versions: Trunk >Reporter: Nicolas Malin >Assignee: Nicolas Malin >Priority: Minor > > In a groovy service to call the security object you need to do : > {code}Security security = dispatcher.dispatchContext.security{code} > For simplification, I set the security object in groovy context like > dispatcher and delegator > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-10196) Set security object on groovy context
[ https://issues.apache.org/jira/browse/OFBIZ-10196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nicolas Malin updated OFBIZ-10196: -- Issue Type: Improvement (was: New Feature) > Set security object on groovy context > - > > Key: OFBIZ-10196 > URL: https://issues.apache.org/jira/browse/OFBIZ-10196 > Project: OFBiz > Issue Type: Improvement > Components: framework >Affects Versions: Trunk >Reporter: Nicolas Malin >Assignee: Nicolas Malin >Priority: Minor > > In a groovy service to call the security object you need to do : > {code}Security security = dispatcher.dispatchContext.security\{code} > For simplification, I set the security object in groovy context like > dispatcher and delegator > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (OFBIZ-10196) Set security object on groovy context
Nicolas Malin created OFBIZ-10196: - Summary: Set security object on groovy context Key: OFBIZ-10196 URL: https://issues.apache.org/jira/browse/OFBIZ-10196 Project: OFBiz Issue Type: New Feature Components: framework Affects Versions: Trunk Reporter: Nicolas Malin Assignee: Nicolas Malin In a groovy service to call the security object you need to do : {code}Security security = dispatcher.dispatchContext.security\{code} For simplification, I set the security object in groovy context like dispatcher and delegator -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Comment Edited] (OFBIZ-9498) Improve DevOps using environment variable configuration
[ https://issues.apache.org/jira/browse/OFBIZ-9498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16348773#comment-16348773 ] Gil Portenseigne edited comment on OFBIZ-9498 at 2/1/18 4:41 PM: - Hi Jacques, we are still using it in our project but we haven't progress on the matter... I planned to analyse template system with gradle as discussed with Taher and Michael, but that's low my prio list :). was (Author: gil portenseigne): Hi Jacques, we are still using it in our project but we haven't progress on the matter... I planned to analyse template system with gradle as discussed with Taher and Michael, but that's bottom my prio list :). > Improve DevOps using environment variable configuration > --- > > Key: OFBIZ-9498 > URL: https://issues.apache.org/jira/browse/OFBIZ-9498 > Project: OFBiz > Issue Type: Improvement > Components: framework >Affects Versions: Trunk >Reporter: Gil Portenseigne >Assignee: Gil Portenseigne >Priority: Minor > Attachments: OFBIZ-9498.patch > > > Discussed in thread : https://s.apache.org/Mh3q > This Jira will present the improvment proposal giving a way to configure > OFBiz using environment variable. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OFBIZ-9498) Improve DevOps using environment variable configuration
[ https://issues.apache.org/jira/browse/OFBIZ-9498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16348864#comment-16348864 ] Jacques Le Roux commented on OFBIZ-9498: Hi Gil, Thanks for the update, we have all priorities ;) > Improve DevOps using environment variable configuration > --- > > Key: OFBIZ-9498 > URL: https://issues.apache.org/jira/browse/OFBIZ-9498 > Project: OFBiz > Issue Type: Improvement > Components: framework >Affects Versions: Trunk >Reporter: Gil Portenseigne >Assignee: Gil Portenseigne >Priority: Minor > Attachments: OFBIZ-9498.patch > > > Discussed in thread : https://s.apache.org/Mh3q > This Jira will present the improvment proposal giving a way to configure > OFBiz using environment variable. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OFBIZ-9498) Improve DevOps using environment variable configuration
[ https://issues.apache.org/jira/browse/OFBIZ-9498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16348773#comment-16348773 ] Gil Portenseigne commented on OFBIZ-9498: - Hi Jacques, we are still using it in our project but we haven't progress on the matter... I planned to analyse template system with gradle as discussed with Taher and Michael, but that's bottom my prio list :). > Improve DevOps using environment variable configuration > --- > > Key: OFBIZ-9498 > URL: https://issues.apache.org/jira/browse/OFBIZ-9498 > Project: OFBiz > Issue Type: Improvement > Components: framework >Affects Versions: Trunk >Reporter: Gil Portenseigne >Assignee: Gil Portenseigne >Priority: Minor > Attachments: OFBIZ-9498.patch > > > Discussed in thread : https://s.apache.org/Mh3q > This Jira will present the improvment proposal giving a way to configure > OFBiz using environment variable. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-10195) Add the ability in performFind service to set OR search criteria
[ https://issues.apache.org/jira/browse/OFBIZ-10195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gil Portenseigne updated OFBIZ-10195: - Attachment: OFBIZ-10195.patch > Add the ability in performFind service to set OR search criteria > > > Key: OFBIZ-10195 > URL: https://issues.apache.org/jira/browse/OFBIZ-10195 > Project: OFBiz > Issue Type: Improvement >Reporter: Gil Portenseigne >Assignee: Gil Portenseigne >Priority: Minor > Fix For: Upcoming Branch > > Attachments: OFBIZ-10195.patch > > > When using performFind service for advanced entity search, we can meet the > need to have search criteria that do not intersect between them, but make the > union of the condition. > To realize this improvement we propose to set a new suffix _grp. > Thus using : > > > > > Then the two search fields criteria will be unioned during the search by the > OR operator. > Several different keys can be used for several different unioned condition. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (OFBIZ-10195) Add the ability in performFind service to set OR search criteria
Gil Portenseigne created OFBIZ-10195: Summary: Add the ability in performFind service to set OR search criteria Key: OFBIZ-10195 URL: https://issues.apache.org/jira/browse/OFBIZ-10195 Project: OFBiz Issue Type: Improvement Reporter: Gil Portenseigne Assignee: Gil Portenseigne Fix For: Upcoming Branch When using performFind service for advanced entity search, we can meet the need to have search criteria that do not intersect between them, but make the union of the condition. To realize this improvement we propose to set a new suffix _grp. Thus using : Then the two search fields criteria will be unioned during the search by the OR operator. Several different keys can be used for several different unioned condition. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-10193) remove hardcoded viewSize for product search
[ https://issues.apache.org/jira/browse/OFBIZ-10193?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Wai updated OFBIZ-10193: Attachment: (was: OFBIZ-10193.patch) > remove hardcoded viewSize for product search > > > Key: OFBIZ-10193 > URL: https://issues.apache.org/jira/browse/OFBIZ-10193 > Project: OFBiz > Issue Type: Bug > Components: product >Affects Versions: Trunk >Reporter: Wai >Priority: Trivial > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OFBIZ-10194) ContentWrapper empty string result breaks simple FTL null check and default syntax
[ https://issues.apache.org/jira/browse/OFBIZ-10194?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Becker updated OFBIZ-10194: -- Attachment: OFBiz-10194_ContentWrappers.patch > ContentWrapper empty string result breaks simple FTL null check and default > syntax > -- > > Key: OFBIZ-10194 > URL: https://issues.apache.org/jira/browse/OFBIZ-10194 > Project: OFBiz > Issue Type: Bug > Components: content, order, party, product >Affects Versions: 16.11.04 >Reporter: Martin Becker >Priority: Minor > Attachments: OFBiz-10194_ContentWrappers.patch > > > Since the changes to the ContentWrappers from Ticket > https://issues.apache.org/jira/browse/OFBIZ-6701 the result for non existing > content is an empty string instead of NULL. > Aside from my opinion, that this is generally a bad design preferred by those > who do not like to check for null values within their code, this behavior > breaks the simple FTL syntax for using an alternate (default) value for a non > existing content, retrieved by a ContentWrapper like this: > {code:java} > <#assign categoryName = categoryContentWrapper.get("CATEGORY_NAME", > "string")!category.internalName?default(category.productCategoryId) />{code} > Basically this was done to get the non-existing-content cached within the > *.content.rendered cache and let the simple condition > {code:java} > if (cachedValue != null){code} > after a cache.get() respect this empty value. With a simple change to the > condition to > {code:java} > if (cachedValue != null || cache.containsKey(cacheKey)){code} > it is also possible to cache and successfully retrieve NULL values from the > cache. > I observed this now during an upgrade of OFBiz 12 based application code to > the current OFBiz release. > Besides this I did following refactorings consistently for all ContentWrapper > implementations to reduce code redundancy: > * centralized default mimeTypeId retrieval (static Interface method in > ContentWrapper) > * centralized encoding of result string via UtilEncoder (static Interface > method in ContentWrapper) > * centralized/generalized candidate field value retrieval (static Interface > method in ContentWrapper) > * harmonized content cache name to „xyz.content.rendered“, some wrappers did > not use the „.rendered“ suffix in their cache name > * fixed some missing useCache parameter use in EntityQuery…cache()… calls > For Category and Product ContentWrapper I updated the parameter handling of > the central getXyzContentAsText method where both, productId and product > GenericValue are given but no check is performed, if both are matching if > both are given (bad parameter signature, by the way). Now the product GV is > looked up, if a productId is given, and the productId is used from a given > product GV always, not only if it is missing. The drawback is, that there > will always be a lookup for Product/ProductCategory GV, even if a content > entry could be found with the productId/productCategoryId only. On the other > hand, the GV is always part of the content rendering input context, currently > it is missing there, if only a ID is given as parameter, again not really > consistent. > I did not wanted to change this for all content wrappers directly before > getting a feedback for it, even if it would be more consistent to have a > content rendering context with a product GV as input, independent of the > original call parameters productId and/or product GV. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (OFBIZ-10194) ContentWrapper empty string result breaks simple FTL null check and default syntax
Martin Becker created OFBIZ-10194: - Summary: ContentWrapper empty string result breaks simple FTL null check and default syntax Key: OFBIZ-10194 URL: https://issues.apache.org/jira/browse/OFBIZ-10194 Project: OFBiz Issue Type: Bug Components: content, order, party, product Affects Versions: 16.11.04 Reporter: Martin Becker Since the changes to the ContentWrappers from Ticket https://issues.apache.org/jira/browse/OFBIZ-6701 the result for non existing content is an empty string instead of NULL. Aside from my opinion, that this is generally a bad design preferred by those who do not like to check for null values within their code, this behavior breaks the simple FTL syntax for using an alternate (default) value for a non existing content, retrieved by a ContentWrapper like this: {code:java} <#assign categoryName = categoryContentWrapper.get("CATEGORY_NAME", "string")!category.internalName?default(category.productCategoryId) />{code} Basically this was done to get the non-existing-content cached within the *.content.rendered cache and let the simple condition {code:java} if (cachedValue != null){code} after a cache.get() respect this empty value. With a simple change to the condition to {code:java} if (cachedValue != null || cache.containsKey(cacheKey)){code} it is also possible to cache and successfully retrieve NULL values from the cache. I observed this now during an upgrade of OFBiz 12 based application code to the current OFBiz release. Besides this I did following refactorings consistently for all ContentWrapper implementations to reduce code redundancy: * centralized default mimeTypeId retrieval (static Interface method in ContentWrapper) * centralized encoding of result string via UtilEncoder (static Interface method in ContentWrapper) * centralized/generalized candidate field value retrieval (static Interface method in ContentWrapper) * harmonized content cache name to „xyz.content.rendered“, some wrappers did not use the „.rendered“ suffix in their cache name * fixed some missing useCache parameter use in EntityQuery…cache()… calls For Category and Product ContentWrapper I updated the parameter handling of the central getXyzContentAsText method where both, productId and product GenericValue are given but no check is performed, if both are matching if both are given (bad parameter signature, by the way). Now the product GV is looked up, if a productId is given, and the productId is used from a given product GV always, not only if it is missing. The drawback is, that there will always be a lookup for Product/ProductCategory GV, even if a content entry could be found with the productId/productCategoryId only. On the other hand, the GV is always part of the content rendering input context, currently it is missing there, if only a ID is given as parameter, again not really consistent. I did not wanted to change this for all content wrappers directly before getting a feedback for it, even if it would be more consistent to have a content rendering context with a product GV as input, independent of the original call parameters productId and/or product GV. -- This message was sent by Atlassian JIRA (v7.6.3#76005)