Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
xaabi6 committed May 23, 2023
2 parents 82849b4 + 7b7cff2 commit 4dc4ad5
Show file tree
Hide file tree
Showing 86 changed files with 779 additions and 584 deletions.
4 changes: 3 additions & 1 deletion x21aAppWar/WebContent/WEB-INF/spring/jackson-config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.3.xsd">


<!-- Serializador utilizado por UDA para serializar unicamente las -->
<!-- Serializador utilizado por UDA -->
<bean id="customSerializer" class="com.ejie.x38.serialization.CustomSerializer" />

<!-- Serializador utilizado por Hdiv -->
<bean id="secureSerializerModule" class="com.ejie.x38.serialization.EjieSecureModule" />

<bean id="udaMappingJackson2HttpMessageConverter" class="com.ejie.x38.serialization.UdaMappingJackson2HttpMessageConverter">
<property name="supportedMediaTypes" ref="jacksonSupportedMediaTypes" />
<property name="udaModule" ref="udaModule" />
Expand Down
2 changes: 1 addition & 1 deletion x21aAppWar/WebContent/WEB-INF/spring/mvc-config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
</bean>

<!-- Permite la subida de ficheros -->
<bean id="multipartResolver" class="org.hdiv.web.multipart.HdivCommonsMultipartResolver" />
<bean id="multipartResolver" class="com.ejie.hdiv.web.multipart.HdivCommonsMultipartResolver" />

<!-- Bean encargado de las peticiones -->
<bean id="requestMappingHandlerAdapter" class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter">
Expand Down
125 changes: 74 additions & 51 deletions x21aAppWar/WebContent/WEB-INF/views/patrones/combo/comboEnlazado.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<div class="container-fluid">
<div class="form-row">
<fieldset id="local" class="col-sm mr-sm-5">
<fieldset id="local" class="col-sm mr-sm-4">
<legend>Local</legend>
<div class="form-groupMaterial">
<select id="comboAbuelo"></select>
Expand All @@ -44,7 +44,7 @@
</div>
</fieldset>

<fieldset id="remote" class="col-sm mr-sm-5">
<fieldset id="remote" class="col-sm mt-4 mt-sm-0 mr-sm-4">
<legend>Remoto</legend>
<form:form id="comboRemoto_form" modelAttribute="provinciaComarcaLocalidadDTO" action="${remoto}" method="GET">
<div class="form-groupMaterial">
Expand All @@ -64,7 +64,38 @@
</form:form>
</fieldset>

<fieldset id="mixto" class="col-sm">
<fieldset id="model" class="col-sm mt-4 mt-sm-0 mr-sm-4">
<legend>Cargado en el modelo</legend>
<form:form id="comboModelo_form" modelAttribute="provinciaComarcaLocalidadDTO" action="${remoto}" method="GET">
<div class="form-groupMaterial">
<form:select id="comarca_comboPadre" path="codeComarca">
<c:forEach var="comarca" items="${comboComarca}">
<form:option value="${comarca.id}" data-nid="${comarca.entity.code}">
<c:out value="${comarca.entity.descEs}"/>
</form:option>
</c:forEach>
</form:select>
<label for="comarca_comboPadre">Comarca</label>
</div>

<div class="form-groupMaterial">
<form:select id="localidad_comboHijo" path="codeLocalidad">
<c:forEach var="localidad" items="${comboLocalidad}">
<form:option value="${localidad.id}" data-idPadre="${localidad.entity.parentCode}">
<c:out value="${localidad.entity.descEs}"/>
</form:option>
</c:forEach>
</form:select>
<label for="localidad_comboHijo">Localidad</label>
</div>
</form:form>
</fieldset>
</div>
</div>

<div class="container-fluid">
<div class="form-row">
<fieldset id="mixto" class="col-sm mt-4 mr-sm-4">
<legend>Mixto I</legend>
<form:form id="comboRemotoMixto1_form" modelAttribute="provinciaComarcaLocalidadDTO" action="${remoto}" method="GET">
<div class="form-groupMaterial">
Expand All @@ -89,54 +120,46 @@
</div>
</form:form>
</fieldset>
</div>
</div>

