Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
Asistencia
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
Billy Larru
Asistencia
Commits
1f31a56b
Commit
1f31a56b
authored
Aug 09, 2018
by
Billy Larru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usando handsontable
parent
636fe850
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
4 deletions
+58
-4
NewClass.java
src/main/java/asistencia/servlets/NewClass.java
+53
-0
proyectar_asistencia_policias.js
src/main/webapp/js/pages/proyectar_asistencia_policias.js
+0
-0
proyectarAsistenciaPolicias.jsp
src/main/webapp/vistas/proyectarAsistenciaPolicias.jsp
+5
-4
No files found.
src/main/java/asistencia/servlets/NewClass.java
0 → 100644
View file @
1f31a56b
/*
* 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
asistencia
.
servlets
;
import
java.util.HashMap
;
import
java.util.List
;
import
static
java
.
util
.
stream
.
Collectors
.
toList
;
import
org.json.JSONArray
;
import
org.json.JSONObject
;
public
class
NewClass
{
public
static
void
main
(
String
[]
args
)
{
JSONArray
arr
=
new
JSONArray
();
JSONObject
obj
=
new
JSONObject
();
obj
.
put
(
"nombre"
,
"billy"
);
obj
.
put
(
"apellido"
,
"larru"
);
arr
.
put
(
obj
);
JSONObject
obj2
=
new
JSONObject
();
obj2
.
put
(
"nombre"
,
"felipe"
);
obj2
.
put
(
"apellido"
,
"escala"
);
arr
.
put
(
obj2
);
JSONObject
obj3
=
new
JSONObject
();
obj3
.
put
(
"nombre"
,
""
);
obj3
.
put
(
"apellido"
,
"escala"
);
arr
.
put
(
obj3
);
System
.
out
.
println
(
arr
.
toList
().
get
(
0
).
getClass
().
getTypeName
());
List
<
HashMap
>
list
=
arr
.
toList
().
stream
().
filter
(
HashMap
.
class
::
isInstance
).
map
(
HashMap
.
class
::
cast
).
collect
(
toList
());
List
<
HashMap
<
String
,
String
>>
list2
=
(
List
<
HashMap
<
String
,
String
>>)(
Object
)
list
;
// list.stream().filter(h -> h.entrySet().stream().filter(e -> e.g) );
// HashMap<String, String> map = list.get(0);
// map.entrySet().stream().filter(e -> e.get)
// list2.forEach(h -> h.entrySet().stream().filter(e -> e.getKey().equals("nombre") &&!e.getValue().isEmpty()).forEach(e -> System.out.println("e="+e.getKey()+ " "+e.getValue())));
System
.
out
.
println
(
list
);
List
<
HashMap
<
String
,
String
>>
listmap
=
(
List
<
HashMap
<
String
,
String
>>)(
Object
)
arr
.
toList
();
listmap
.
forEach
(
h
->
h
.
entrySet
().
stream
()
.
filter
(
e
->
e
.
getKey
().
equals
(
"nombre"
)
&&
!
e
.
getValue
().
isEmpty
())
.
forEach
(
e
->
System
.
out
.
println
(
"k="
+
e
.
getKey
()+
", v="
+
e
.
getValue
()))
);
}
}
src/main/webapp/js/pages/proyectar_asistencia_policias.js
View file @
1f31a56b
This diff is collapsed.
Click to expand it.
src/main/webapp/vistas/proyectarAsistenciaPolicias.jsp
View file @
1f31a56b
...
...
@@ -51,8 +51,8 @@
<div
class=
"panel-heading"
>
<h6
class=
"panel-title"
style=
"font-size: 15px; font-family: inherit"
><i
class=
"icon icon-search4"
></i>
ASISTENCIAS PROYECTADAS
</h6>
</div>
<div>
<table
class=
"table table-responsive dataTable table-striped table-sm table-bordered"
id=
"tblAsistenciaPolicias"
>
<div
id=
"tblProyectado"
>
<!--
<table class="table table-responsive dataTable table-striped table-sm table-bordered" id="tblAsistenciaPolicias">
<thead>
<tr>
<th class="text-center">N°</th>
...
...
@@ -69,7 +69,7 @@
<tbody>
</tbody>
</table>
</table>
-->
</div>
</div>
</div>
...
...
@@ -83,11 +83,12 @@
<
%@
include
file=
"templates/footer-body.jsp"
%
>
<!--js de la pagina-->
<script
src=
"../plantilla/assets/js/plugins/ui/moment/moment.min.js"
type=
"text/javascript"
></script>
<script
type=
"text/javascript"
src=
"../plantilla/assets/js/plugins/pickers/daterangepicker.js"
></script>
<script
type=
"text/javascript"
src=
"../plantilla/assets/js/core/libraries/jquery_ui/widgets.min.js"
></script>
<script
src=
"../plantilla/assets/js/plugins/tables/datatables/datatables.min.js"
type=
"text/javascript"
></script>
<script
src=
"../js/lib/dataTables.rowsGroup.js"
type=
"text/javascript"
></script>
<script
type=
"text/javascript"
src=
"../plantilla/assets/js/plugins/tables/handsontable/handsontable.min.js"
></script>
<script
src=
"../js/pages/proyectar_asistencia_policias.js"
type=
"text/javascript"
></script>
<!--js-->
...
...
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