Entradas
SpringBoot (17) Components for selecting elements (2/3). Grids
- Obtener enlace
- X
- Correo electrónico
- Otras aplicaciones
SpringBoot (16) Components for selecting elements (1/3).Combos
- Obtener enlace
- X
- Correo electrónico
- Otras aplicaciones
SpringBoot (15) Let's start (4/10). Defining a CRUD form from scratch with one simple table/class.
- Obtener enlace
- X
- Correo electrónico
- Otras aplicaciones
0. Introduction In a previous post, we could see how to define CRUD form in the YAML file src/main/resources/config/menus/menus.yml Let's define a CRUD form that counts from one number to another and displays the counting process to the form. These steps should be followed: Define the menu item in the YAML file and also update the field idFills from the parent menu item As no special form is needed the field url should be assigned " /crud " Create a Java class PRGrade in the package ximo.xotherapps.model.proves that extends AuditIdLong class and implements Base interface Create the database and schema Create i18n elements 1. Updating the menus.yml file Here is the menus.yml file. Notice the yellow elements. 1 2 3 4 5 6 7 menus: items: - { id : 8 , name : Informatica , idFills : [ 8-1 , 8-2 , 8-3 , 8-4 ] } - { id : 8-4 , name : Creating Grades, url : '/crud' , modelClassName : PRGrade , pkg : ximo.xotherapps.model.proves ,
SpringBoot (14) Let's start (3/10). Defining an action form from scratch.
- Obtener enlace
- X
- Correo electrónico
- Otras aplicaciones
0. Introduction In a previous post, we could see how to define an action form in the YAML file src/main/resources/config/menus/menus.yml Let's define an action form that counts from one number to another and displays the counting process to the form. These steps should be followed: Define the menu item in the YAML file and also update the field idFills from the parent menu item As no special form is needed the field url should be assigned " /generalActionForm " Create a Java class in the package ximo.actions with a execute method that accepts two arguments (numbers from and to) and displays the count from the number from to the number to. 1. Updating the menus.yml file Here is the menus.yml file. Notice the yellow elements. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 menus: items: #--- Negociats: Nivell 0 - { id : 8 , name : Informatica , idFills : [ 8-1 , 8-2 , 8-3 ] } - { id : 8-3 , name : DantesqueSpringBootExample , specialRole : ADMIN , url : /gen
SpringBoot (14) Let's start (2/10). Defining users
- Obtener enlace
- X
- Correo electrónico
- Otras aplicaciones
0. Introduction The users' definition is in the file src/main/resources/config/menus/users.yml The fields used are: id name surname1 surname2 document : The DNI or any other specialRoles : A list of roles for instance [ADMIN, TERCERS, TERRIRORI ] lAccess : a list of menus asnd access level. The fields of this elements are: idMenu : id of the menu whose access level is referred. accessLevel : access level assigned to the userfrom 1 to 6 as shown in the previous post Here is an example with 2 users: 1 2 3 4 5 6 7 8 9 10 11 users: users: #--- Negociats: Nivell 0 - { id : 1 , name : Joan , surname1 : Perez , surname2 : Perez , document : 12345678K , specialRoles : [ ADMIN , TERCERS ], lAccess : [ { idMenu : 1 , accessLevel : 6 }, { idMenu : 2 , accessLevel : 6 }, { idMenu : 3 , accessLevel : 6 }, { idMenu : 6 , accessLevel : 6 }, { idMenu : 8 , accessLevel : 6 } ] } - { id : 2 , name : Pere , surname1 : Lopez , surname2 : Lopera , d
SpringBoot (13) Let's start (1/10). Introduction to defining menu items.
- Obtener enlace
- X
- Correo electrónico
- Otras aplicaciones
0. Introduction Four menu item types are used: Menu/submenu : Can have children. They are the parent of a tree. You can go to children. No actions can be performed. No URL can redirect ActionForm : Execute the method of a class and can have parameters. The parameters can be displayed in a form to change any value. A URL is needed CRUD Form : To insert/update/delete objects from a class. A URL is needed. Grid : For displaying database elements in a grid. The file "src/main/resources/config/menus/menus.yml" contains the menu configuration an definition The most important common fields are: id: must be supplied and must be únique. Typical values "1","1-1","1-2","1-2-1", you can use any id, but it should be easy to name: Is the description in the menu item accessLevel : Is the minimum access level required for the user to be executed or displayed. By default its value is 1 (0=No permissions required, 1: see, 2: list, 3: edit,4:insert,