Hi, I'm a new user of AEM.
As an exercise I want to simulate an e-commerce in which I can write and read from jcr ...
In an "insert" page I am using a form container component (start / end) where there are some form text components:
and at the end there is send button to refer (after completing all the fields) to the "display" page.
In the "display" page i want to show added products.
I followed these articles
create an AEM project 6.4 Maven archtype 13
create a custom action
I have watched default option "store action" how to work, but my problem is how to work its java class to store data. I don't understand it.
I want to store my products in a specific folder, not in a "usergenerated" folder like do "store action".
Alternatively, someone suggest a java script code works effectively to add to jsp file of my custom action.
Thaks to the support
Sorry for my bad english
Yes, As Scott stated, you need to follow HELPX article exactly as is and also make sure you create the system user in correct way.
I tested this article Adobe Experience Manager Help | Querying Adobe Experience Manager 6.4 JCR data many times and this works nicely!!
We just updated the article that talks about how to query JCR data. Its important to know how to do this.
This use case will build a HTL component that displays JCR data in a GRID - see this - it shows the HTL component working.
For AEM 6.4 or 6.3 you have few helpx on how to work with JCR API, I used them a little while back sharing the links with you below:
Hopefully this will work for you.
If that article with the video is not working - its most likely because you have not setup the System user properly. You need to follow the article exactly as it and make sure you get the system user created, give correct permissions and use the Sling Mapping Service. Once you do all of this - it works as shown in the video.
Finally I have done the insertion page and the visualization page.
In the insertion page I use the action store option and add the directory where to store my products in the edit dialog.
In the visualization page i use HTL commands "data-sly-use" and "data-sly-list" to show the products inserted. In particular with "data-sly-list" to scroll in a dynamic way all the nodes.
My only problem now is to upload images via HTL.
The images of the products that i memorize on the insertion page are of type nt:file (binary format).
I use the following code to show image but it does not work ...
I think the problem is binary format. Are there any solution to resolve the format?
Would you kindly be able to verify that there are no errors or if there is a different way?
Thank you, I'm apologize for the late reply.
 I have created the Java class in the core package in eclipse, but unfortunately it doesn't work. I think it may be a session problem ...
 i have followed it step by step but get employee button is not working.
In alternatively, for the visualization I have created a component where in the html file I insert the following code.
<sly data-sly-use.node = "/ etc / produtcts/product1">
Unfortunately it does not work. Do you have any ideas?
If you are using AEM Forms 6.4, my recommendation would be to learn the Forms Data Integration  and integrate with a data model via JDBC using a mySQL database . That is fairly easy to set up and is a common pattern you would use with a real instance. Its also very common to offload form data via REST or SOAP but that is usually harder to setup for test purposes. You (should) never use JCR to store data in a real setup for many reasons. The JCR is great but its not recommended to use as a data storage method (mostly due to replication issues).
If you still want to use JCR to persist your form data, there are quite a few tutorials on how to read/write from the JCR in AEM