Re: To send and receive json array using ajax in Ofbiz
Hello, lsy writes: > It's been a month since I used Ofbiz. > I want to use JSON Array sent from Ajax. > How does JAVA handle this? > 1. controller.xml > > > > > > > > 2. service.xml > auth="true" > location="com.test.services.TestServices" invoke="CRUDList"> > optional="false"/> > optional="true"/> > > > 3. crudList.ftl > > > 4. service.java > public static Map CRUDList(DispatchContext dctx, Map ?> context) { > Delegator delegator = dctx.getDelegator(); > Map result = ServiceUtil.returnSuccess(); > GenericValue userLogin = (GenericValue) context.get("userLogin"); > > List reqData = UtilGenerics.checkList(context.get("data")); > String str = reqData.get(0); > JSONArray data = new JSONArray(); > data = new JSONArray(str); > > ... > } > > **result = data.length ==> 1 > When I take a JSONARray and size it, it's 1. > I don't know why. > I'd appreciate it if you could explain why. > And then, Please let me know if there is an easier way to use Java by > sending an arraylist to Ajax. Unless I am overlooking something, you simply need to associate the key “data” with the Java list you want to be converted to a JSON list like this: result.put("data", *the java list you want to be converted in JSON*); return result; The is supposed to convert the service result map (plus other things) to JSON auto-magically. -- Mathieu Lirzin GPG: F2A3 8D7E EB2B 6640 5761 070D 0ADE E100 9460 4D37
To send and receive json array using ajax in Ofbiz
It's been a month since I used Ofbiz. I want to use JSON Array sent from Ajax. How does JAVA handle this? 1. controller.xml 2. service.xml 3. crudList.ftl 4. service.java public static Map CRUDList(DispatchContext dctx, Map context) { Delegator delegator = dctx.getDelegator(); Map result = ServiceUtil.returnSuccess(); GenericValue userLogin = (GenericValue) context.get("userLogin"); List reqData = UtilGenerics.checkList(context.get("data")); String str = reqData.get(0); JSONArray data = new JSONArray(); data = new JSONArray(str); ... } **result = data.length ==> 1 When I take a JSONARray and size it, it's 1. I don't know why. I'd appreciate it if you could explain why. And then, Please let me know if there is an easier way to use Java by sending an arraylist to Ajax. -- Sent from: http://ofbiz.135035.n4.nabble.com/OFBiz-User-f135036.html
Distribution Management in Ofbiz
Hi All, What are the different features Ofbiz provides in distribution management like Sales Tracking Capability at Primary, Secondary and Tertiary level etc. also share case study if any Thanks all. -- Regards Mandar Kulkarni Adaptability is the whole mystery of life - Swami Vivekanand
Re: OFBiz and Camel integration updated
Hopefully the code still works. If yes, I think it would be a good plugin to add. Either way, I think this discussion should perhaps move to the development mailing list. On Mon, Jun 17, 2019 at 1:04 PM Rishi Solanki wrote: > > Dear Bilgin/Taher, > I tried to look into the plugins and Jira could not found anything related. > Although some discussion is there but I see plugin is not added into OFBiz > till now. Can you please share any reference if I missed something? > > I see the code in the Bilgin's repo and seems we can take it as ground and > test then commit it. If Bilgin allows then extend ofbiz-camel component to > next level if possible. And it too late to reply on this thread but I also > feel that the plugin should be part of OFBiz repo. > > Please suggest if all agree then I can go ahead to create Jira, test, > enhance and proceed. > > Best Regards, > -- > Rishi Solanki > Sr Manager, Enterprise Software Development > *HotWax Systems* > *Enterprise open source experts* > cell: +91-98932-87847 > http://www.hotwaxsystems.com > > On Thu, Mar 22, 2018 at 4:00 PM Taher Alkhateeb > wrote: > > > 1- create a JIRA > > 2- provide a patch or reference to your github repo and get some feedback > > 3- commit in $OFBIZ_HOME/plugins/ > > > > Given that you're the expert in this domain, I doubt you'll get any > > feedback on the design. However there are a few things which might > > need changing, for example: > > - Putting apache 2 license header in files > > - deleting the data directory given it is empty > > - moving the documentation to src/docs/asciidoc > > - removing some commented-out code > > > > I'd help you out if you'd need my help in anything BTW. > > > > On Thu, Mar 22, 2018 at 12:59 PM, Bilgin Ibryam wrote: > > > On Wed, Mar 21, 2018 at 4:16 PM, Taher Alkhateeb > > > wrote: > > >> Super awesome Bilgin, > > >> > > >> Maybe we should consider moving this work to plugins given how useful > > this > > >> feature could be? The license is compatible and the work joins two great > > >> apache projects. > > > > > > Since there is considerable interest in this, it might be worth the > > > effort. What is the processes for adding things into plugins? > > > > > > > > >> > > >> On Wed, Mar 21, 2018, 1:06 PM Bilgin Ibryam wrote: > > >> > > >>> hi all, > > >>> > > >>> a quick heads up. I've been getting requests to fix the ofbiz-camel > > >>> integration demo and finally did it. > > >>> It works with the latest version of OFBiz and Camel > > >>> Also added a nice diagram demonstrating how the integration works. > > >>> > > >>> https://github.com/bibryam/ofbiz-camel > > >>> > > >>> Cheers, > > >>> > > >>> -- > > >>> Bilgin Ibryam > > >>> ASF Member | Architect at Red Hat > > >>> http://ofbizian.com | @bibryam > > >>> > > >>> Kubernetes Patterns http://leanpub.com/k8spatterns (in progress) > > >>> Camel Design Patterns https://leanpub.com/camel-design-patterns > > >>> > > > > > > > > > > > > -- > > > Bilgin Ibryam > > > ASF Member | Architect at Red Hat > > > http://ofbizian.com | @bibryam > > > > > > Kubernetes Patterns http://leanpub.com/k8spatterns (in progress) > > > Camel Design Patterns https://leanpub.com/camel-design-patterns > >
Re: OFBIZ DEPLOY MEMORY PROBLEM
You need to give us more details. Which version. Any changes? Maybe have a look at https://issues.apache.org/jira/browse/OFBIZ-10592 HTH Jacques Le 17/06/2019 à 12:21, Jacques Le Roux a écrit : Hi, Your message has been moderated. Please subscribe to the user ML for such questions and then use your email client See also why here http://ofbiz.apache.org/mailing-lists.html You will get a better support , it's more fair to share with everybody and people can answer you on the ML rather than directly to you The wider the audience the better the answers you might get Also it's more work for moderators who have to accept your messages as long as you have not subscribed. I'll personally no longer accept them (other moderators still could) Thanks Jacques Le 17/06/2019 à 09:51, chinhhk a écrit : Hi, I deploy Ofbiz on a linux server have 4GB RAM. I test with 2 user access to ecommerce site. My memory used continuous increase. i config in build.gradle def jvmArguments = ['-Xms512M', '-XX:MetaspaceSize=128m', '-XX:MaxMetaspaceSize=256m', '-XX:MaxHeapFreeRatio=75', '-XX:MinHeapFreeRatio=40', '-XX:+UseG1GC','-XX:+UseGCOverheadLimit','-Xmx1024M', '-Dfile.encoding=UTF-8'] every body have same problem ? Please help me. thank -- Sent from: http://ofbiz.135035.n4.nabble.com/OFBiz-User-f135036.html
Re: OFBIZ DEPLOY MEMORY PROBLEM
Hi, Your message has been moderated. Please subscribe to the user ML for such questions and then use your email client See also why here http://ofbiz.apache.org/mailing-lists.html You will get a better support , it's more fair to share with everybody and people can answer you on the ML rather than directly to you The wider the audience the better the answers you might get Also it's more work for moderators who have to accept your messages as long as you have not subscribed. I'll personally no longer accept them (other moderators still could) Thanks Jacques Le 17/06/2019 à 09:51, chinhhk a écrit : Hi, I deploy Ofbiz on a linux server have 4GB RAM. I test with 2 user access to ecommerce site. My memory used continuous increase. i config in build.gradle def jvmArguments = ['-Xms512M', '-XX:MetaspaceSize=128m', '-XX:MaxMetaspaceSize=256m', '-XX:MaxHeapFreeRatio=75', '-XX:MinHeapFreeRatio=40', '-XX:+UseG1GC','-XX:+UseGCOverheadLimit','-Xmx1024M', '-Dfile.encoding=UTF-8'] every body have same problem ? Please help me. thank -- Sent from: http://ofbiz.135035.n4.nabble.com/OFBiz-User-f135036.html
Re: OFBiz and Camel integration updated
Dear Bilgin/Taher, I tried to look into the plugins and Jira could not found anything related. Although some discussion is there but I see plugin is not added into OFBiz till now. Can you please share any reference if I missed something? I see the code in the Bilgin's repo and seems we can take it as ground and test then commit it. If Bilgin allows then extend ofbiz-camel component to next level if possible. And it too late to reply on this thread but I also feel that the plugin should be part of OFBiz repo. Please suggest if all agree then I can go ahead to create Jira, test, enhance and proceed. Best Regards, -- Rishi Solanki Sr Manager, Enterprise Software Development *HotWax Systems* *Enterprise open source experts* cell: +91-98932-87847 http://www.hotwaxsystems.com On Thu, Mar 22, 2018 at 4:00 PM Taher Alkhateeb wrote: > 1- create a JIRA > 2- provide a patch or reference to your github repo and get some feedback > 3- commit in $OFBIZ_HOME/plugins/ > > Given that you're the expert in this domain, I doubt you'll get any > feedback on the design. However there are a few things which might > need changing, for example: > - Putting apache 2 license header in files > - deleting the data directory given it is empty > - moving the documentation to src/docs/asciidoc > - removing some commented-out code > > I'd help you out if you'd need my help in anything BTW. > > On Thu, Mar 22, 2018 at 12:59 PM, Bilgin Ibryam wrote: > > On Wed, Mar 21, 2018 at 4:16 PM, Taher Alkhateeb > > wrote: > >> Super awesome Bilgin, > >> > >> Maybe we should consider moving this work to plugins given how useful > this > >> feature could be? The license is compatible and the work joins two great > >> apache projects. > > > > Since there is considerable interest in this, it might be worth the > > effort. What is the processes for adding things into plugins? > > > > > >> > >> On Wed, Mar 21, 2018, 1:06 PM Bilgin Ibryam wrote: > >> > >>> hi all, > >>> > >>> a quick heads up. I've been getting requests to fix the ofbiz-camel > >>> integration demo and finally did it. > >>> It works with the latest version of OFBiz and Camel > >>> Also added a nice diagram demonstrating how the integration works. > >>> > >>> https://github.com/bibryam/ofbiz-camel > >>> > >>> Cheers, > >>> > >>> -- > >>> Bilgin Ibryam > >>> ASF Member | Architect at Red Hat > >>> http://ofbizian.com | @bibryam > >>> > >>> Kubernetes Patterns http://leanpub.com/k8spatterns (in progress) > >>> Camel Design Patterns https://leanpub.com/camel-design-patterns > >>> > > > > > > > > -- > > Bilgin Ibryam > > ASF Member | Architect at Red Hat > > http://ofbizian.com | @bibryam > > > > Kubernetes Patterns http://leanpub.com/k8spatterns (in progress) > > Camel Design Patterns https://leanpub.com/camel-design-patterns >
OFBIZ DEPLOY MEMORY PROBLEM
Hi, I deploy Ofbiz on a linux server have 4GB RAM. I test with 2 user access to ecommerce site. My memory used continuous increase. i config in build.gradle def jvmArguments = ['-Xms512M', '-XX:MetaspaceSize=128m', '-XX:MaxMetaspaceSize=256m', '-XX:MaxHeapFreeRatio=75', '-XX:MinHeapFreeRatio=40', '-XX:+UseG1GC','-XX:+UseGCOverheadLimit','-Xmx1024M', '-Dfile.encoding=UTF-8'] every body have same problem ? Please help me. thank -- Sent from: http://ofbiz.135035.n4.nabble.com/OFBiz-User-f135036.html