When you have followed the steps of this tutorial you have
Now let's make some quick checks on the live demo.
Enter a new name in the marked row and push the 'save'
button.
The row mark will disappear and you should see your data on the list.
If the row mark is still there then you did not enter enough data to save the row. In the Person#isCreationAllowed() method we have specified that you have at least to enter a persons name.
If you see an error message when saving then somebody else is trying to save the same data (the same data rows) as you do. Once you update the screen after saving your data you will also see a new row marker again.
Check the filter paging and sorting features.
Open 2 browser windows (either on different workstations or different browsers on the same workstation) and let them show the same data. In browser 1 modify some row entry and push 'save' . Then in browser 2 also modify the same row and then push 'save'
. In browser 2 you'll see an error message indicating there is a conflict.
There are also specific messages: Enter an invalid birthdate '00000' and you'll get an error message and the erroneous form fields will be marked
While this particular feature doesn't mean any effort for you as a developer (it's simply a data type mismatch) there are other cases where you should write validators to provide the user with a specific message. If you omit the extra work for writing a detailed validator then in many cases you will simply fallback to error detection of your database resulting in an unspecific error message (database integrity violation, duplicate keys, invalid empty field, ...)
The demo contains a german and english localization depending on your browsers locale. (We also might simply add user locale selection). These items are subject to localization:
It's easy to add more locales.
Chaining is the most powerful feature of shept. Select a person and click on . A new subform appears below the Person form containing the persons addresses. Note that you can do anything with this Address subform as you can do with the Person form above. With the new subform you can
You can close or fold
a chained subform. In a shept application there is no limit in extending subforms to the bottom of the page through chaining. Best of all it requires very little programming effort. Note that the best browsing experience at this time when you have many subForms is with Firefox which renders the page almost seamlessly.
This simple demo is limited but your own application can extend infinetely to the bottom of the page just by
a) configuring (=allowing) a chain between two segments
b) including a 'chain'-link in the parent subform.
c) name the 'chain'-link after a hibernate 1:n or n:m relation of your entity model.
See more screenshots from other Shept-based application here
For Developers it might also be interesting to note that in a default configuration you can append any shept url with a ?debug=true parameter. So if you enter http://demo.shept.org/SheptDemo/person.shept?debug=true each subForm headline will expose some internals most notably the subForm (segment) name (pointing to its configuration in segments.xml) and the commandPathId which is useful if you mashup your forms with javascript.