<div class="container-fluid mt-4">
<div class="form-row">
<div id="mixto2" class="col-sm">
<fieldset class="combo_fieldset mr-sm-3">
<legend class="combo_legend">Mixto II</legend>
<form:form id="comboRemotoMixto1_form" modelAttribute="provinciaComarcaLocalidadDTO" action="${remoto}" method="GET">
<div class="form-groupMaterial">
<form:select id="mixto2_comboAbuelo" path="codeProvincia" items="${comboProvincia}" itemLabel="entity.descEs" itemValue="id" />
<label for="mixto2_comboAbuelo">Provincia (local)</label>
</div>

<div class="form-groupMaterial">
<form:select id="mixto2_comboPadreRemoto" path="codeComarca" />
<label for="mixto2_comboPadreRemoto">Comarca (remoto)</label>
</div>

<div class="form-groupMaterial">
<form:select id="mixto2_comboHijo" path="codeLocalidad">
<c:forEach var="localidad" items="${comboLocalidad}">
<form:option value="${localidad.id}" data-idPadre="${localidad.entity.parentCode}">
<c:out value="${localidad.entity.descEs}"/>
</form:option>
</c:forEach>
</form:select>
<label for="mixto2_comboHijo">Localidad (local)</label>
</div>
</form:form>
</fieldset>
</div>

<div id="remoteGroup" class="col-sm">
<fieldset>
<legend>Remoto agrupado</legend>
<form:form id="comboRemotoAgrupado_form" modelAttribute="comarcaLocalidadDTO" action="${remotoAgrupado}" method="GET">
<div class="form-groupMaterial">
<form:select id="remoteGroup_comboPadre" path="codeProvincia" />
<label for="remoteGroup_comboPadre">Provincia</label>
</div>

<div class="form-groupMaterial">
<form:select id="remoteGroup_comboHijo" path="codeComarcaLocalidad" />
<label for="remoteGroup_comboHijo">Comarca y Localidades</label>
</div>
</form:form>
</fieldset>
</div>
<fieldset id="mixto2" class="col-sm mt-4 mr-sm-4">
<legend class="combo_legend">Mixto II</legend>
<form:form id="comboRemotoMixto1_form" modelAttribute="provinciaComarcaLocalidadDTO" action="${remoto}" method="GET">
<div class="form-groupMaterial">
<form:select id="mixto2_comboAbuelo" path="codeProvincia" items="${comboProvincia}" itemLabel="entity.descEs" itemValue="id" />
<label for="mixto2_comboAbuelo">Provincia (local)</label>
</div>

<div class="form-groupMaterial">
<form:select id="mixto2_comboPadreRemoto" path="codeComarca" />
<label for="mixto2_comboPadreRemoto">Comarca (remoto)</label>
</div>

<div class="form-groupMaterial">
<form:select id="mixto2_comboHijo" path="codeLocalidad">
<c:forEach var="localidad" items="${comboLocalidad}">
<form:option value="${localidad.id}" data-idPadre="${localidad.entity.parentCode}">
<c:out value="${localidad.entity.descEs}"/>
</form:option>
</c:forEach>
</form:select>
<label for="mixto2_comboHijo">Localidad (local)</label>
</div>
</form:form>
</fieldset>

<fieldset id="remoteGroup" class="col-sm mt-4 mr-sm-4">
<legend>Remoto agrupado</legend>
<form:form id="comboRemotoAgrupado_form" modelAttribute="comarcaLocalidadDTO" action="${remotoAgrupado}" method="GET">
<div class="form-groupMaterial">
<form:select id="remoteGroup_comboPadre" path="codeProvincia" />
<label for="remoteGroup_comboPadre">Provincia</label>
</div>

