Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Create form and submit to DB in /etc path for admin user in author mode

Avatar

Avatar
Validate 10
Level 2
Bahar
Level 2

Likes

6 likes

Total Posts

32 posts

Correct Reply

3 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 10
Level 2
Bahar
Level 2

Likes

6 likes

Total Posts

32 posts

Correct Reply

3 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
Bahar
Level 2

19-04-2019

Hello all,

I want to create a form page in /etc path for specific admin user, the form with couple of fields and submit data in mysql db.

This is what I am doing here:

I have created the form component 3 fields with add button. I have new page in /etc folder in my project folder which has sling:resourceType to my new component. It is showing well and has list of the existing data in DB.

To make it visual to you, please look at here, it is something like this page: http://localhost:4502/etc/acs-commons/reports.html

I am making in sightly and have created service and model of my object in backend.

Then I have my servlet to send my form action to that servlet. 

Am I doing correct here? Any specific scenarios for form submit in author mode that I have to follow up?

Regards,

Bahar

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

22-04-2019

Looks like you are doing it correctly - you have a servlet that you are posting to. You can then write app logic to persist the data into a database. Are you using the DataSourcePool API? 

Answers (3)

Answers (3)

Avatar

Avatar
Validate 10
Level 2
Bahar
Level 2

Likes

6 likes

Total Posts

32 posts

Correct Reply

3 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 10
Level 2
Bahar
Level 2

Likes

6 likes

Total Posts

32 posts

Correct Reply

3 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
Bahar
Level 2

22-04-2019

Cool, I am using JDBC DataSourcePool... Then I am in good path. I had doubting because it was using in author mode, I liked to double check with folks here. Then we are good and I can close this question. Thanks Scott for your swift reply.

Avatar

Avatar
Validate 10
Level 2
Bahar
Level 2

Likes

6 likes

Total Posts

32 posts

Correct Reply

3 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 10
Level 2
Bahar
Level 2

Likes

6 likes

Total Posts

32 posts

Correct Reply

3 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 1
View profile
Bahar
Level 2

19-04-2019

No, not any form in PUBLISH. It is only form in author mode in /etc path for specific user who can update and change DB.

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

19-04-2019

Are you going to use this FORM in PUBLISH?