Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
f6b3d85
Added Database Dump
eric2861994 Nov 22, 2014
11521c2
Mengubah menjadi project eclipse
eric2861994 Nov 22, 2014
1209406
Mengubah project menjadi eclipse v. 2
eric2861994 Nov 22, 2014
7a6b626
Dummy Login completed
eric2861994 Nov 22, 2014
2bad776
Database Connection
Nov 22, 2014
d5598da
Merge branch 'master' of https://github.com/IF3110-II-17/IF3110-02-Si…
Nov 22, 2014
7210568
Kok Error?
eric2861994 Nov 22, 2014
c46a96d
Tambahkan lib Java Connector
eric2861994 Nov 22, 2014
1ae1008
tes
gejedah Nov 22, 2014
989e2d9
Merge branch 'master' of
eric2861994 Nov 22, 2014
01f2c03
Udah bisa List Post
eric2861994 Nov 22, 2014
a365ba1
Merapikan kode dan hapus serializeable
Nov 23, 2014
0bb528f
tes stlh error
gejedah Nov 23, 2014
87d8293
coba yang kedua
gejedah Nov 23, 2014
299998a
Add post half done
Nov 23, 2014
1a58686
resolve conflict login
Nov 23, 2014
9b78086
yg ketiga kali
gejedah Nov 23, 2014
6e5e0ad
satu-satu
gejedah Nov 23, 2014
02f51a1
Tambahkan spec yang jelas
eric2861994 Nov 23, 2014
75f4dd4
Sempurnakan readme.md
eric2861994 Nov 23, 2014
745b785
readme lagi
eric2861994 Nov 23, 2014
88c1d98
readme
eric2861994 Nov 23, 2014
156f99e
Add post edit
Nov 23, 2014
b967915
Merge branch 'master' of https://github.com/IF3110-II-17/IF3110-02-Si…
Nov 23, 2014
1ff267c
Add Post selesai dengna validasi
Nov 24, 2014
b4cf9fc
ViewPost sudah dapat berjalan dengan baik
Nov 24, 2014
4fa389f
Edit pindah page ke view post di index
Nov 24, 2014
6c21467
Edit post done
Nov 24, 2014
63b004c
Delete, Undelete, Publish, and Unpublish Post's Bean
Nov 25, 2014
99fdc1b
CRUD user selain change username dan password
Nov 25, 2014
28841ac
Ubah dikit
eric2861994 Nov 25, 2014
99bc60e
Merge branch 'master' of https://github.com/IF3110-II-17/IF3110-02-Si…
eric2861994 Nov 25, 2014
ec74e9e
edit readme lagi
eric2861994 Nov 25, 2014
cd14443
readme
eric2861994 Nov 25, 2014
e3e16be
+user management
eric2861994 Nov 25, 2014
241c2bb
CSS dan buat template
Nov 25, 2014
e64408a
resolve conflict
Nov 25, 2014
0593904
Ubah template supaya bisa ubah title
Nov 25, 2014
c1da202
Komentar
eric2861994 Nov 25, 2014
b9de060
Merge branch 'master' of
eric2861994 Nov 25, 2014
4c34012
clone ketiga x
gejedah Nov 25, 2014
e156f35
Navigation Bar
Nov 25, 2014
90c8b49
Merge branch 'master' of https://github.com/IF3110-II-17/IF3110-02-Si…
Nov 25, 2014
5cd76a3
View Post now with comment
eric2861994 Nov 25, 2014
588c73a
Merge branch 'master' of https://github.com/IF3110-II-17/IF3110-02-Si…
eric2861994 Nov 25, 2014
b00a501
Escape special char untuk add dan edit post
Nov 25, 2014
80ed0f7
kali ne addpost
gejedah Nov 25, 2014
f75ee78
Merge branch 'master' of https://github.com/IF3110-II-17/IF3110-02-Si…
gejedah Nov 25, 2014
49cc34b
Validate email
eric2861994 Nov 25, 2014
57c4349
Merge branch 'master' of https://github.com/IF3110-II-17/IF3110-02-Si…
eric2861994 Nov 25, 2014
390b63c
Update readme.md
eric2861994 Nov 25, 2014
80b1f44
Update readme.md
eric2861994 Nov 25, 2014
784bd88
dump sql baru
eric2861994 Nov 25, 2014
1ade4dd
Style comment
Nov 25, 2014
b90577d
myPost
eric2861994 Nov 26, 2014
a5db30e
Merge branch 'master' of https://github.com/IF3110-II-17/IF3110-02-Si…
eric2861994 Nov 26, 2014
5a810b0
Nambah my post
eric2861994 Nov 26, 2014
6efa3f2
Cookie
Nov 26, 2014
cfd5531
Mulai buat list post owner
Nov 26, 2014
6dc4f39
validator dengan ajax murni + servlet murni
eric2861994 Nov 26, 2014
5d92431
Resolve Confilct
Nov 26, 2014
72ddf66
resolve conflict database object
Nov 26, 2014
7efa1eb
Panel Owner beres
Nov 26, 2014
f7041f7
commit j dulu
gejedah Nov 26, 2014
5bf8c3d
Merge branch 'master' of https://github.com/IF3110-II-17/IF3110-02-Si…
gejedah Nov 26, 2014
6e644b6
"terpaksa begitu"
gejedah Nov 26, 2014
1f7c524
percantik tampilan
gejedah Nov 26, 2014
e540dbf
gitu toh
gejedah Nov 27, 2014
6a850dc
secara umum sudah
gejedah Nov 27, 2014
690632d
konfirmasi delete
gejedah Nov 27, 2014
ed9fe38
debug
eric2861994 Nov 29, 2014
252c9bb
cuma nambah hard delete
gejedah Nov 29, 2014
13e0575
edit readme, jangan marah y
gejedah Nov 29, 2014
8f87c9c
Perbaiki Add/Edit post serta CRUD.
eric2861994 Nov 29, 2014
4c6df48
Query Edit Post salah
Nov 30, 2014
45f7a83
Tambal Ban dulu..
eric2861994 Nov 30, 2014
93c2c11
edit dikit
eric2861994 Nov 30, 2014
6a1dfab
menambahkan pelindung ke halaman agar tidak diakses secara sembarang
eric2861994 Nov 30, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src" />
<classpathentry kind="con"
path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v7.0">
<attributes>
<attribute name="owner.project.facets" value="jst.web" />
</attributes>
</classpathentry>
<classpathentry kind="con"
path="org.eclipse.jst.j2ee.internal.web.container" />
<classpathentry kind="con"
path="org.eclipse.jst.j2ee.internal.module.container" />
<classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="owner.project.facets" value="java" />
</attributes>
</classpathentry>
<classpathentry kind="con"
path="org.eclipse.jdt.USER_LIBRARY/JSF-2.2-Library">
<attributes>
<attribute name="org.eclipse.jst.component.nondependency"
value="" />
<attribute name="owner.project.facets" value="jst.jsf" />
</attributes>
</classpathentry>
<classpathentry kind="output" path="build/classes" />
</classpath>
2 changes: 2 additions & 0 deletions .metadata/WebContent/WEB-INF/faces-config.pageflow
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<pageflow:Pageflow xmlns:pageflow="http://www.sybase.com/suade/pageflow" id="pf13892921222642" configfile="/IF3110-02-Simple-Blog-Java/WebContent/WEB-INF/faces-config.xml"/>
36 changes: 36 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>wbd_tubes</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>
</projectDescription>
15 changes: 15 additions & 0 deletions .settings/.jsdtscope
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="WebContent" />
<classpathentry kind="con"
path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER" />
<classpathentry kind="con"
path="org.eclipse.wst.jsdt.launching.WebProject">
<attributes>
<attribute name="hide" value="true" />
</attributes>
</classpathentry>
<classpathentry kind="con"
path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary" />
<classpathentry kind="output" path="" />
</classpath>
7 changes: 7 additions & 0 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.7
10 changes: 10 additions & 0 deletions .settings/org.eclipse.wst.common.component
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="wbd_tubes">
<wb-resource deploy-path="/" source-path="/WebContent"
tag="defaultRootSource" />
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src" />
<property name="java-output-path" value="/wbd_tubes/build/classes" />
<property name="context-root" value="wbd_tubes" />
</wb-module>
</project-modules>
7 changes: 7 additions & 0 deletions .settings/org.eclipse.wst.common.project.facet.core.prefs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<root>
<facet id="jst.jsf">
<node name="libprov">
<attribute name="provider-id" value="jsf-user-library-provider" />
</node>
</facet>
</root>
11 changes: 11 additions & 0 deletions .settings/org.eclipse.wst.common.project.facet.core.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime name="Apache Tomcat v7.0" />
<fixed facet="jst.web" />
<fixed facet="java" />
<fixed facet="wst.jsdt.web" />
<installed facet="jst.web" version="3.0" />
<installed facet="wst.jsdt.web" version="1.0" />
<installed facet="jst.jsf" version="2.2" />
<installed facet="java" version="1.7" />
</faceted-project>
1 change: 1 addition & 0 deletions .settings/org.eclipse.wst.jsdt.ui.superType.container
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.eclipse.wst.jsdt.launching.baseBrowserLibrary
1 change: 1 addition & 0 deletions .settings/org.eclipse.wst.jsdt.ui.superType.name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Window
3 changes: 3 additions & 0 deletions WebContent/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Class-Path:

