Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
latihanJavaServlet_Dwinowo_Muhammad
Project
Project
Details
Activity
Releases
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
Dwinowo Muhammad
latihanJavaServlet_Dwinowo_Muhammad
Commits
9b21ecf7
Commit
9b21ecf7
authored
Mar 24, 2022
by
Dwinowo Muhammad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pergantian tampilan di edit dan delete
parent
cf395d56
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
433 additions
and
92 deletions
+433
-92
delete.jsp
src/main/webapp/Latihan5/delete.jsp
+2
-14
edit.jsp
src/main/webapp/Latihan5/edit.jsp
+4
-17
insert.jsp
src/main/webapp/Latihan5/insert.jsp
+50
-8
viewSql.jsp
src/main/webapp/Latihan5/viewSql.jsp
+82
-53
cssLatihan5.css
src/main/webapp/css/Latihan5/cssLatihan5.css
+295
-0
No files found.
src/main/webapp/Latihan5/delete.jsp
View file @
9b21ecf7
...
...
@@ -8,26 +8,14 @@
<title>
Insert title here
</title>
</head>
<body>
<table
border=
"2"
>
<tr>
<th>
ID
</th>
<th>
Kode
</th>
<th>
Nama
</th>
</tr>
<%
Bank
bankBaru
=
(
Bank
)
request
.
getAttribute
(
"bankSatuan"
);
%>
<tr>
<td><%=
bankBaru
.
getId
()
%></td>
<td><%=
bankBaru
.
getKode
()
%></td>
<td><%=
bankBaru
.
getNama
()
%></td>
</tr>
</table>
Apakah anda yakin untuk menghapus data di atas?
<br/>
Apakah anda yakin untuk menghapus data bank dengan nama "
<%=
bankBaru
.
getNama
()
%>
"?
<br/>
<form
action=
"Delete"
method=
"post"
>
<input
type=
"hidden"
name=
"idBaru"
value=
"
<%=
bankBaru
.
getId
()
%>
"
>
...
...
src/main/webapp/Latihan5/edit.jsp
View file @
9b21ecf7
...
...
@@ -12,29 +12,16 @@
<title>
Insert title here
</title>
</head>
<body>
<table
border=
"2"
>
<tr>
<th>
ID
</th>
<th>
Kode
</th>
<th>
Nama
</th>
</tr>
<%
Bank
bankBaru
=
(
Bank
)
request
.
getAttribute
(
"bankSatuan"
);
%>
<tr>
<td><%=
bankBaru
.
getId
()
%></td>
<td><%=
bankBaru
.
getKode
()
%></td>
<td><%=
bankBaru
.
getNama
()
%></td>
</tr>
</table>
<form
action=
"Edit"
method=
"post"
>
Nama :
<input
type=
"text"
name=
"namaEdit"
><br/>
Kode :
<input
type=
"text"
name=
"kodeEdit"
><br/>
Nama :
<input
type=
"text"
name=
"namaEdit"
value=
"
<%=
bankBaru
.
getNama
()
%>
"
><br/>
Kode :
<input
type=
"text"
name=
"kodeEdit"
value=
"
<%=
bankBaru
.
getKode
()
%>
"
><br/>
<input
type=
"hidden"
name=
"idBaru"
value=
"
<%=
bankBaru
.
getId
()
%>
"
>
<input
type=
"submit"
value=
"Submit"
>
</form>
...
...
src/main/webapp/Latihan5/insert.jsp
View file @
9b21ecf7
<%@ page
language=
"java"
contentType=
"text/html; charset=ISO-8859-1"
pageEncoding=
"ISO-8859-1"
%>
pageEncoding=
"ISO-8859-1"
%>
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"ISO-8859-1"
>
<link
rel=
"stylesheet"
href=
"https://fonts.googleapis.com/css?family=Roboto|Varela+Round"
>
<link
rel=
"stylesheet"
href=
"https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"
>
<link
rel=
"stylesheet"
href=
"https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"
>
<link
rel=
"stylesheet"
href=
"css/Latihan5/cssLatihan5.css"
>
<title>
Insert title here
</title>
</head>
<body>
<form
name=
"insertForm"
method=
"post"
action=
"/latihanJavaServlet_Dwinowo_Muhammad/insertData"
>
Id :
<input
type=
"text"
name=
"id"
/><br/>
Kode :
<input
type=
"text"
name=
"kode"
/><br/>
Nama :
<input
type=
"text"
name=
"nama"
/><br/>
<input
type=
"submit"
value=
"Submit"
>
</form>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<form
name=
"insertForm"
method=
"post"
action=
"/latihanJavaServlet_Dwinowo_Muhammad/insertData"
>
<div
class=
"modal-header"
>
<h4
class=
"modal-title"
>
Tambah Data Bank
</h4>
</div>
<div
class=
"modal-body"
>
<div
class=
"form-group"
>
<label>
Id :
</label>
<input
placeholder=
"id bank"
type=
"text"
name=
"id"
class=
"form-control"
required=
"required"
>
</div>
<div
class=
"form-group"
>
<label>
Kode :
</label>
<input
placeholder=
"kode bank"
type=
"text"
name=
"kode"
class=
"form-control"
required=
"required"
>
</div>
<div
class=
"form-group"
>
<label>
Nama :
</label>
<input
placeholder=
"nama bank"
type=
"text"
name=
"nama"
class=
"form-control"
required=
"required"
>
</div>
<input
type=
"submit"
value=
"Submit"
class=
"tombolTambah"
>
<input
type=
"reset"
value=
"Reset"
class=
"tombolDelete"
>
<button
onclick=
"document.location='/latihanJavaServlet_Dwinowo_Muhammad/servletSql'"
class=
"tombolTambah"
>
Kembali
</button>
</div>
</form>
</div>
</div>
</body>
</html>
\ No newline at end of file
src/main/webapp/Latihan5/viewSql.jsp
View file @
9b21ecf7
...
...
@@ -9,64 +9,93 @@
<html>
<head>
<meta
charset=
"ISO-8859-1"
>
<title>
Insert title here
</title>
</head>
<body>
<form
action=
"Latihan5/insert.jsp"
method=
"post"
>
<input
type=
"submit"
value=
"Tambah Data"
>
</form>
<table
border=
"2"
>
<tr>
<th>
ID
</th>
<th>
Kode
</th>
<th>
Nama
</th>
<th>
Action
</th>
</tr>
<%
List
<
Bank
>
bankList
=
(
ArrayList
<
Bank
>
)
request
.
getAttribute
(
"bankList"
);
for
(
int
i
=
0
;
i
<
bankList
.
size
();
i
++)
{
%>
<tr>
<td><%=
bankList
.
get
(
i
).
getId
()
%></td>
<td><%=
bankList
.
get
(
i
).
getKode
()
%></td>
<td><%=
bankList
.
get
(
i
).
getNama
()
%></td>
<td>
<form
action=
"ViewSelectedEdit"
method=
"post"
>
<link
rel=
"stylesheet"
href=
"https://fonts.googleapis.com/css?family=Roboto|Varela+Round"
>
<link
rel=
"stylesheet"
href=
"https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"
>
<link
rel=
"stylesheet"
href=
"https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"
>
<link
rel=
"stylesheet"
href=
"css/Latihan5/cssLatihan5.css"
>
<input
type=
"hidden"
name=
"bankObjek"
value=
"
<%=
bankList
.
get
(
i
).
getId
()
%>
"
/>
<input
type=
"submit"
value=
"Edit"
>
</form>
<form
action=
"ViewSelectedDelete"
method=
"post"
>
<input
type=
"hidden"
name=
"bankObjek"
value=
"
<%=
bankList
.
get
(
i
).
getId
()
%>
"
/>
<input
type=
"submit"
value=
"Hapus"
>
</form>
</td>
</tr>
<%
}
%>
</table>
<title>
Insert title here
</title>
</head>
<body>
<div
class=
"container-xl"
>
<div
class=
"table-responsive"
>
<div
class=
"table-wrapper"
>
<div
class=
"table-title"
>
<div
class=
"row"
>
<div
class=
"col-sm-10"
>
<h2>
Daftar
<b>
Bank
</b>
</h2>
</div>
<div
class=
"col-sm-2"
>
<form
action=
"Latihan5/insert.jsp"
method=
"post"
>
<input
type=
"submit"
value=
"Tambah Data"
class=
"tombolTambah"
>
</form>
</div>
</div>
</div>
<table
class=
"table table-striped table-hover"
border=
"2"
>
<thead>
<tr>
<th>
ID
</th>
<th>
Kode
</th>
<th>
Nama
</th>
<th>
Action
</th>
</tr>
</thead>
<tbody>
<%
List
<
Bank
>
bankList
=
(
ArrayList
<
Bank
>
)
request
.
getAttribute
(
"bankList"
);
for
(
int
i
=
0
;
i
<
bankList
.
size
();
i
++)
{
%>
<tr>
<td><%=
bankList
.
get
(
i
).
getId
()
%></td>
<td><%=
bankList
.
get
(
i
).
getKode
()
%></td>
<td><%=
bankList
.
get
(
i
).
getNama
()
%></td>
<td>
<form
action=
"ViewSelectedEdit"
method=
"post"
>
<input
type=
"hidden"
name=
"bankObjek"
value=
"
<%=
bankList
.
get
(
i
).
getId
()
%>
"
/>
<input
type=
"submit"
value=
"Edit"
class=
"tombolEdit"
>
</form>
<form
action=
"ViewSelectedDelete"
method=
"post"
>
<input
type=
"hidden"
name=
"bankObjek"
value=
"
<%=
bankList
.
get
(
i
).
getId
()
%>
"
/>
<input
type=
"submit"
value=
"Hapus"
class=
"tombolDelete"
>
</form>
</td>
</tr>
<%
}
%>
</tbody>
</table>
</div>
</div>
</div>
</body>
</html>
\ No newline at end of file
src/main/webapp/css/Latihan5/cssLatihan5.css
0 → 100644
View file @
9b21ecf7
@charset
"ISO-8859-1"
;
body
{
color
:
#566787
;
background
:
#f5f5f5
;
font-family
:
'Varela Round'
,
sans-serif
;
font-size
:
13px
;
}
.tombolTambah
{
width
:
100%
;
background-color
:
#4CAF50
;
color
:
white
;
padding
:
7px
10px
;
margin
:
3px
0
;
border
:
none
;
border-radius
:
4px
;
cursor
:
pointer
;
}
.tombolTambah
:hover
{
background-color
:
#45a049
;
}
.tombolEdit
{
width
:
100%
;
background-color
:
#4CAF50
;
color
:
white
;
padding
:
7px
20px
;
margin
:
3px
0
;
border
:
none
;
border-radius
:
4px
;
cursor
:
pointer
;
}
.tombolEdit
:hover
{
background-color
:
#45a049
;
}
.tombolDelete
{
width
:
100%
;
background-color
:
#af4c4c
;
color
:
white
;
padding
:
7px
20px
;
margin
:
3px
0
;
border
:
none
;
border-radius
:
4px
;
cursor
:
pointer
;
}
.tombolDelete
:hover
{
background-color
:
#a04545
;
}
.table-responsive
{
margin
:
30px
0
;
}
.table-wrapper
{
background
:
#fff
;
padding
:
20px
25px
;
border-radius
:
3px
;
min-width
:
1000px
;
box-shadow
:
0
1px
1px
rgba
(
0
,
0
,
0
,
.05
);
}
.table-title
{
padding-bottom
:
15px
;
background
:
#435d7d
;
color
:
#fff
;
padding
:
16px
30px
;
min-width
:
100%
;
margin
:
-20px
-25px
10px
;
border-radius
:
3px
3px
0
0
;
}
.table-title
h2
{
margin
:
5px
0
0
;
font-size
:
24px
;
}
table
.table
tr
th
,
table
.table
tr
td
{
border-color
:
#e9e9e9
;
padding
:
12px
15px
;
vertical-align
:
middle
;
}
table
.table
tr
th
:first-child
{
width
:
60px
;
}
table
.table
tr
th
:last-child
{
width
:
100px
;
}
table
.table-striped
tbody
tr
:nth-of-type
(
odd
)
{
background-color
:
#fcfcfc
;
}
table
.table-striped.table-hover
tbody
tr
:hover
{
background
:
#f5f5f5
;
}
table
.table
th
i
{
font-size
:
13px
;
margin
:
0
5px
;
cursor
:
pointer
;
}
table
.table
td
:last-child
i
{
opacity
:
0.9
;
font-size
:
22px
;
margin
:
0
5px
;
}
table
.table
td
a
{
font-weight
:
bold
;
color
:
#566787
;
display
:
inline-block
;
text-decoration
:
none
;
outline
:
none
!important
;
}
table
.table
td
a
:hover
{
color
:
#2196F3
;
}
table
.table
td
a
.edit
{
color
:
#FFC107
;
}
table
.table
td
a
.delete
{
color
:
#F44336
;
}
table
.table
td
i
{
font-size
:
19px
;
}
table
.table
.avatar
{
border-radius
:
50%
;
vertical-align
:
middle
;
margin-right
:
10px
;
}
.pagination
{
float
:
right
;
margin
:
0
0
5px
;
}
.pagination
li
a
{
border
:
none
;
font-size
:
13px
;
min-width
:
30px
;
min-height
:
30px
;
color
:
#999
;
margin
:
0
2px
;
line-height
:
30px
;
border-radius
:
2px
!important
;
text-align
:
center
;
padding
:
0
6px
;
}
.pagination
li
a
:hover
{
color
:
#666
;
}
.pagination
li
.active
a
,
.pagination
li
.active
a
.page-link
{
background
:
#03A9F4
;
}
.pagination
li
.active
a
:hover
{
background
:
#0397d6
;
}
.pagination
li
.disabled
i
{
color
:
#ccc
;
}
.pagination
li
i
{
font-size
:
16px
;
padding-top
:
6px
}
.hint-text
{
float
:
left
;
margin-top
:
10px
;
font-size
:
13px
;
}
/* Custom checkbox */
.custom-checkbox
{
position
:
relative
;
}
.custom-checkbox
input
[
type
=
"checkbox"
]
{
opacity
:
0
;
position
:
absolute
;
margin
:
5px
0
0
3px
;
z-index
:
9
;
}
.custom-checkbox
label
:before
{
width
:
18px
;
height
:
18px
;
}
.custom-checkbox
label
:before
{
content
:
''
;
margin-right
:
10px
;
display
:
inline-block
;
vertical-align
:
text-top
;
background
:
white
;
border
:
1px
solid
#bbb
;
border-radius
:
2px
;
box-sizing
:
border-box
;
z-index
:
2
;
}
.custom-checkbox
input
[
type
=
"checkbox"
]
:checked
+
label
:after
{
content
:
''
;
position
:
absolute
;
left
:
6px
;
top
:
3px
;
width
:
6px
;
height
:
11px
;
border
:
solid
#000
;
border-width
:
0
3px
3px
0
;
transform
:
inherit
;
z-index
:
3
;
transform
:
rotateZ
(
45deg
);
}
.custom-checkbox
input
[
type
=
"checkbox"
]
:checked
+
label
:before
{
border-color
:
#03A9F4
;
background
:
#03A9F4
;
}
.custom-checkbox
input
[
type
=
"checkbox"
]
:checked
+
label
:after
{
border-color
:
#fff
;
}
.custom-checkbox
input
[
type
=
"checkbox"
]
:disabled
+
label
:before
{
color
:
#b8b8b8
;
cursor
:
auto
;
box-shadow
:
none
;
background
:
#ddd
;
}
/* Modal styles */
.modal
.modal-dialog
{
max-width
:
400px
;
}
.modal
.modal-header
,
.modal
.modal-body
,
.modal
.modal-footer
{
padding
:
20px
30px
;
}
.modal
.modal-content
{
border-radius
:
3px
;
font-size
:
14px
;
}
.modal
.modal-footer
{
background
:
#ecf0f1
;
border-radius
:
0
0
3px
3px
;
}
.modal
.modal-title
{
display
:
inline-block
;
}
.modal
.form-control
{
border-radius
:
2px
;
box-shadow
:
none
;
border-color
:
#dddddd
;
}
.modal
textarea
.form-control
{
resize
:
vertical
;
}
.modal
.btn
{
border-radius
:
2px
;
min-width
:
100px
;
}
.modal
form
label
{
font-weight
:
normal
;
}
\ No newline at end of file
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