[jira] [Assigned] (OFBIZ-11409) POC for Dynamic Screen Using MVVM

2020-04-01 Thread James Yong (Jira)


 [ 
https://issues.apache.org/jira/browse/OFBIZ-11409?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

James Yong reassigned OFBIZ-11409:
--

Assignee: James Yong

> POC for Dynamic Screen Using MVVM
> -
>
> Key: OFBIZ-11409
> URL: https://issues.apache.org/jira/browse/OFBIZ-11409
> Project: OFBiz
>  Issue Type: Improvement
>  Components: base
>Affects Versions: Trunk
>Reporter: James Yong
>Assignee: James Yong
>Priority: Minor
> Fix For: Trunk
>
> Attachments: OFBIZ-11409.patch, OFBIZ-11409.patch, OFBIZ-11409.patch
>
>
> Proof of concept for Model–view–viewmodel (MVVM) in form widgets.
> Added data-bind attribute to the field, form and grid tag.
> Example 1:
> Go to [https://localhost:8443/humanres/control/NewEmployee] and try the 
> following field:
>  # First name
>  # Middle name
>  # Last name
> Added Full Name field to demonstrate computed observable/property.
> Example 2:
> Page at 
> [https://localhost:8443/ordermgr/control/ListQuoteItemsDemo?quoteId=CQ0001] 
> duplicated the functionality of Quote Items page, but done using data-binding 
> way. 
> mbrohl: here is a link to the discussion on the dev mailing list: 
> [https://lists.apache.org/thread.html/r1cddbc8041e5a6559bfad979bc8570581a3d1f662a0f8692c7ee9e59%40%3Cdev.ofbiz.apache.org%3E]
> *15th March 2020* 
>  Updated the patch with more concrete examples for form and grid.
> 1) A javascript viewmodel function will be generated for the form / grid 
> widgets when its data-bind attribute is defined. 
> 2) First row of the grid is generated by the ofbiz renderer at the server 
> side. Subsequent rows will be generated by knockout at the browser side.
> 3) Naming convention of the viewmodel is Vm. There is a 
> viewmodel for the Grid widget at row level; naming convention is RowVm of Grid>.
> 4) Viewmodel can be extended. See the *.js.ftl files in the patch. 
> 5) The following javascript files are used:
>  * big/big.js - for basic mathematics operation
>  * knockout/knockout-3.5.1.js - knockout library
>  * knockout/knockout-config.js - extending the library and some code to 
> configure knockout-secure-binding
>  * knockout/knockout-secure-binding - allow knockout js to be used with a 
> Content Security Policy that disables eval and new Function.
> 6)  Example of hyperlink:
> Before:
> {code:xml}
>  widget-style="buttontext" use-when="${groovy: 'N'.equals(isPromo)}">
>  also-hidden="false">
> 
> 
> 
> 
> {code}
> After:
> {code:xml}
>  data-bind="text:quoteItemSeqId, attr: { href: 
> editQuoteItemLink, title: 'Quote Item Seq ID'}"
>widget-style="buttontext">
> 
> 
> {code}
> {code:javascript}
> RowVmListQuoteItemsDemo.prototype = {
> computed: {
> "editQuoteItemLink": function(){
> return "<@ofbizUrl>EditQuoteItem?=" + 
> this.quoteItemSeqId() + "=" + this.quoteId();
> },
>...
> };
> {code}
> From the value of data-bind attribute, we can see that the href attribute 
> points to the editQuoteItemLink function.
> editQuoteItemLink is a prototype member of RowVmListQuoteItemsDemo, while 
> RowVmListQuoteItemsDemo is viewmodel for the Grid widget at row level.
> 7) Example of decimal places:
> {code:javascript}
> extend: {
> "quoteUnitPrice": {numeric: 2}
> }
> {code}
> The column or field for qouteUnitPrice will be rounded to 2 decimal places.
> 8) Example of calculating line totals:
> {code:xml}
>  
> {code}
> {code:javascript}
> RowVmListQuoteItemsDemo.prototype = {
> computed: {
> ...
> "lineTotal": function() {
> var itemPrice = this.quoteUnitPrice();
> var selectedAmount = this.selectedAmount() || 1;
> var quantity = this.quantity() || 0;
> return new 
> Big(itemPrice).times(selectedAmount).times(quantity).toFixed(2);
> }
> ...
> };
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (OFBIZ-11475) AjaxAutocompleteOptions should be able to decode return values

2020-04-01 Thread James Yong (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-11475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17073290#comment-17073290
 ] 

James Yong commented on OFBIZ-11475:


+1
Tested this change. It is good for merging.

> AjaxAutocompleteOptions should be able to decode return values
> --
>
> Key: OFBIZ-11475
> URL: https://issues.apache.org/jira/browse/OFBIZ-11475
> Project: OFBiz
>  Issue Type: Improvement
>Affects Versions: Trunk
>Reporter: Ulrich Heidfeld
>Assignee: Ulrich Heidfeld
>Priority: Minor
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> I got the following problem. I used a lookup to find an userLoginId that is, 
> in our project, in most cases user's email address. By clicking one of 
> porposed entries, the filed userLoginId was filled by an crypted email 
> address like pete.parkerrofbiz.org.
> I recommend to use StringUtil's wrapString to decode selected option's return 
> value in 'AjaxAutocompleteOptions.ftl'.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (OFBIZ-11534) Error in uploading large files

2020-04-01 Thread Jacques Le Roux (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-11534?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17073105#comment-17073105
 ] 

Jacques Le Roux commented on OFBIZ-11534:
-

Or this one maybe: 
https://stackoverflow.com/questions/646189/why-did-i-get-fileuploadexception-stream-ended-unexpectedly-with-apache-commo

> Error in uploading large files 
> ---
>
> Key: OFBIZ-11534
> URL: https://issues.apache.org/jira/browse/OFBIZ-11534
> Project: OFBiz
>  Issue Type: Bug
>  Components: ALL APPLICATIONS
>Affects Versions: Trunk
>Reporter: Chandan Khandelwal
>Assignee: Jacques Le Roux
>Priority: Major
> Attachments: OFBIZ-11534.patch
>
>
> There is an issue in uploading large files, I am able to upload files up to 2 
> GB successfully but getting an error when trying to upload a file larger than 
> 2GB.
> Example - 
> 1. Go to party profile -
> [https://demo-trunk.ofbiz.apache.org/partymgr/control/viewprofile?partyId=admin]
> 2. Try to create a party content with a file larger than 2 GB
> 3. Error on console
> 
> java.lang.NegativeArraySizeException: 
> nulljava.lang.NegativeArraySizeException: null at 
> org.apache.commons.fileupload.disk.DiskFileItem.get(DiskFileItem.java:308) 
> ~[commons-fileupload-1.4.jar:1.4] at 
> org.apache.ofbiz.base.util.UtilHttp.getMultiPartParameterMap(UtilHttp.java:275)
>  ~[main/:?] at 
> =
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (OFBIZ-11534) Error in uploading large files

2020-04-01 Thread Jacques Le Roux (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-11534?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17073102#comment-17073102
 ] 

Jacques Le Roux commented on OFBIZ-11534:
-

BTW CHandan,

What is the type of the big file you are using? I think you can attach it there 
(Jira must still be limited to 10 Mo) but could you give me a link. I tested 
with an exotic file type I have and maybe got this issue: FILEUPLOAD-143 TIA

> Error in uploading large files 
> ---
>
> Key: OFBIZ-11534
> URL: https://issues.apache.org/jira/browse/OFBIZ-11534
> Project: OFBiz
>  Issue Type: Bug
>  Components: ALL APPLICATIONS
>Affects Versions: Trunk
>Reporter: Chandan Khandelwal
>Assignee: Jacques Le Roux
>Priority: Major
> Attachments: OFBIZ-11534.patch
>
>
> There is an issue in uploading large files, I am able to upload files up to 2 
> GB successfully but getting an error when trying to upload a file larger than 
> 2GB.
> Example - 
> 1. Go to party profile -
> [https://demo-trunk.ofbiz.apache.org/partymgr/control/viewprofile?partyId=admin]
> 2. Try to create a party content with a file larger than 2 GB
> 3. Error on console
> 
> java.lang.NegativeArraySizeException: 
> nulljava.lang.NegativeArraySizeException: null at 
> org.apache.commons.fileupload.disk.DiskFileItem.get(DiskFileItem.java:308) 
> ~[commons-fileupload-1.4.jar:1.4] at 
> org.apache.ofbiz.base.util.UtilHttp.getMultiPartParameterMap(UtilHttp.java:275)
>  ~[main/:?] at 
> =
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (OFBIZ-11573) Incorrect column alias in EntitySQLProcessor for sql query working with mysql

2020-04-01 Thread Jacques Le Roux (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-11573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17073082#comment-17073082
 ] 

Jacques Le Roux commented on OFBIZ-11573:
-

oÖps, Päwan just noticed me on Slack that it's only "with mysql" as the end of 
title mentions :/

> Incorrect column alias in EntitySQLProcessor for sql query working with mysql 
> --
>
> Key: OFBIZ-11573
> URL: https://issues.apache.org/jira/browse/OFBIZ-11573
> Project: OFBiz
>  Issue Type: Bug
>  Components: framework/webtools
>Affects Versions: Release Branch 18.12, Release Branch 17.12, Trunk
>Reporter: Pawan Verma
>Assignee: Pawan Verma
>Priority: Major
> Attachments: EntitySQLProcessor.png, OFBIZ-11573.patch
>
>
> Steps to reproduce:
>  # Go to EntitySQLProcessor.
>  # Try simple SQL query: SELECT PARTY_ID AS customerPartyId FROM PARTY
>  # See the column alias in the result, it should be the provided one.
>  # See screenshot for more details.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (OFBIZ-11573) Incorrect column alias in EntitySQLProcessor for sql query working with mysql

2020-04-01 Thread Jacques Le Roux (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-11573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17072918#comment-17072918
 ] 

Jacques Le Roux commented on OFBIZ-11573:
-

Oh, just figured out for R17, I used an old Svn installation :/

> Incorrect column alias in EntitySQLProcessor for sql query working with mysql 
> --
>
> Key: OFBIZ-11573
> URL: https://issues.apache.org/jira/browse/OFBIZ-11573
> Project: OFBiz
>  Issue Type: Bug
>  Components: framework/webtools
>Affects Versions: Release Branch 18.12, Release Branch 17.12, Trunk
>Reporter: Pawan Verma
>Assignee: Pawan Verma
>Priority: Major
> Attachments: EntitySQLProcessor.png, OFBIZ-11573.patch
>
>
> Steps to reproduce:
>  # Go to EntitySQLProcessor.
>  # Try simple SQL query: SELECT PARTY_ID AS customerPartyId FROM PARTY
>  # See the column alias in the result, it should be the provided one.
>  # See screenshot for more details.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (OFBIZ-11573) Incorrect column alias in EntitySQLProcessor for sql query working with mysql

2020-04-01 Thread Jacques Le Roux (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-11573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17072915#comment-17072915
 ] 

Jacques Le Roux commented on OFBIZ-11573:
-

HI Pawan,

I wonder because it works correctly in trunk demo where the code is the same. I 
have also no problem locally with R18. I did not check further with R17 when I 
got: "SQL Exception while executing the following:SELECT PARTY_ID AS 
customerPartyId FROM PARTY (Table/View 'PARTY' does not exist.) " Maybe a wrong 
data load locally on my side.

> Incorrect column alias in EntitySQLProcessor for sql query working with mysql 
> --
>
> Key: OFBIZ-11573
> URL: https://issues.apache.org/jira/browse/OFBIZ-11573
> Project: OFBiz
>  Issue Type: Bug
>  Components: framework/webtools
>Affects Versions: Release Branch 18.12, Release Branch 17.12, Trunk
>Reporter: Pawan Verma
>Assignee: Pawan Verma
>Priority: Major
> Attachments: EntitySQLProcessor.png, OFBIZ-11573.patch
>
>
> Steps to reproduce:
>  # Go to EntitySQLProcessor.
>  # Try simple SQL query: SELECT PARTY_ID AS customerPartyId FROM PARTY
>  # See the column alias in the result, it should be the provided one.
>  # See screenshot for more details.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (OFBIZ-11431) InvoiceItem: uomID is wrongly defined

2020-04-01 Thread James Yong (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-11431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17072912#comment-17072912
 ] 

James Yong commented on OFBIZ-11431:


Hi Pierre, all,

 

2 issues here:

 

1st is the removal of *uomId* field from *InvoiceItem* entity because the info 
is already captured in *Invoice* entity. As the field may be in use, we can 
move this field to an *extend-entity* for *InvoiceItem* like the following. 
This will address the deprecation issue.
{code:xml}
File: datamodel/entitydef/deprecated-entitymodel.xml
...







...
{code}
 

2nd is the addition of *quantityUomId* field in *InvoiceItem* entity. 
I can't find a corresponding field in *OrderItem* entity. 
Is there is a corresponding field in another related entity?

> InvoiceItem: uomID is wrongly defined
> -
>
> Key: OFBIZ-11431
> URL: https://issues.apache.org/jira/browse/OFBIZ-11431
> Project: OFBiz
>  Issue Type: Bug
>  Components: datamodel
>Affects Versions: Trunk
>Reporter: Pierre Smits
>Priority: Critical
>  Labels: refactoring
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Currently the InvoiceItem entity has the field uomId, per:
> {code:java}
>   
> {code}
> per the demo data this field is used to capture the currency of the invoice 
> item. This is, however, wrong. The currency for invoice items is set in the 
> invoice entity record (with field currencyUomId. 
> The uomId in the invoice item is related to the quantity set, and must be 
> correctly named: 'quantityUomId.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (OFBIZ-11534) Error in uploading large files

2020-04-01 Thread Jacques Le Roux (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-11534?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17072900#comment-17072900
 ] 

Jacques Le Roux commented on OFBIZ-11534:
-

Hi Chandan,

I thought I'd be back to this today, but it's already late. I had a deep look 
since my last comment and found it's unexpectedly complex and confusing. I 
continue and will let you know...

> Error in uploading large files 
> ---
>
> Key: OFBIZ-11534
> URL: https://issues.apache.org/jira/browse/OFBIZ-11534
> Project: OFBiz
>  Issue Type: Bug
>  Components: ALL APPLICATIONS
>Affects Versions: Trunk
>Reporter: Chandan Khandelwal
>Assignee: Jacques Le Roux
>Priority: Major
> Attachments: OFBIZ-11534.patch
>
>
> There is an issue in uploading large files, I am able to upload files up to 2 
> GB successfully but getting an error when trying to upload a file larger than 
> 2GB.
> Example - 
> 1. Go to party profile -
> [https://demo-trunk.ofbiz.apache.org/partymgr/control/viewprofile?partyId=admin]
> 2. Try to create a party content with a file larger than 2 GB
> 3. Error on console
> 
> java.lang.NegativeArraySizeException: 
> nulljava.lang.NegativeArraySizeException: null at 
> org.apache.commons.fileupload.disk.DiskFileItem.get(DiskFileItem.java:308) 
> ~[commons-fileupload-1.4.jar:1.4] at 
> org.apache.ofbiz.base.util.UtilHttp.getMultiPartParameterMap(UtilHttp.java:275)
>  ~[main/:?] at 
> =
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [ofbiz-framework] sonarcloud[bot] commented on issue #60: OFBIZ-11462 Improved: Convert ShipmentServices.xml mini lang to groovy

2020-04-01 Thread GitBox
sonarcloud[bot] commented on issue #60: OFBIZ-11462 Improved: Convert 
ShipmentServices.xml mini lang to groovy
URL: https://github.com/apache/ofbiz-framework/pull/60#issuecomment-607308476
 
 
   Kudos, SonarCloud Quality Gate passed!
   
   [](https://sonarcloud.io/project/issues?id=apache_ofbiz-framework=60=false=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_ofbiz-framework=60=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_ofbiz-framework=60=false=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_ofbiz-framework=60=false=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_ofbiz-framework=60=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_ofbiz-framework=60=false=VULNERABILITY)
 (and [](https://sonarcloud.io/project/issues?id=apache_ofbiz-framework=60=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/issues?id=apache_ofbiz-framework=60=false=SECURITY_HOTSPOT)
 to review)  
   [](https://sonarcloud.io/project/issues?id=apache_ofbiz-framework=60=false=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_ofbiz-framework=60=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_ofbiz-framework=60=false=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_ofbiz-framework=60)
 No Coverage information  
   [](https://sonarcloud.io/component_measures?id=apache_ofbiz-framework=60=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_ofbiz-framework=60=new_duplicated_lines_density=list)
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [ofbiz-framework] SebastianEcomify opened a new pull request #60: OFBIZ-11462 Improved: Convert ShipmentServices.xml mini lang to groovy

2020-04-01 Thread GitBox
SebastianEcomify opened a new pull request #60: OFBIZ-11462 Improved: Convert 
ShipmentServices.xml mini lang to groovy
URL: https://github.com/apache/ofbiz-framework/pull/60
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Assigned] (OFBIZ-11310) JSON renderer for screen/menu/form

2020-04-01 Thread Olivier Heintz (Jira)


 [ 
https://issues.apache.org/jira/browse/OFBIZ-11310?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Olivier Heintz reassigned OFBIZ-11310:
--

Assignee: Olivier Heintz

> JSON renderer for screen/menu/form 
> ---
>
> Key: OFBIZ-11310
> URL: https://issues.apache.org/jira/browse/OFBIZ-11310
> Project: OFBiz
>  Issue Type: New Feature
>  Components: framework
>Affects Versions: Trunk
>Reporter: Olivier Heintz
>Assignee: Olivier Heintz
>Priority: Minor
> Attachments: FrontJsFormRenderer.java, FrontJsMenuRenderer.java, 
> FrontJsOutput.java, FrontJsScreenRenderer.java, 
> FrontJsScreenViewHandler.java, FrontJsTreeRenderer.java, OFBIZ-11310.patch
>
>
> In a POC approach for using a SPA framework for GUI in OFBiz, json renderer 
> have been developed.
> This Jira could be used to do code review on these renderer.
> Currently, these renderer are on a V0 situation, it's a work in process 
> situation. After mailing-list discussion with mathieu we decide to go to a 
> V0.1 by 2-3 tasks
>  * add some javadoc each time it's necessary or needed
>  * remove all comment code or explain the decision waiting to activate or 
> remove the code
>  * do checkstyle
> On first step, code will be with only what is used in a use case (no code for 
> tag not currently manage).
> Json renderer are part of vuejs-portal plugin, in ofbizextra gitlab 
> (https://gitlab.ofbizextra.org/ofbizextra/ofbizplugins/vuejsPortal), so 
> commit are done on it, and mailing-list with these commit [are 
> ofbizextra-com...@lists.sourceforge.net.|mailto:are%c2%a0ofbizextra-com...@lists.sourceforge.net.]
>  But we will publish an update on this Jira each week there are some 
> modifications on renderer files
> This task will take some time because it will used to do a complete code 
> review, not only in renderer but in vuejs component too, and so complete 
> documentation.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)