13 changes: 13 additions & 0 deletions WebContent/WEB-INF/faces-config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<faces-config xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd"
version="2.2">
<!-- Empty for now. There are many uses for faces-config.xml, but the most
common are navigation rules (instead of having the return value of the "action"
method be the base filename), bean declarations (instead of using @ManagedBean),
and properties files (aka resource bundles). If you are not using faces-config.xml,
it is perfectly legal to omit the file entirely. But, most people prefer
to have a blank one already in their project for later use. From JSF 2 and
PrimeFaces tutorial at http://www.coreservlets.com/JSF-Tutorial/jsf2/ -->
</faces-config>
Binary file added WebContent/WEB-INF/lib/javax.faces-2.2.8.jar
Binary file not shown.
Binary file not shown.
26 changes: 26 additions & 0 deletions WebContent/WEB-INF/web.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<context-param>
<description>State saving method: 'client' or 'server' (default). See JSF Specification section 2.5.2</description>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
<session-config>
<session-timeout>-1</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>index.jsf</welcome-file>
</welcome-file-list>
</web-app>
46 changes: 46 additions & 0 deletions WebContent/add_post.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<ui:composition template="common.xhtml"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
<ui:define name="content">
<f:metadata>
<f:event type="preRenderView" listener="#{userData.check(14, 'index.jsf')}" />
</f:metadata>
<div class="col-lg-offset-4 col-lg-4"
style="border: 5px solid blue; margin-top: 5%; border-radius: 10px;">
<h2 align="center">Add Post</h2>
<div align="center">
<h:form>
<div class="row">
<span class="col-lg-2">Judul</span> <span class="col-lg-10">:
<h:inputText value="#{addPost.title}" />
</span>
</div>
<br />
<div class="row">
<span class="col-lg-2">Tanggal</span> <span class="col-lg-10">:
<h:inputText id="dateInput" value="#{addPost.date}"
converter="dateConverter"
converterMessage="Format tanggal dalam bentuk yyyy-MM-dd dan lebih besar dari hari ini" />
</span>
</div>
<br />
<div class="row">
<span class="col-lg-2">Konten</span> <span class="col-lg-10">:
<h:inputTextarea rows="5" cols="22" style="resize:none;"
value="#{addPost.content}" />
</span>
</div>
<h:commandButton class="kumpul" value="Submit"
action="#{addPost.execute}" />
</h:form>
<h:message for="dateInput" style="color:red" />
</div>
</div>
</ui:define>
</ui:composition>
25 changes: 25 additions & 0 deletions WebContent/common.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:f="http://xmlns.jcp.org/jsf/core">
<h:head>
<title><ui:insert name="title">Simple Blog</ui:insert></title>
<f:metadata>
<f:event type="preRenderView" listener="#{userData.checkCookie}" />
</f:metadata>
<link href="./css/bootstrap.css" rel="stylesheet" type="text/css" />
</h:head>
<h:body>
<ui:insert name="header">
<ui:include src="header.xhtml" />
</ui:insert>
<ui:insert name="navigation">
<ui:include src="navigation_bar.xhtml" />
</ui:insert>
<ui:insert name="content">
<ui:include src="contents.xhtml" />
</ui:insert>
</h:body>
</html>
6 changes: 6 additions & 0 deletions WebContent/contents.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
<h1 class="text-center">This page is not available</h1>
</ui:composition>
76 changes: 76 additions & 0 deletions WebContent/crud.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">