<div class="form-groupMaterial">
<form:select id="remoteGroup_comboHijo" path="codeComarcaLocalidad" />
<label for="remoteGroup_comboHijo">Comarca y Localidades</label>
</div>
</form:form>
</fieldset>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
</div>
<form:form id="multicomboGruposRemoto_form" modelAttribute="provinciaComarcaLocalidadDTO" action="${remotoAgrupado}" method="GET">
<div class="form-groupMaterial col-sm">
<form:select id="multicomboGruposRemoto" path="code" />
<form:select id="multicomboGruposRemoto" path="codeProvincia" />
<label for="multicomboGruposRemoto">MultiCombo con 'optgroups' remoto</label>
</div>
</form:form>
Expand Down
2 changes: 1 addition & 1 deletion x21aAppWar/WebContent/WEB-INF/views/patrones/feedback.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
<div class="btn-group" role="group">
<button id="boton_create" type="button" class="btn btn-secondary">_Create</button>
<button id="boton_destroy" type="button" class="btn btn-secondary">Destroy</button>
<button id="boton_set" type="button" class="btn btn-secondary">Set</button>
<button id="boton_setText" type="button" class="btn btn-secondary">Set_Text</button>
<button id="boton_setOptions" type="button"
class="btn btn-secondary">Set_options</button>
<button id="boton_setType" type="button" class="btn btn-secondary">Set_type</button>
Expand Down
2 changes: 1 addition & 1 deletion x21aAppWar/WebContent/WEB-INF/views/welcome.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<div class="col-12">
<h1>
<img alt="El contenido estático no está correctamente desplegado."
src="${staticsUrl}/rup/css/images/uda_logo.png" /> v5.2.0
src="${staticsUrl}/rup/css/images/uda_logo.png" /> v5.3.0
<small>(Portal demostrativo)</small>
</h1>
<hr>
Expand Down
2 changes: 1 addition & 1 deletion x21aAppWar/WebContent/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

<!-- HDIV Init Listener -->
<listener>
<listener-class>org.hdiv.listener.InitListener</listener-class>
<listener-class>com.ejie.hdiv.listener.InitListener</listener-class>
</listener>

<!-- HDIV Validator Filter -->
Expand Down
6 changes: 3 additions & 3 deletions x21aAppWar/src/com/ejie/x21a/config/UDA4HdivConfig.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.ejie.x21a.config;

import org.hdiv.config.annotation.ExclusionRegistry;
import org.hdiv.config.annotation.RuleRegistry;
import org.hdiv.config.annotation.ValidationConfigurer;
import com.ejie.hdiv.config.annotation.ExclusionRegistry;
import com.ejie.hdiv.config.annotation.RuleRegistry;
import com.ejie.hdiv.config.annotation.ValidationConfigurer;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
Expand Down
10 changes: 5 additions & 5 deletions x21aAppWar/src/com/ejie/x21a/control/BootstrapController.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.ServletRequestDataBinder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.multipart.support.ByteArrayMultipartFileEditor;

import com.ejie.x21a.model.RandomForm;
Expand Down Expand Up @@ -55,22 +55,22 @@ protected void initBinder(HttpServletRequest request, ServletRequestDataBinder b
}


@RequestMapping(value = "stackedHorizontal", method = RequestMethod.GET)
@GetMapping(value = "stackedHorizontal")
public String getStackedHorizontal(Model model) {
return "stackedHorizontal";
}

@RequestMapping(value = "mobileDesktop", method = RequestMethod.GET)
@GetMapping(value = "mobileDesktop")
public String getMobileDesktop(Model model) {
return "mobileDesktop";
}

@RequestMapping(value = "mobileTabletDesktop", method = RequestMethod.GET)
@GetMapping(value = "mobileTabletDesktop")
public String getMobileTabletDesktop(Model model) {
return "mobileTabletDesktop";
}

