This is a generator that will allow you to easly create complex JSF applications. Using the JPA, EJBs and JSF with Bootsfaces.
Requirements:
- Eclipse ( with Maven )
- Glassfish 4.* ( or any other Java webserver with Java EE libraries ) and a JDBC pool
- A JPA compatible Database ( e.g. Mysql )
The document panel is accessible using the button in the navigation bar. You can create a new document by clicking New document in the document panel.
version 1.0.0
name TheAmazingApp
domain biz.stillhart.amazing
form Customer
! firstname string
! lastname string
street string
city string
zipcode int
is_rich boolean
Create a new file in the src
folder with the .gmodel
extension. The script is space sensitive, like in Phyton you have to intend. The Attributes are seperated by spaces and linebreaks.
All scripts require a head with version
, name
and domain
. Optionally you may specfiiy a database
, the default for would be java:comp/DefaultDataSource
.
form Formname Databasename
! a_required_string string
! a_required_int int
a_long long
a_boolean boolean
a_char char
After the head multiple forms follow. A form defines the page and table that will be generated. The name can be followed by a name for the table, defaults to a lowercase of the name.
Attributes start with a !
when the are manadory to enter in the UI (not null
on the DB). Then comes the name followed by the Datatype.
char | string | int | long | boolean
The generator will do its thing as sone as you save. All files will be compiled into src-gen
.
Wait about a second (on a really slow computer a bit more).
Then refresh this folder and right click on the last file pom.xml
. In the context menue click run as
-> 6 Maven install
. This will take another second and you may want to refresh again.
In ...-app
folder under target
should be a .ear
file, which can easly deployed on the server.
Notes
Dueto the nature of the compiler, you have to delete this folder whenever you remove a form.
- Make sure all the requirements are met. Do all server run, does the JDBC ping work and is the URL correct?
- There shouldn't be any warnings (or errors) in the
.gmodel
- Dues the Database exist and is it empty?
version 1.0.0
name BbcBank
domain ch.bbc.uek223
form Customer aTable
! firstname string
! lastname string
title string
street string
city string
zipcode int
is_rich boolean
form Account
! iban string
! balance long
overdraft long
active boolean
form Transaction
type char
text string
amount long