<ui:composition template="common.xhtml">

<ui:define name="header">
<div class="bag-atas">
<h1 class="col-lg-offset-1 col-lg-6 title">Simple-Blog</h1>
<div class="col-lg-offset-3 col-lg-2 allign-right"
style="padding: 2%">
<h:outputText value="#{userData.loginLink}" escape="false" />
</div>
</div>
</ui:define>
<ui:define name="content">
<f:metadata>
<f:event type="preRenderView"
listener="#{userData.check(8, 'index.jsf')}" />
</f:metadata>
<table class="table table-striped table-bordered">
<tr>
<th>ID</th>
<th>Username</th>
<th>Password</th>
<th>Name</th>
<th>e-mail</th>
<th>role</th>
<th colspan="2">Commands</th>
</tr>
<ui:repeat value="#{databaseObject.userList}" var="user">
<h:panelGroup rendered="#{user.userId!=user_id}">
<tr>
<td>#{user.userId}</td>
<td>#{user.username}</td>
<td>#{user.password}</td>
<td>#{user.name}</td>
<td>#{user.email}</td>
<td>#{user.strRole}</td>
<td><h:form>
<h:commandButton value="Delete"
action="#{editUser.deleteUser(user.userId)}" />
</h:form></td>
<td><h:button value="Edit" outcome="edit_user.jsf">
<f:param name="user_id" value="#{user.userId}" />
<f:param name="user_username" value="#{user.username}" />
<f:param name="user_password" value="#{user.password}" />
<f:param name="user_name" value="#{user.name}" />
<f:param name="user_email" value="#{user.email}" />
<f:param name="user_role" value="#{user.strRole}" />
</h:button></td>
</tr>
</h:panelGroup>
</ui:repeat>
<tr>
<h:form>
<td></td>
<td><h:inputText value="#{editUser.username}" /></td>
<td><h:inputText value="#{editUser.password}" /></td>
<td><h:inputText value="#{editUser.name}" /></td>
<td><h:inputText value="#{editUser.email}" /></td>
<td><h:selectOneMenu value="#{editUser.role}">
<f:selectItem itemLabel="Regular" itemValue="10" />
<f:selectItem itemLabel="Editor" itemValue="20" />
<f:selectItem itemLabel="Admin" itemValue="30" />
</h:selectOneMenu></td>
<td><h:commandButton value="Add" action="#{editUser.addUser}" /></td>
</h:form>
</tr>
</table>
</ui:define>
</ui:composition>
</html>
Loading