@RequestMapping(value = "exampleForm", method = RequestMethod.GET)
@GetMapping(value = "exampleForm")
public String getExampleForm(Model model) {
model.addAttribute("randomForm", new RandomForm());
return "exampleForm";
Expand Down
13 changes: 7 additions & 6 deletions x21aAppWar/src/com/ejie/x21a/control/CacheController.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,20 @@
import java.util.List;
import java.util.Map;

import org.hdiv.services.TrustAssertion;
import com.ejie.hdiv.services.TrustAssertion;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.hateoas.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

Expand Down Expand Up @@ -50,7 +51,7 @@ public class CacheController {
@UDALinkAllower(name = "getTableInlineEdit"),
@UDALinkAllower(name = "getApellidos", linkClass = TableUsuarioController.class),
@UDALinkAllower(name = "getRoles", linkClass = TableUsuarioController.class) })
@RequestMapping(value = "view", method = RequestMethod.GET)
@GetMapping(value = "view")
public String getCreateForm(Model model) {
logger.info("[GET - View] : cache");
return "cache";
Expand Down Expand Up @@ -108,7 +109,7 @@ public String getTableInlineEdit (
}

@UDALink(name = "get", linkTo = { @UDALinkAllower(name = "edit"), @UDALinkAllower(name = "filter") })
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
@GetMapping(value = "/{id}")
public @ResponseBody Resource<Usuario> get(@PathVariable @TrustAssertion(idFor = Usuario.class) String id) {
Usuario usuario = new Usuario();
usuario.setId(id);
Expand All @@ -118,15 +119,15 @@ public String getTableInlineEdit (
}

@UDALink(name = "edit", linkTo = { @UDALinkAllower(name = "filter") })
@RequestMapping(value = "/edit", method = RequestMethod.PUT)
@PutMapping(value = "/edit")
public @ResponseBody Resource<Usuario> edit(@Validated @RequestBody Usuario usuario) {
Usuario usuarioAux = this.cacheService.update(usuario, Boolean.TRUE);
logger.info("[PUT - table] : �Entidad correctamente actualizada!");
return new Resource<Usuario>(usuarioAux);
}

@UDALink(name = "filter", linkTo = { @UDALinkAllower(name = "get"), @UDALinkAllower(name = "filter") })
@RequestMapping(value = "/filter", method = RequestMethod.POST)
@PostMapping(value = "/filter")
public @ResponseBody TableResourceResponseDto<Usuario> filter(
@RequestJsonBody(param="filter") Usuario filterUsuario,
@RequestJsonBody TableRequestDto tableRequestDto) {
Expand Down
12 changes: 6 additions & 6 deletions x21aAppWar/src/com/ejie/x21a/control/ComarcaController.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
import java.math.BigDecimal;
import java.util.List;

import org.hdiv.services.TrustAssertion;
import com.ejie.hdiv.services.TrustAssertion;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ejie.x21a.model.Comarca;
Expand All @@ -25,7 +25,7 @@
*/

@Controller
@RequestMapping (value = "/comarca")
@RequestMapping(value = "/comarca")

public class ComarcaController {

Expand All @@ -40,7 +40,7 @@ public class ComarcaController {
* @param model Model
* @return String
*/
@RequestMapping(value = "maint", method = RequestMethod.GET)
@GetMapping(value = "maint")
public String getCreateForm(Model model) {
ComarcaController.logger.info("[GET - View] : comarca");
return "comarca";
Expand All @@ -52,7 +52,7 @@ public String getCreateForm(Model model) {
* @param code BigDecimal
* @return comarca Comarca
*/
@RequestMapping(value = "/{code}", method = RequestMethod.GET)
@GetMapping(value = "/{code}")
public @ResponseBody Comarca getById(@PathVariable @TrustAssertion(idFor = Comarca.class) BigDecimal code) {
Comarca comarca = new Comarca();
comarca.setCode(code);
Expand All @@ -67,7 +67,7 @@ public String getCreateForm(Model model) {
* @param filterComarca Comarca
* @return List
*/
@RequestMapping(method = RequestMethod.GET)
@GetMapping
public @ResponseBody List<Comarca> getAll(@ModelAttribute Comarca filterComarca) {
ComarcaController.logger.info("[GET - find_ALL] : Obtener Comarca por filtro");
return this.comarcaService.findAll(filterComarca, null);
Expand Down
Loading

0 comments on commit 4dc4ad5

Please sign in to comment.