Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
proyecto-estandar
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Israel Gutierrez Salazar
proyecto-estandar
Commits
69bf0e82
Commit
69bf0e82
authored
Jan 12, 2018
by
Israel Gutierrez Salazar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[EDIT] Cambios
parent
3524a041
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
19 additions
and
104 deletions
+19
-104
build.xml
build.xml
+0
-0
build-impl.xml
nbproject/build-impl.xml
+4
-4
genfiles.properties
nbproject/genfiles.properties
+3
-3
project.properties
nbproject/project.properties
+4
-4
project.xml
nbproject/project.xml
+2
-2
PersonaBean.java
src/java/demojsoncrud/beans/PersonaBean.java
+0
-5
DAOFactory.java
src/java/demojsoncrud/dao/DAOFactory.java
+0
-9
PersonaDAO.java
src/java/demojsoncrud/dao/PersonaDAO.java
+0
-9
PersonaService.java
src/java/demojsoncrud/services/PersonaService.java
+0
-9
PersonaServlet.java
src/java/demojsoncrud/servlets/PersonaServlet.java
+0
-9
PersonaSqlserverDAO.java
src/java/demojsoncrud/sqlserverdao/PersonaSqlserverDAO.java
+1
-10
SqlserverDAOFactory.java
src/java/demojsoncrud/sqlserverdao/SqlserverDAOFactory.java
+1
-10
ResponseHelper.java
src/java/demojsoncrud/utilities/ResponseHelper.java
+1
-10
persona.js
web/js/pages/persona.js
+3
-15
persona.jsp
web/vistas/persona.jsp
+0
-5
No files found.
build.xml
View file @
69bf0e82
nbproject/build-impl.xml
View file @
69bf0e82
...
@@ -997,14 +997,14 @@ exists or setup the property manually. For example like this:
...
@@ -997,14 +997,14 @@ exists or setup the property manually. For example like this:
</target>
</target>
<target
depends=
"init,compile,compile-jsps,-pre-dist,-do-dist-with-manifest,-do-dist-without-manifest"
name=
"do-dist"
/>
<target
depends=
"init,compile,compile-jsps,-pre-dist,-do-dist-with-manifest,-do-dist-without-manifest"
name=
"do-dist"
/>
<target
depends=
"init"
if=
"dist.ear.dir"
name=
"library-inclusion-in-manifest"
>
<target
depends=
"init"
if=
"dist.ear.dir"
name=
"library-inclusion-in-manifest"
>
<copyfiles
files=
"${file.reference.json-20160
810.jar}"
iftldtodir=
"${build.web.dir}/WEB-INF"
todir=
"${dist.ear.dir}/lib"
/>
<copyfiles
files=
"${file.reference.json-20160
212.jar}"
iftldtodir=
"${build.web.dir}/WEB-INF"
todir=
"${dist.ear.dir}/lib"
/>
<copyfiles
files=
"${file.reference.sqljdbc4
-2.0.jar}"
iftldtodir=
"${build.web.dir}/WEB-INF"
todir=
"${dist.ear.dir}/lib"
/>
<copyfiles
files=
"${file.reference.sqljdbc4
.jar}"
iftldtodir=
"${build.web.dir}/WEB-INF"
todir=
"${dist.ear.dir}/lib"
/>
<mkdir
dir=
"${build.web.dir}/META-INF"
/>
<mkdir
dir=
"${build.web.dir}/META-INF"
/>
<manifest
file=
"${build.web.dir}/META-INF/MANIFEST.MF"
mode=
"update"
/>
<manifest
file=
"${build.web.dir}/META-INF/MANIFEST.MF"
mode=
"update"
/>
</target>
</target>
<target
depends=
"init"
name=
"library-inclusion-in-archive"
unless=
"dist.ear.dir"
>
<target
depends=
"init"
name=
"library-inclusion-in-archive"
unless=
"dist.ear.dir"
>
<copyfiles
files=
"${file.reference.json-20160
810.jar}"
todir=
"${build.web.dir}/WEB-INF/lib"
/>
<copyfiles
files=
"${file.reference.json-20160
212.jar}"
todir=
"${build.web.dir}/WEB-INF/lib"
/>
<copyfiles
files=
"${file.reference.sqljdbc4
-2.0.jar}"
todir=
"${build.web.dir}/WEB-INF/lib"
/>
<copyfiles
files=
"${file.reference.sqljdbc4
.jar}"
todir=
"${build.web.dir}/WEB-INF/lib"
/>
</target>
</target>
<target
depends=
"init"
if=
"dist.ear.dir"
name=
"-clean-webinf-lib"
>
<target
depends=
"init"
if=
"dist.ear.dir"
name=
"-clean-webinf-lib"
>
<delete
dir=
"${build.web.dir}/WEB-INF/lib"
/>
<delete
dir=
"${build.web.dir}/WEB-INF/lib"
/>
...
...
nbproject/genfiles.properties
View file @
69bf0e82
build.xml.data.CRC32
=
4cd4cb5e
build.xml.data.CRC32
=
66ba06da
build.xml.script.CRC32
=
615931b7
build.xml.script.CRC32
=
615931b7
build.xml.stylesheet.CRC32
=
651128d4@1.77.1.1
build.xml.stylesheet.CRC32
=
651128d4@1.77.1.1
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/
build-impl.xml.data.CRC32
=
4cd4cb5e
nbproject/
build-impl.xml.data.CRC32
=
66ba06da
nbproject/
build-impl.xml.script.CRC32
=
efa11df6
nbproject/
build-impl.xml.script.CRC32
=
816bdc64
nbproject/
build-impl.xml.stylesheet.CRC32
=
99ea4b56@1.77.1.1
nbproject/
build-impl.xml.stylesheet.CRC32
=
99ea4b56@1.77.1.1
nbproject/project.properties
View file @
69bf0e82
...
@@ -28,8 +28,8 @@ dist.war=${dist.dir}/${war.name}
...
@@ -28,8 +28,8 @@ dist.war=${dist.dir}/${war.name}
endorsed.classpath
=
\
endorsed.classpath
=
\
${libs.javaee-endorsed-api-7.0.classpath}
${libs.javaee-endorsed-api-7.0.classpath}
excludes
=
excludes
=
file.reference.json-20160
810.jar
=
F:
\\
LIBRERIAS
\\
json-20160810.jar
file.reference.json-20160
212.jar=D:
\\
LIBRERIAS
\\
json-20160212.jar
file.reference.sqljdbc4
-2.0.jar
=
F:
\\
LIBRERIAS
\\
sqljdbc4-2.0.jar
file.reference.sqljdbc4
.jar
=
D:
\\
LIBRERIAS
\\
sqljdbc4.jar
includes
=
**
includes
=
**
j2ee.compile.on.save
=
true
j2ee.compile.on.save
=
true
j2ee.copy.static.files.on.save
=
true
j2ee.copy.static.files.on.save
=
true
...
@@ -44,8 +44,8 @@ j2ee.platform.wsit.classpath=
...
@@ -44,8 +44,8 @@ j2ee.platform.wsit.classpath=
j2ee.server.type=gfv3ee6
j2ee.server.type=gfv3ee6
jar.compress
=
false
jar.compress
=
false
javac.classpath
=
\
javac.classpath
=
\
${file.reference.json-20160
810.jar}:
\
${file.reference.json-20160
212.jar}:\
${file.reference.sqljdbc4
-2.0.jar}
${file.reference.sqljdbc4
.jar}
# Space-separated list of extra javac options
# Space-separated list of extra javac options
javac.compilerargs
=
javac.compilerargs
=
javac.debug=true
javac.debug=true
...
...
nbproject/project.xml
View file @
69bf0e82
...
@@ -7,11 +7,11 @@
...
@@ -7,11 +7,11 @@
<minimum-ant-version>
1.6.5
</minimum-ant-version>
<minimum-ant-version>
1.6.5
</minimum-ant-version>
<web-module-libraries>
<web-module-libraries>
<library
dirs=
"200"
>
<library
dirs=
"200"
>
<file>
${file.reference.json-20160
810.jar}
</file>
<file>
${file.reference.json-20160
212.jar}
</file>
<path-in-war>
WEB-INF/lib
</path-in-war>
<path-in-war>
WEB-INF/lib
</path-in-war>
</library>
</library>
<library
dirs=
"200"
>
<library
dirs=
"200"
>
<file>
${file.reference.sqljdbc4
-2.0.jar}
</file>
<file>
${file.reference.sqljdbc4
.jar}
</file>
<path-in-war>
WEB-INF/lib
</path-in-war>
<path-in-war>
WEB-INF/lib
</path-in-war>
</library>
</library>
</web-module-libraries>
</web-module-libraries>
...
...
src/java/demojsoncrud/beans/PersonaBean.java
View file @
69bf0e82
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package
demojsoncrud
.
beans
;
package
demojsoncrud
.
beans
;
import
java.io.Serializable
;
import
java.io.Serializable
;
...
...
src/java/demojsoncrud/dao/DAOFactory.java
View file @
69bf0e82
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package
demojsoncrud
.
dao
;
package
demojsoncrud
.
dao
;
import
demojsoncrud.sqlserverdao.SqlserverDAOFactory
;
import
demojsoncrud.sqlserverdao.SqlserverDAOFactory
;
/**
*
* @author Alonso
*/
public
abstract
class
DAOFactory
{
public
abstract
class
DAOFactory
{
public
static
final
int
SQL_SERVER
=
1
;
public
static
final
int
SQL_SERVER
=
1
;
...
...
src/java/demojsoncrud/dao/PersonaDAO.java
View file @
69bf0e82
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package
demojsoncrud
.
dao
;
package
demojsoncrud
.
dao
;
import
demojsoncrud.beans.PersonaBean
;
import
demojsoncrud.beans.PersonaBean
;
import
org.json.JSONObject
;
import
org.json.JSONObject
;
/**
*
* @author Alonso
*/
public
interface
PersonaDAO
{
public
interface
PersonaDAO
{
public
JSONObject
listarPersonaTest
();
public
JSONObject
listarPersonaTest
();
...
...
src/java/demojsoncrud/services/PersonaService.java
View file @
69bf0e82
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package
demojsoncrud
.
services
;
package
demojsoncrud
.
services
;
import
demojsoncrud.beans.PersonaBean
;
import
demojsoncrud.beans.PersonaBean
;
...
@@ -10,10 +5,6 @@ import demojsoncrud.dao.DAOFactory;
...
@@ -10,10 +5,6 @@ import demojsoncrud.dao.DAOFactory;
import
demojsoncrud.dao.PersonaDAO
;
import
demojsoncrud.dao.PersonaDAO
;
import
org.json.JSONObject
;
import
org.json.JSONObject
;
/**
*
* @author Alonso
*/
public
class
PersonaService
{
public
class
PersonaService
{
DAOFactory
daoFactory
=
DAOFactory
.
getDAOFactory
(
DAOFactory
.
SQL_SERVER
);
DAOFactory
daoFactory
=
DAOFactory
.
getDAOFactory
(
DAOFactory
.
SQL_SERVER
);
...
...
src/java/demojsoncrud/servlets/PersonaServlet.java
View file @
69bf0e82
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package
demojsoncrud
.
servlets
;
package
demojsoncrud
.
servlets
;
import
demojsoncrud.beans.PersonaBean
;
import
demojsoncrud.beans.PersonaBean
;
...
@@ -15,10 +10,6 @@ import javax.servlet.http.HttpServletRequest;
...
@@ -15,10 +10,6 @@ import javax.servlet.http.HttpServletRequest;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
org.json.JSONObject
;
import
org.json.JSONObject
;
/**
*
* @author Alonso
*/
public
class
PersonaServlet
extends
HttpServlet
{
public
class
PersonaServlet
extends
HttpServlet
{
@Override
@Override
...
...
src/java/demojsoncrud/sqlserverdao/PersonaSqlserverDAO.java
View file @
69bf0e82
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package
demojsoncrud
.
sqlserverdao
;
package
demojsoncrud
.
sqlserverdao
;
import
demojsoncrud.beans.PersonaBean
;
import
demojsoncrud.beans.PersonaBean
;
import
demojsoncrud.dao.PersonaDAO
;
import
demojsoncrud.dao.PersonaDAO
;
import
demojsoncrud.util
s.ResponseHelper
;
import
demojsoncrud.util
ities.ResponseHelper
;
import
java.sql.Connection
;
import
java.sql.Connection
;
import
java.sql.PreparedStatement
;
import
java.sql.PreparedStatement
;
import
java.sql.ResultSet
;
import
java.sql.ResultSet
;
...
@@ -16,10 +11,6 @@ import org.json.JSONArray;
...
@@ -16,10 +11,6 @@ import org.json.JSONArray;
import
org.json.JSONException
;
import
org.json.JSONException
;
import
org.json.JSONObject
;
import
org.json.JSONObject
;
/**
*
* @author Alonso
*/
public
class
PersonaSqlserverDAO
implements
PersonaDAO
{
public
class
PersonaSqlserverDAO
implements
PersonaDAO
{
@Override
@Override
...
...
src/java/demojsoncrud/sqlserverdao/SqlserverDAOFactory.java
View file @
69bf0e82
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package
demojsoncrud
.
sqlserverdao
;
package
demojsoncrud
.
sqlserverdao
;
import
demojsoncrud.dao.DAOFactory
;
import
demojsoncrud.dao.DAOFactory
;
...
@@ -11,10 +6,6 @@ import java.sql.Connection;
...
@@ -11,10 +6,6 @@ import java.sql.Connection;
import
java.sql.DriverManager
;
import
java.sql.DriverManager
;
import
java.sql.SQLException
;
import
java.sql.SQLException
;
/**
*
* @author Alonso
*/
public
class
SqlserverDAOFactory
extends
DAOFactory
{
public
class
SqlserverDAOFactory
extends
DAOFactory
{
public
static
Connection
obtenerConexion
(
String
base
)
{
public
static
Connection
obtenerConexion
(
String
base
)
{
...
@@ -22,7 +13,7 @@ public class SqlserverDAOFactory extends DAOFactory {
...
@@ -22,7 +13,7 @@ public class SqlserverDAOFactory extends DAOFactory {
if
(
base
.
equalsIgnoreCase
(
"demojsoncrud"
))
{
if
(
base
.
equalsIgnoreCase
(
"demojsoncrud"
))
{
String
user
=
"sa"
;
String
user
=
"sa"
;
String
pwd
=
"Saco1357$"
;
String
pwd
=
"Saco1357$"
;
String
url
=
"jdbc:sqlserver://
localhost:1433;databaseName=demojsoncrud"
;
String
url
=
"jdbc:sqlserver://
172.16.2.118:1433;databaseName=demojsoncrud"
;
String
driver
=
"com.microsoft.sqlserver.jdbc.SQLServerDriver"
;
String
driver
=
"com.microsoft.sqlserver.jdbc.SQLServerDriver"
;
try
{
try
{
Class
.
forName
(
driver
);
Class
.
forName
(
driver
);
...
...
src/java/demojsoncrud/utils/ResponseHelper.java
→
src/java/demojsoncrud/util
itie
s/ResponseHelper.java
View file @
69bf0e82
/*
package
demojsoncrud
.
utilities
;
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package
demojsoncrud
.
utils
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
org.json.JSONObject
;
import
org.json.JSONObject
;
/**
*
* @author Alonso
*/
public
class
ResponseHelper
implements
Serializable
{
public
class
ResponseHelper
implements
Serializable
{
private
JSONObject
data
;
private
JSONObject
data
;
...
...
web/js/pages/persona.js
View file @
69bf0e82
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
listarPersonaTest
();
listarPersonaTest
();
...
@@ -17,8 +10,6 @@ $(document).ready(function () {
...
@@ -17,8 +10,6 @@ $(document).ready(function () {
limpiarInputs
();
limpiarInputs
();
});
});
});
});
var
codigoPersona
;
var
codigoPersona
;
...
@@ -168,10 +159,8 @@ function editarPersona() {
...
@@ -168,10 +159,8 @@ function editarPersona() {
}
}
function
listarPersona
()
{
function
listarPersona
()
{
var
txt_criterio_busqueda
=
$
(
'#txt_criterio_busqueda'
).
val
().
trim
();
var
txt_criterio_busqueda
=
$
(
'#txt_criterio_busqueda'
).
val
().
trim
();
var
tabla_persona
=
$
(
'#tabla_persona'
).
DataTable
({
var
tabla_persona
=
$
(
'#tabla_persona'
).
DataTable
({
language
:
{
language
:
{
paginate
:
{
'next'
:
'→ '
,
'previous'
:
' ←'
},
paginate
:
{
'next'
:
'→ '
,
'previous'
:
' ←'
},
...
@@ -181,7 +170,9 @@ function listarPersona() {
...
@@ -181,7 +170,9 @@ function listarPersona() {
url
:
'../PersonaServlet?accion=listarPersona'
,
url
:
'../PersonaServlet?accion=listarPersona'
,
type
:
'POST'
,
type
:
'POST'
,
dataType
:
'json'
,
dataType
:
'json'
,
data
:
{
search
:
txt_criterio_busqueda
}
data
:
{
search
:
txt_criterio_busqueda
}
},
},
processing
:
true
,
processing
:
true
,
serverSide
:
true
,
serverSide
:
true
,
...
@@ -426,9 +417,6 @@ function MyValidate() {
...
@@ -426,9 +417,6 @@ function MyValidate() {
return
this
.
optional
(
element
)
||
/^
[
a-z
\s]
+$/i
.
test
(
value
);
return
this
.
optional
(
element
)
||
/^
[
a-z
\s]
+$/i
.
test
(
value
);
},
"Solo letras."
);
},
"Solo letras."
);
jQuery
.
validator
.
setDefaults
({
jQuery
.
validator
.
setDefaults
({
debug
:
true
,
debug
:
true
,
ignore
:
'input[type=hidden], .select2-search__field'
,
// ignore hidden fields
ignore
:
'input[type=hidden], .select2-search__field'
,
// ignore hidden fields
...
...
web/vistas/persona.jsp
View file @
69bf0e82
...
@@ -104,16 +104,11 @@
...
@@ -104,16 +104,11 @@
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-md-4"
>
<div
class=
"col-md-4"
>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<!--<div class="form-group has-error has-feedback">-->
<label
class=
"control-label display-block"
>
Número de documento:
<span
class=
"text-danger"
>
(*)
</span></label>
<label
class=
"control-label display-block"
>
Número de documento:
<span
class=
"text-danger"
>
(*)
</span></label>
<div
class=
"input-group"
>
<div
class=
"input-group"
>
<span
class=
"input-group-addon"
><i
class=
"icon-vcard"
></i></span>
<span
class=
"input-group-addon"
><i
class=
"icon-vcard"
></i></span>
<input
id=
"txt_numero_documento"
name=
"txt_numero_documento"
type=
"text"
class=
"form-control"
placeholder=
"Ingresar número de documento"
>
<input
id=
"txt_numero_documento"
name=
"txt_numero_documento"
type=
"text"
class=
"form-control"
placeholder=
"Ingresar número de documento"
>
</div>
</div>
<!-- <div class="form-control-feedback">
<i class="icon-cancel-circle2"></i>
</div>
<span class="help-block">Error input group helper</span>-->
</div>
</div>
</div>
</div>
<div
class=
"col-md-4"
>
<div
class=
"col-md-4"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment