Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Binary file removed assets/img/favicon.ico
Binary file not shown.
Binary file removed assets/img/pre.png
Binary file not shown.
71 changes: 71 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<!-- By default, only the Clean and Build commands use this build script. -->
<!-- Commands such as Run, Debug, and Test only use this build script if -->
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project name="SimpleBlog" default="default" basedir=".">
<description>Builds, tests, and runs the project SimpleBlog.</description>
<import file="nbproject/build-impl.xml"/>
<!--

There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:

-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-dist: called before archive building
-post-dist: called after archive building
-post-clean: called after cleaning build products
-pre-run-deploy: called before deploying
-post-run-deploy: called after deploying

Example of pluging an obfuscator after the compilation could look like

<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>

For list of available properties check the imported
nbproject/build-impl.xml file.


Other way how to customize the build is by overriding existing main targets.
The target of interest are:

init-macrodef-javac: defines macro for javac compilation
init-macrodef-junit: defines macro for junit execution
init-macrodef-debug: defines macro for class debugging
do-dist: archive building
run: execution of project
javadoc-build: javadoc generation

Example of overriding the target for project execution could look like

<target name="run" depends="<PROJNAME>-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>

Notice that overridden target depends on jar target and not only on
compile target as regular run target does. Again, for list of available
properties which you can use check the target you are overriding in
nbproject/build-impl.xml file.

-->
</project>
2 changes: 2 additions & 0 deletions build/web/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Manifest-Version: 1.0

Empty file.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file added build/web/WEB-INF/classes/Controller/posting.class
Binary file not shown.
Binary file added build/web/WEB-INF/classes/model/Post.class
Binary file not shown.
Binary file added build/web/WEB-INF/classes/view/postView.class
Binary file not shown.
29 changes: 29 additions & 0 deletions build/web/WEB-INF/faces-config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version='1.0' encoding='UTF-8'?>
<faces-config version="2.2"
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">
<<<<<<< HEAD
<managed-bean>
<managed-bean-name>Post</managed-bean-name>
<managed-bean-class>model.Post</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope></managed-bean>
<managed-bean>
<managed-bean-name>postView</managed-bean-name>
<managed-bean-class>view.postView</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>postController</managed-bean-name>
<managed-bean-class>Controller.postController</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>posting</managed-bean-name>
<managed-bean-class>Controller.posting</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
=======

>>>>>>> 11656e32d318010d842163d5cab9dbaa7526e757
</faces-config>
11 changes: 11 additions & 0 deletions build/web/WEB-INF/sun-web.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD GlassFish Application Server 3.0 Servlet 3.0//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_3_0-0.dtd">
<sun-web-app error-url="">
<class-loader delegate="true"/>
<jsp-config>
<property name="keepgenerated" value="true">
<description>Keep a copy of the generated servlet class' java code.</description>
</property>
</jsp-config>
</sun-web-app>

24 changes: 24 additions & 0 deletions build/web/WEB-INF/web.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.1" 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-app_3_1.xsd">
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>faces/index.xhtml</welcome-file>
</welcome-file-list>
</web-app>
16 changes: 16 additions & 0 deletions build/web/admin_page.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
template="./template.xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html">
<ui:define name="title"><title>Simple Blog - Admin Page</title></ui:define>
<ui:define name="content">
<!-- Insert admin page here -->
</ui:define>
<ui:define name="jscript">
<h:outputScript library="js" name="./resources/js/fittext.js" />
<h:outputScript library="js" name="./resources/js/app.js" />
<h:outputScript library="js" name="./resources/js/respond.min.js" />
</ui:define>

</ui:composition>
18 changes: 18 additions & 0 deletions build/web/client_template.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
template="./template.xhtml">

<ui:define name="title">
title
</ui:define>

<ui:define name="content">
content
</ui:define>

<ui:define name="jscript">
jscript
</ui:define>

</ui:composition>
16 changes: 16 additions & 0 deletions build/web/editor_page.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
template="./template.xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html">
<ui:define name="title"><title>Simple Blog - Editor Page</title></ui:define>
<ui:define name="content">
<!-- Insert admin page here -->
</ui:define>
<ui:define name="jscript">
<h:outputScript library="js" name="./resources/js/fittext.js" />
<h:outputScript library="js" name="./resources/js/app.js" />
<h:outputScript library="js" name="./resources/js/respond.min.js" />
</ui:define>

</ui:composition>
Empty file added build/web/gfv3ee6.dpf
Empty file.
56 changes: 56 additions & 0 deletions build/web/index.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
template="./template.xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:f="http://xmlns.jcp.org/jsf/core">
<ui:define name="title"><title>Simple Blog</title></ui:define>
<ui:define name="content">
<div id="home">
<div class="posts">
<nav class="art-list">
<ul class="art-list-body">
<h:dataTable value="#{Pages.pagelist}" var="item">
<li class="art-list-item">
<div class="art-list-item-title-and-time">
<h2 class="art-list-title">
<h:commandLink action="post" id="#{item.id}">
<f:param name="id" value="#{item.id}" />
<h:outputText value="#{item.title}" />
</h:commandLink>
</h2>
<div class="art-list-time">
<h:outputText value="{item.date}">
<f:convertDateTime pattern="dd-mm-yyyy" />
</h:outputText>
</div>
</div>
<p>#{item.content}</p>
<p class="editable" id="#{item.id}">
<h:commandLink action="edit_post" id="#{item.id}">
<f:param name="id" value="#{item.id}" />
<h:outputText value="Edit" />
</h:commandLink> | <h:commandLink
action="#"
onclick="return confirm('Yakin ingin menghapus post ini?')"
><f:param value="#{item.id}" />
<h:outputText value="Hapus" />
</h:commandLink>
</p>
</li>
</h:dataTable>
</ul>
</nav>
</div>
</div>
</ui:define>
<ui:define name="jscript">
<h:outputScript library="js" name="resources/js/fittext.js" />
<script src="resources/js/fittext.js" type="text/javascript"></script>
<script src="resources/js/app.js" type="text/javascript"></script>
<h:outputScript library="js" name="resources/js/app.js" />
<h:outputScript library="js" name="resources/js/respond.min.js" />
<h:outputScript library="js" name="resources/js/post.js" />
</ui:define>
</ui:composition>
53 changes: 53 additions & 0 deletions build/web/new_post.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
template="./template.xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:f="http://xmlns.jcp.org/jsf/core">
<ui:define name="title"><title>Simple Blog - New Post</title></ui:define>

<ui:define name="content">
<article class="art simple post">


<h2 class="art-title" style="margin-bottom:40px">-</h2>

<div class="art-body">
<div class="art-body-inner">
<h2 style="text-align:center">Tambah Post</h2>
<div id="contact-area">
<h:form id="new_post">
<h:outputLabel for="Judul" >
<h:outputText value="Judul:" />
</h:outputLabel>
<h:inputText id="Judul" required="true" value="#{Pages.current_title}" />

<h:outputLabel for="Tanggal">
<h:outputText value="Tanggal:" />
</h:outputLabel>
<h:inputText id="Tanggal" required="true" value="#{Pages.current_date}" >
<f:validator validatorId="TanggalValidator" />
</h:inputText>

<h:outputLabel for="Konten">
<h:outputText value="Konten:" />
</h:outputLabel>
<h:inputText id="Konten" required="true" value="#{Pages.current_content}" >
</h:inputText>

<h:commandButton value="Simpan" action="#{Pages.newPost()}" />
</h:form>
</div>
</div>
</div>
</article>
</ui:define>
<ui:define name="jscript">
<h:outputScript library="js" name="./resources/js/fittext.js" />
<h:outputScript library="js" name="./resources/js/app.js" />
<h:outputScript library="js" name="./resources/js/respond.min.js" />
<h:outputScript library="js" name="./resources/js/formValidation.js" />
</ui:define>

</ui:composition>
Loading