Subversion Repositories WebE

Compare Revisions

Last modification

Ignore whitespace Rev 30 → Rev 31

/trunk/.settings/org.eclipse.wst.common.project.facet.core.xml
1,9 → 1,9
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime name="Apache Tomcat v6.0"/>
<fixed facet="jst.web"/>
<fixed facet="java"/>
<installed facet="java" version="1.6"/>
<installed facet="jst.web" version="2.5"/>
<installed facet="wst.jsdt.web" version="1.0"/>
<runtime name="Apache Tomcat v6.0" />
<fixed facet="jst.web" />
<fixed facet="java" />
<installed facet="java" version="1.6" />
<installed facet="jst.web" version="2.5" />
<installed facet="wst.jsdt.web" version="1.0" />
</faceted-project>
/trunk/.settings/.jsdtscope
1,12 → 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=""/>
<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>
/trunk/.settings/org.eclipse.wst.common.component
1,9 → 1,10
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="WebEngineeringProject">
<wb-resource deploy-path="/" source-path="/WebContent"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
<property name="context-root" value="WebEngineeringProject"/>
<property name="java-output-path" value="/WebEngineeringProject/build/classes"/>
</wb-module>
</project-modules>
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="WebEngineeringProject">
<wb-resource deploy-path="/" source-path="/WebContent"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/hibernate-src"/>
<property name="context-root" value="WebEngineeringProject"/>
<property name="java-output-path" value="/WebEngineeringProject/build/classes"/>
</wb-module>
</project-modules>
/trunk/.settings/org.eclipse.jdt.core.prefs
1,4 → 1,4
#Mon Dec 20 19:09:36 CET 2010
#Wed Dec 29 00:20:56 CET 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
276,7 → 276,7
org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
org.eclipse.jdt.core.formatter.tabulation.char=space
org.eclipse.jdt.core.formatter.tabulation.size=4
org.eclipse.jdt.core.formatter.tabulation.size=2
org.eclipse.jdt.core.formatter.use_on_off_tags=false
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
/trunk/.classpath
1,17 → 1,18
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<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.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v6.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="output" path="WebContent/WEB-INF/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="hibernate-src"/>
<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.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v6.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="output" path="WebContent/WEB-INF/classes"/>
</classpath>
/trunk/.project
1,36 → 1,44
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>WebEngineeringProject</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>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>WebEngineeringProject</name>
<comment></comment>
<projects>
<project>Hibernate3</project>
</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>
<linkedResources>
<link>
<name>hibernate-src</name>
<type>2</type>
<locationURI>WORKSPACE_LOC/Hibernate3/src</locationURI>
</link>
</linkedResources>
</projectDescription>
/trunk/hibernate.reveng.xml
2,12 → 2,12
<!DOCTYPE hibernate-reverse-engineering PUBLIC "-//Hibernate/Hibernate Reverse Engineering DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd" >
 
<hibernate-reverse-engineering>
<table-filter match-catalog="webengineering" match-name="action_type"/>
<table-filter match-catalog="webengineering" match-name="history"/>
<table-filter match-catalog="webengineering" match-name="object"/>
<table-filter match-catalog="webengineering" match-name="object_type"/>
<table-filter match-catalog="webengineering" match-name="relationship"/>
<table-filter match-catalog="webengineering" match-name="relationship_type"/>
<table-filter match-catalog="webengineering" match-name="term"/>
<table-filter match-catalog="webengineering" match-name="user"/>
<table-filter match-catalog="webengineering" match-name="action_type" />
<table-filter match-catalog="webengineering" match-name="history" />
<table-filter match-catalog="webengineering" match-name="object" />
<table-filter match-catalog="webengineering" match-name="object_type" />
<table-filter match-catalog="webengineering" match-name="relationship" />
<table-filter match-catalog="webengineering" match-name="relationship_type" />
<table-filter match-catalog="webengineering" match-name="term" />
<table-filter match-catalog="webengineering" match-name="user" />
</hibernate-reverse-engineering>
/trunk/src/hibernate.cfg.xml
3,38 → 3,36
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost/webengineering</property>
<property name="hibernate.connection.username">webEngineering</property>
<property name="connection.password">ontologie</property>
<property name="connection.pool_size">1</property>
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
<!-- Print all generated SQL to the console -->
<property name="show_sql">true</property>
<property name="format_sql">true</property>
<!--
<property name="connection.provider_class">
org.hibernate.connection.C3P0ConnectionProvider
</property>-->
<!-- C3P0 connection pool -->
<property name="hibernate.c3p0.min_size">5</property>
<property name="hibernate.c3p0.max_size">20</property>
<property name="hibernate.c3p0.timeout">300</property>
<property name="hibernate.c3p0.max_statements">50 </property>
<property name="hibernate.c3p0.idle_test_period">3000 </property>
<!--<property name="hbm2ddl.auto">create</property>-->
<mapping class="ch.ffhs.webE.domain.ActionType" />
<mapping class="ch.ffhs.webE.domain.History" />
<mapping class="ch.ffhs.webE.domain.Object" />
<mapping class="ch.ffhs.webE.domain.ObjectType" />
<mapping class="ch.ffhs.webE.domain.Relationship" />
<mapping class="ch.ffhs.webE.domain.RelationshipType" />
<mapping class="ch.ffhs.webE.domain.Term" />
<mapping class="ch.ffhs.webE.domain.User" />
</session-factory>
<session-factory>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
 
<property name="hibernate.connection.url">jdbc:mysql://localhost/webengineering</property>
<property name="hibernate.connection.username">webEngineering</property>
<property name="connection.password">ontologie</property>
 
<property name="connection.pool_size">1</property>
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
 
<!-- Print all generated SQL to the console -->
<property name="show_sql">true</property>
<property name="format_sql">true</property>
<!-- <property name="connection.provider_class"> org.hibernate.connection.C3P0ConnectionProvider
</property> -->
<!-- C3P0 connection pool -->
<property name="hibernate.c3p0.min_size">5</property>
<property name="hibernate.c3p0.max_size">20</property>
<property name="hibernate.c3p0.timeout">300</property>
<property name="hibernate.c3p0.max_statements">50 </property>
<property name="hibernate.c3p0.idle_test_period">3000 </property>
 
<!--<property name="hbm2ddl.auto">create</property> -->
<mapping class="ch.ffhs.webE.domain.ActionType" />
<mapping class="ch.ffhs.webE.domain.History" />
<mapping class="ch.ffhs.webE.domain.Object" />
<mapping class="ch.ffhs.webE.domain.ObjectType" />
<mapping class="ch.ffhs.webE.domain.Relationship" />
<mapping class="ch.ffhs.webE.domain.RelationshipType" />
<mapping class="ch.ffhs.webE.domain.Term" />
<mapping class="ch.ffhs.webE.domain.User" />
</session-factory>
</hibernate-configuration>
/trunk/src/struts.xml
3,82 → 3,96
"http://struts.apache.org/dtds/struts-2.0.dtd">
 
<struts>
<constant name="struts.devMode" value="true" /> <!-- activates debugging output -->
<!-- User environment -->
<package name="user" namespace="/user" extends="hibernate-default">
<constant name="struts.devMode" value="true" /> <!-- activates debugging output -->
 
<!-- User environment -->
<package name="user" namespace="/user" extends="hibernate-default">
<!-- Term management -->
<action name="termAddForm">
<result>/user/termAddForm.jsp</result>
</action>
</package>
<!-- Admin environment -->
<package name="admin" namespace="/admin" extends="hibernate-default">
<!-- User management -->
<action name="userAddForm">
<result>/admin/userAddForm.jsp</result>
</action>
<action name="doUserAdd" method="addOrUpdate" class="ch.ffhs.webE.action.UserAction">
<result name="success">/admin/userAdd.jsp</result>
</action>
<action name="userList" method="list" class="ch.ffhs.webE.action.UserAction">
<result name="success">/admin/userList.jsp</result>
</action>
<action name="deleteUser" method="delete" class="ch.ffhs.webE.action.UserAction">
<result name="success" type="redirect">/admin/userList</result>
</action>
<action name="editUser" method="edit" class="ch.ffhs.webE.action.UserAction">
<result name="success">/admin/userAddForm.jsp</result>
</action>
<!-- Relationship Type management -->
<action name="relTypeList" method="list" class="ch.ffhs.webE.action.RelationshipTypeAction">
<result name="success">/admin/relTypeList.jsp</result>
</action>
<action name="relTypeAddForm">
<result>/admin/relTypeAddForm.jsp</result>
</action>
<action name="doRelTypeAdd" method="addOrUpdate" class="ch.ffhs.webE.action.RelationshipTypeAction">
<result name="success" type="redirect">/admin/relTypeList</result>
</action>
<action name="deleteRelType" method="delete" class="ch.ffhs.webE.action.RelationshipTypeAction">
<result name="success" type="redirect">/admin/relTypeList</result>
</action>
<action name="editRelType" method="edit" class="ch.ffhs.webE.action.RelationshipTypeAction">
<result name="success">/admin/relTypeAddForm.jsp</result>
<result name="error">/admin/adminError.jsp</result>
</action>
</package>
<!-- Remaining environment of the session-->
<package name="default" namespace="" extends="hibernate-default">
<!-- Login -->
<action name="Login" method="doLogin" class="ch.ffhs.webE.action.LoginAction">
<result name="admin" type="redirect">/admin/main.jsp</result>
<result name="user" type="redirect">/user/main.jsp</result>
<result name="error" type="redirect">/index.jsp</result>
</action>
<action name="Logout" method="doLogout" class="ch.ffhs.webE.action.LoginAction">
<result name="success" type="redirect">/index.jsp</result>
</action>
</package>
 
<action name="doTermAdd" method="addOrUpdate"
class="ch.ffhs.webE.action.TermAction">
<result name="success">/user/termAdd.jsp</result>
</action>
</package>
 
<!-- Admin environment -->
<package name="admin" namespace="/admin" extends="hibernate-default">
 
<!-- User management -->
<action name="userAddForm">
<result>/admin/userAddForm.jsp</result>
</action>
 
<action name="doUserAdd" method="addOrUpdate"
class="ch.ffhs.webE.action.UserAction">
<result name="success">/admin/userAdd.jsp</result>
</action>
 
<action name="userList" method="list"
class="ch.ffhs.webE.action.UserAction">
<result name="success">/admin/userList.jsp</result>
</action>
 
<action name="deleteUser" method="delete"
class="ch.ffhs.webE.action.UserAction">
<result name="success" type="redirect">/admin/userList</result>
</action>
 
<action name="editUser" method="edit"
class="ch.ffhs.webE.action.UserAction">
<result name="success">/admin/userAddForm.jsp</result>
</action>
 
 
 
 
<!-- Relationship Type management -->
<action name="relTypeList" method="list"
class="ch.ffhs.webE.action.RelationshipTypeAction">
<result name="success">/admin/relTypeList.jsp</result>
</action>
 
<action name="relTypeAddForm">
<result>/admin/relTypeAddForm.jsp</result>
</action>
 
<action name="doRelTypeAdd" method="addOrUpdate"
class="ch.ffhs.webE.action.RelationshipTypeAction">
<result name="success" type="redirect">/admin/relTypeList</result>
</action>
 
<action name="deleteRelType" method="delete"
class="ch.ffhs.webE.action.RelationshipTypeAction">
<result name="success" type="redirect">/admin/relTypeList</result>
</action>
 
<action name="editRelType" method="edit"
class="ch.ffhs.webE.action.RelationshipTypeAction">
<result name="success">/admin/relTypeAddForm.jsp</result>
<result name="error">/admin/adminError.jsp</result>
</action>
 
</package>
 
 
 
 
<!-- Remaining environment of the session -->
<package name="default" namespace="" extends="hibernate-default">
 
<!-- Login -->
<action name="Login" method="doLogin" class="ch.ffhs.webE.action.LoginAction">
<result name="admin" type="redirect">/admin/main.jsp</result>
<result name="user" type="redirect">/user/main.jsp</result>
<result name="error" type="redirect">/index.jsp</result>
</action>
 
<action name="Logout" method="doLogout"
class="ch.ffhs.webE.action.LoginAction">
<result name="success" type="redirect">/index.jsp</result>
</action>
</package>
</struts>
/trunk/src/ch/ffhs/webE/dao/TermDAO.java
New file
0,0 → 1,46
package ch.ffhs.webE.dao;
 
import java.util.List;
 
import ch.ffhs.webE.domain.Term;
 
/**
* Defines methods all term DAO implementations must implement
*
* @author pelinux
*/
public interface TermDAO
{
/**
* @return
*/
List<Term> listTerm();
 
/**
* @param termName
* @return
*/
Term searchTerm(String termName);
 
/**
* Delete a term
*
* @param termId
* Term ID
*/
void deleteTerm(int termId);
 
/**
* @param termId
* @return
*/
Term listTermById(int termId);
 
/**
* Executes the query to save the term
*
* @param term
* Domain object to be saved
*/
void saveOrUpdate(Term term);
}
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: src/ch/ffhs/webE/dao/TermDAOImpl.java
===================================================================
--- src/ch/ffhs/webE/dao/TermDAOImpl.java (revision 0)
+++ src/ch/ffhs/webE/dao/TermDAOImpl.java (revision 31)
@@ -0,0 +1,145 @@
+package ch.ffhs.webE.dao;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.hibernate.Session;
+import org.hibernate.Transaction;
+
+import ch.ffhs.webE.domain.Term;
+
+import com.googlecode.s2hibernate.struts2.plugin.annotations.SessionTarget;
+import com.googlecode.s2hibernate.struts2.plugin.annotations.TransactionTarget;
+
+/**
+ * Implements the Database Access Object for terms
+ *
+ * @author Thomas Lahn
+ */
+public class TermDAOImpl implements TermDAO
+{
+ /**
+ * Database session
+ */
+ @SessionTarget
+ Session session;
+
+ /**
+ * Database transaction
+ */
+ @TransactionTarget
+ Transaction transaction;
+
+ /**
+ * Creates a list of all terms
+ *
+ * @return an ArrayList with all the users - in case of a problem, an empty
+ * list is returned
+ */
+ @SuppressWarnings("unchecked")
+ public List<Term> listTerm()
+ {
+ List<Term> term = null;
+ try
+ {
+ term = this.session.createQuery("FROM term").list(); //$NON-NLS-1$
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+
+ /*
+ * If no term was checked, return an empty list to mitigate null pointer
+ * exceptions
+ */
+ if (term == null)
+ {
+ term = new ArrayList<Term>();
+ }
+ return term;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see ch.ffhs.webE.dao.TermDAO#saveOrUpdate(ch.ffhs.webE.domain.Term)
+ */
+ public void saveOrUpdate(Term term)
+ {
+ try
+ {
+ this.session.saveOrUpdate(term);
+ }
+ catch (Exception e)
+ {
+ this.transaction.rollback();
+ e.printStackTrace();
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see ch.ffhs.webE.dao.TermDAO#deleteTerm(int)
+ */
+ public void deleteTerm(int termId)
+ {
+ try
+ {
+ Term user = (Term) this.session.get(Term.class, termId);
+ this.session.delete(user);
+ }
+ catch (Exception e)
+ {
+ this.transaction.rollback();
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Returns a single user with this user name (used for login)
+ *
+ * @param termName
+ * Term name
+ * @return User: Returns a user object if something is found. If not, null is
+ * returned
+ */
+ public Term searchTerm(String termName)
+ {
+ Term term = null;
+
+ /* Exec query */
+ try
+ {
+ term = (Term) this.session
+ .createQuery("FROM User " + "WHERE username = :username") //$NON-NLS-1$ //$NON-NLS-2$
+ .setParameter("username", termName).uniqueResult(); //$NON-NLS-1$
+ }
+ catch (Exception e)
+ {
+ /* TODO: Log error */
+ }
+ return term;
+ }
+
+ /**
+ * List a term by ID
+ *
+ * @param termId
+ * @return
+ */
+ public Term listTermById(int termId)
+ {
+ Term term = null;
+ try
+ {
+ term = (Term) this.session.get(Term.class, termId);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ return term;
+ }
+}
\ No newline at end of file
/src/ch/ffhs/webE/dao/TermDAOImpl.java
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: src/ch/ffhs/webE/action/TermAction.java
===================================================================
--- src/ch/ffhs/webE/action/TermAction.java (revision 0)
+++ src/ch/ffhs/webE/action/TermAction.java (revision 31)
@@ -0,0 +1,166 @@
+package ch.ffhs.webE.action;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.struts2.StrutsStatics;
+
+import ch.ffhs.webE.dao.TermDAO;
+import ch.ffhs.webE.dao.TermDAOImpl;
+import ch.ffhs.webE.domain.Term;
+
+import com.opensymphony.xwork2.Action;
+import com.opensymphony.xwork2.ActionContext;
+import com.opensymphony.xwork2.ActionSupport;
+import com.opensymphony.xwork2.ModelDriven;
+
+/**
+ * Implements actions applicable to term editing
+ *
+ * @author Thomas Lahn
+ */
+public class TermAction extends ActionSupport implements ModelDriven<Term>
+{
+ private static final long serialVersionUID = -6659925652584240539L;
+
+ private Term term = new Term();
+ private List<Term> termList = new ArrayList<Term>();
+ private final TermDAO termDAO = new TermDAOImpl();
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.opensymphony.xwork2.ModelDriven#getModel()
+ */
+ public Term getModel()
+ {
+ return this.term;
+ }
+
+ /**
+ * Executes the DB query to save the user
+ *
+ * @return {@link Action#SUCCESS}
+ */
+ public String addOrUpdate()
+ {
+ this.termDAO.saveOrUpdate(this.term);
+ return Action.SUCCESS;
+ }
+
+ /**
+ * DB query for userList
+ *
+ * @return SUCCESS
+ */
+ public String list()
+ {
+ this.termList = this.termDAO.listTerm();
+ return Action.SUCCESS;
+ }
+
+ /**
+ * @return {@link Action#SUCCESS} if <var>id</var> > 0, {@link Action#ERROR}
+ * otherwise
+ */
+ public String edit()
+ {
+ int id = this.getIdParameter();
+
+ if (id > 0)
+ {
+ this.term = this.termDAO.listTermById(id);
+ return Action.SUCCESS;
+ }
+ else
+ {
+ return Action.ERROR;
+ }
+ }
+
+ /**
+ * Gets the ID Parameter for update / delete requests
+ *
+ * @return int from the ID request. If not set or wrong, it gives back -1
+ */
+ private int getIdParameter()
+ {
+ HttpServletRequest request = (HttpServletRequest) ActionContext
+ .getContext().get(StrutsStatics.HTTP_REQUEST);
+
+ int id = -1;
+ try
+ {
+ id = Integer.parseInt(request.getParameter("id")); //$NON-NLS-1$
+ }
+ catch (Exception e)
+ {
+ /* TODO: Logging - wrong parameter set */
+ }
+
+ return id;
+ }
+
+ /**
+ * deletes a user, gets the ID from the "id" parameter that was submitted with
+ * the HTTP request
+ *
+ * @return String - either SUCCESS or ERROR constant
+ */
+ public String delete()
+ {
+
+ int id = this.getIdParameter();
+
+ /* Check for malicious ID values */
+ if (id > 0)
+ {
+ this.termDAO.deleteTerm(id);
+ return Action.SUCCESS;
+ }
+ else
+ {
+ return Action.ERROR;
+ }
+ }
+
+ /*
+ * Standard getters and setters
+ */
+
+ /**
+ * @return The term edited with this instance
+ */
+ public Term getTerm()
+ {
+ return this.term;
+ }
+
+ /**
+ * @param term
+ * The term edited with this instance
+ */
+ public void setTerm(Term term)
+ {
+ this.term = term;
+ }
+
+ /**
+ * @return The list of terms edited with this instance
+ */
+ public List<Term> getTermList()
+ {
+ return this.termList;
+ }
+
+ /**
+ * @param termList
+ * The list of terms edited with this instance
+ */
+ public void setTermList(List<Term> termList)
+ {
+ this.termList = termList;
+ }
+}
/src/ch/ffhs/webE/action/TermAction.java
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: WebContent/user/index.jsp
===================================================================
--- WebContent/user/index.jsp (revision 30)
+++ WebContent/user/index.jsp (revision 31)
@@ -1,21 +1,21 @@
-<%@ page errorPage="../ErrorHandler.jsp" %>
-<%@ include file="../html_head.jsp" %>
+<%@ page errorPage="../ErrorHandler.jsp"%>
+<%@ include file="../html_head.jsp"%>
- <%-- Only serves as a container for the different site elements!
+<%-- Only serves as a container for the different site elements!
Do not write any text directly into the container div! --%>
- <div id="page-container">
- <div id="header">
- <%@ include file="../header.jsp" %>
- </div>
-
- <div id="navbar">
- <%@ include file="nav.jsp" %>
- </div>
-
- <div id="content">
- <%@ include file="main.jsp" %>
- </div>
- </div>
-
+<div id="page-container">
+ <div id="header">
+ <%@ include file="../header.jsp"%>
+ </div>
+
+ <div id="navbar">
+ <%@ include file="nav.jsp"%>
+ </div>
+
+ <div id="content">
+ <%@ include file="main.jsp"%>
+ </div>
+</div>
+
</body>
</html>
/trunk/WebContent/user/termAdd.jsp
New file
0,0 → 1,17
<html>
<head>
<title>Term added</title>
</head>
<body>
 
<h1>
Begriff hinzugef&uuml;gt
</h1>
<p>
Der Begriff wurde hinzugef&uuml;gt
</p>
<p>
TODO: Weiterleitung!!
</p>
</body>
</html>
Property changes:
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: WebContent/user/main.jsp
===================================================================
--- WebContent/user/main.jsp (revision 30)
+++ WebContent/user/main.jsp (revision 31)
@@ -4,7 +4,9 @@
</head>
<body>
-<p>Willkommen im User-Bereich</p>
+ <p>
+ Willkommen im User-Bereich
+ </p>
</body>
</html>
/trunk/WebContent/user/nav.jsp
1,46 → 1,26
<div id="navigation">
<ul>
<li>
Ontologie
<ul>
<li>
<a href="">Ansehen</a>
</li>
</ul>
</li>
<li>
Begriffe
<ul>
<li>
<a href="termAddForm">Hinzuf&uuml;gen</a>
</li>
<li>
<a href="">&Auml;ndern, L&ouml;schen</a>
</li>
</ul>
</li>
<li>
Beziehungen
<ul>
<li>
<a href="">Hinzuf&uuml;gen</a>
</li>
<li>
<a href="">&Auml;ndern, L&ouml;schen</a>
</li>
</ul>
</li>
<li>
User-Settings
<ul>
<li>
<a href="../Logout">Logout</a>
</li>
</ul>
</li>
</ul>
<ul>
<li>Ontologie
<ul>
<li><a href="">Ansehen</a></li>
</ul></li>
 
<li>Begriffe
<ul>
<li><a href="termAddForm">Hinzuf&uuml;gen</a></li>
<li><a href="">&Auml;ndern, L&ouml;schen</a></li>
</ul></li>
 
<li>Beziehungen
<ul>
<li><a href="">Hinzuf&uuml;gen</a></li>
<li><a href="">&Auml;ndern, L&ouml;schen</a></li>
</ul></li>
 
<li>User-Settings
<ul>
<li><a href="../Logout">Logout</a></li>
</ul></li>
 
</ul>
</div>
/trunk/WebContent/user/termAddForm.jsp
1,14 → 1,16
<%@taglib uri="/struts-tags" prefix="s"%>
<html>
<head>
<title>Begriff erstellen</title>
</head>
<body>
<h1>Begriff hinzuf&uuml;gen</h1>
<s:form action="doUserAdd">
<s:hidden name="user.id" />
<s:textfield name="user.username" label="Name" />
<s:submit value="Add" />
</s:form>
</body>
<head>
<title>Begriff erstellen</title>
</head>
<body>
<h1>
Begriff hinzuf&uuml;gen
</h1>
<s:form action="doTermAdd">
<s:hidden name="term.id" />
<s:textfield name="term.username" label="Name" />
<s:submit value="Add" />
</s:form>
</body>
</html>
/trunk/WebContent/errorHandler.jsp
1,7 → 1,8
<?xml version="1.0" encoding="ISO-8859-1" ?>
<%@ page isErrorPage=true %>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="utf-8"%>
<%@page isErrorPage="true"%>
<%@page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="utf-8"
%>
<!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">
<head>
9,6 → 10,7
<title>Error page</title>
</head>
<body>
Die Seite hat einen Fehler verursacht. Bitte versuchen Sie es nochmals.
Die Seite hat einen Fehler verursacht. Bitte versuchen Sie es
nochmals.
</body>
</html>
/trunk/WebContent/decorators/mainTemplate.jsp
1,6 → 1,8
<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator"
prefix="decorator"
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
 
<c:set var="contextPath" value="${pageContext.request.contextPath}" />
<c:set var="requestURI" value="${pageContext.request.requestURI}" />
7,53 → 9,62
<c:set var="isUser" value="${fn:contains(requestURI, '/user/')}" />
<c:set var="isAdmin" value="${fn:contains(requestURI, '/admin/')}" />
 
<%@ page pageEncoding="UTF-8" %>
<%@ page pageEncoding="UTF-8"%>
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Ontologie - <decorator:title /></title>
<link rel="stylesheet" type="text/css" href="${contextPath}/resources/css/main.css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Ontologie - <decorator:title />
</title>
<link rel="stylesheet" type="text/css"
href="${contextPath}/resources/css/main.css"
/>
</head>
<body>
 
<%-- Only serves as a container for the different site elements!
Do not write any text directly into the page-container div! --%>
<div id="page-container">
<div id="header">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="header">
<tr>
<td>
&nbsp;
</td>
<td style="vertical-align:top;font-size:12pt;text-align:right;">
<div><strong>Semantic Web Project</strong><br />
by Michael Moos<br />
Thomas Lahn</div>
</td>
<td width="56" class="no_padding"><img src="${contextPath}/resources/images/ontology_logo.jpg" width="56" height="56" alt="logo" /></td>
</tr>
</table>
</div>
<!-- Load nav bars depending on the location -->
<c:if test="${isUser}">
<div id="navbar">
<%@ include file="/user/nav.jsp" %>
</div>
</c:if>
<c:if test="${isAdmin}">
<div id="navbar">
<%@ include file="/admin/nav.jsp" %>
</div>
</c:if>
<!-- Content DIV loaded via decorator -->
<div id="content">
<decorator:body />
</div>
<%-- Only serves as a container for the different site elements!
Do not write any text directly into the page-container div! --%>
<div id="page-container">
<div id="header">
<table width="100%" border="0" cellspacing="0" cellpadding="0"
class="header"
>
<tr>
<td>&nbsp;</td>
<td
style="vertical-align: top; font-size: 12pt; text-align: right;"
>
<div>
<strong>Semantic Web Project</strong><br /> by Michael
Moos<br /> Thomas Lahn
</div></td>
<td width="56" class="no_padding"><img
src="${contextPath}/resources/images/ontology_logo.jpg"
width="56" height="56" alt="logo"
/>
</td>
</tr>
</table>
</div>
 
<!-- Load nav bars depending on the location -->
<c:if test="${isUser}">
<div id="navbar">
<%@ include file="/user/nav.jsp"%>
</div>
</c:if>
<c:if test="${isAdmin}">
<div id="navbar">
<%@ include file="/admin/nav.jsp"%>
</div>
</c:if>
 
<!-- Content DIV loaded via decorator -->
<div id="content">
<decorator:body />
</div>
 
</div>
</body>
</html>
/trunk/WebContent/WEB-INF/web.xml
1,35 → 1,39
<?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" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
<display-name>WebEngineeringProject</display-name>
<!-- Start of SiteMesh stuff -->
<filter>
<filter-name>sitemesh</filter-name>
<filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern>*</url-pattern>
</filter-mapping>
<!-- End of SiteMesh stuff -->
<!-- Begin struts 2 -->
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- End struts 2 -->
 
 
<!-- Start of SiteMesh stuff -->
<filter>
<filter-name>sitemesh</filter-name>
<filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class>
</filter>
 
<filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern>*</url-pattern>
</filter-mapping>
<!-- End of SiteMesh stuff -->
 
 
<!-- Begin struts 2 -->
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- End struts 2 -->
 
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
 
</web-app>
/trunk/WebContent/WEB-INF/sitemesh-page.tld
3,93 → 3,93
 
<taglib>
 
<tlibversion>1.0</tlibversion>
<jspversion>1.1</jspversion>
<shortname>SiteMesh Page Tags</shortname>
<uri>sitemesh-page</uri>
<tlibversion>1.0</tlibversion>
<jspversion>1.1</jspversion>
<shortname>SiteMesh Page Tags</shortname>
<uri>sitemesh-page</uri>
 
<tag>
<name>applyDecorator</name>
<tagclass>com.opensymphony.module.sitemesh.taglib.page.ApplyDecoratorTag</tagclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>name</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>page</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>title</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>id</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>contentType</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<tag>
<name>applyDecorator</name>
<tagclass>com.opensymphony.module.sitemesh.taglib.page.ApplyDecoratorTag</tagclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>name</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>page</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>title</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>id</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>contentType</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>encoding</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
</tag>
 
<!-- Deprecated tag: use applyDecorator instead -->
<tag>
<name>apply-decorator</name>
<tagclass>com.opensymphony.module.sitemesh.taglib.page.ApplyDecoratorTag</tagclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>name</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>page</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>title</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>id</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<!-- Deprecated tag: use applyDecorator instead -->
<tag>
<name>apply-decorator</name>
<tagclass>com.opensymphony.module.sitemesh.taglib.page.ApplyDecoratorTag</tagclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>contentType</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<name>name</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>page</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>title</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>id</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>contentType</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>encoding</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
</tag>
 
<tag>
<name>param</name>
<tagclass>com.opensymphony.module.sitemesh.taglib.page.ParamTag</tagclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>name</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
<tag>
<name>param</name>
<tagclass>com.opensymphony.module.sitemesh.taglib.page.ParamTag</tagclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>name</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
 
</taglib>
/trunk/WebContent/WEB-INF/sitemesh.xml
1,50 → 1,60
<sitemesh>
 
<page-parsers>
<parser default="true" class="com.opensymphony.module.sitemesh.parser.DefaultPageParser" />
<parser content-type="text/html" class="com.opensymphony.module.sitemesh.parser.FastPageParser" />
</page-parsers>
<page-parsers>
<parser default="true"
class="com.opensymphony.module.sitemesh.parser.DefaultPageParser" />
<parser content-type="text/html"
class="com.opensymphony.module.sitemesh.parser.FastPageParser" />
</page-parsers>
 
<decorator-mappers>
<decorator-mappers>
 
<mapper class="com.opensymphony.module.sitemesh.mapper.PageDecoratorMapper">
<param name="property.1" value="meta.decorator" />
<param name="property.2" value="decorator" />
</mapper>
<mapper
class="com.opensymphony.module.sitemesh.mapper.PageDecoratorMapper">
<param name="property.1" value="meta.decorator" />
<param name="property.2" value="decorator" />
</mapper>
 
<mapper class="com.opensymphony.module.sitemesh.mapper.FrameSetDecoratorMapper">
</mapper>
<mapper
class="com.opensymphony.module.sitemesh.mapper.FrameSetDecoratorMapper">
</mapper>
 
<mapper class="com.opensymphony.module.sitemesh.mapper.AgentDecoratorMapper">
<param name="match.MSIE" value="ie" />
<param name="match.Mozilla [" value="ns" />
<param name="match.Opera" value="opera" />
<param name="match.Lynx" value="lynx" />
</mapper>
<mapper
class="com.opensymphony.module.sitemesh.mapper.AgentDecoratorMapper">
<param name="match.MSIE" value="ie" />
<param name="match.Mozilla [" value="ns" />
<param name="match.Opera" value="opera" />
<param name="match.Lynx" value="lynx" />
</mapper>
 
<mapper class="com.opensymphony.module.sitemesh.mapper.PrintableDecoratorMapper">
<param name="decorator" value="printable" />
<param name="parameter.name" value="printable" />
<param name="parameter.value" value="true" />
</mapper>
<mapper
class="com.opensymphony.module.sitemesh.mapper.PrintableDecoratorMapper">
<param name="decorator" value="printable" />
<param name="parameter.name" value="printable" />
<param name="parameter.value" value="true" />
</mapper>
 
<mapper class="com.opensymphony.module.sitemesh.mapper.RobotDecoratorMapper">
<param name="decorator" value="robot" />
</mapper>
<mapper
class="com.opensymphony.module.sitemesh.mapper.RobotDecoratorMapper">
<param name="decorator" value="robot" />
</mapper>
 
<mapper class="com.opensymphony.module.sitemesh.mapper.ParameterDecoratorMapper">
<param name="decorator.parameter" value="decorator" />
<param name="parameter.name" value="confirm" />
<param name="parameter.value" value="true" />
</mapper>
<mapper
class="com.opensymphony.module.sitemesh.mapper.ParameterDecoratorMapper">
<param name="decorator.parameter" value="decorator" />
<param name="parameter.name" value="confirm" />
<param name="parameter.value" value="true" />
</mapper>
 
<mapper class="com.opensymphony.module.sitemesh.mapper.FileDecoratorMapper">
</mapper>
<mapper
class="com.opensymphony.module.sitemesh.mapper.FileDecoratorMapper">
</mapper>
 
<mapper class="com.opensymphony.module.sitemesh.mapper.ConfigDecoratorMapper">
<param name="config" value="/WEB-INF/decorators.xml" />
</mapper>
<mapper
class="com.opensymphony.module.sitemesh.mapper.ConfigDecoratorMapper">
<param name="config" value="/WEB-INF/decorators.xml" />
</mapper>
 
</decorator-mappers>
</decorator-mappers>
 
</sitemesh>
/trunk/WebContent/WEB-INF/sitemesh-decorator.tld
3,77 → 3,77
 
<taglib>
 
<tlibversion>1.0</tlibversion>
<jspversion>1.1</jspversion>
<shortname>SiteMesh Decorator Tags</shortname>
<uri>sitemesh-decorator</uri>
<tlibversion>1.0</tlibversion>
<jspversion>1.1</jspversion>
<shortname>SiteMesh Decorator Tags</shortname>
<uri>sitemesh-decorator</uri>
 
<tag>
<name>head</name>
<tagclass>com.opensymphony.module.sitemesh.taglib.decorator.HeadTag</tagclass>
<bodycontent>JSP</bodycontent>
</tag>
<tag>
<name>head</name>
<tagclass>com.opensymphony.module.sitemesh.taglib.decorator.HeadTag</tagclass>
<bodycontent>JSP</bodycontent>
</tag>
 
<tag>
<name>body</name>
<tagclass>com.opensymphony.module.sitemesh.taglib.decorator.BodyTag</tagclass>
<bodycontent>JSP</bodycontent>
</tag>
<tag>
<name>body</name>
<tagclass>com.opensymphony.module.sitemesh.taglib.decorator.BodyTag</tagclass>
<bodycontent>JSP</bodycontent>
</tag>
 
<tag>
<name>title</name>
<tagclass>com.opensymphony.module.sitemesh.taglib.decorator.TitleTag</tagclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>default</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
<tag>
<name>title</name>
<tagclass>com.opensymphony.module.sitemesh.taglib.decorator.TitleTag</tagclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>default</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
 
<tag>
<name>getProperty</name>
<tagclass>com.opensymphony.module.sitemesh.taglib.decorator.PropertyTag</tagclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>property</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>default</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>writeEntireProperty</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
<tag>
<name>getProperty</name>
<tagclass>com.opensymphony.module.sitemesh.taglib.decorator.PropertyTag</tagclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>property</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>default</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>writeEntireProperty</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
 
<tag>
<name>usePage</name>
<tagclass>com.opensymphony.module.sitemesh.taglib.decorator.UsePageTag</tagclass>
<teiclass>com.opensymphony.module.sitemesh.taglib.decorator.UsePageTEI</teiclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>id</name>
<required>true</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
</tag>
<tag>
<name>usePage</name>
<tagclass>com.opensymphony.module.sitemesh.taglib.decorator.UsePageTag</tagclass>
<teiclass>com.opensymphony.module.sitemesh.taglib.decorator.UsePageTEI</teiclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>id</name>
<required>true</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
</tag>
 
<tag>
<name>useHtmlPage</name>
<tagclass>com.opensymphony.module.sitemesh.taglib.decorator.UsePageTag</tagclass>
<teiclass>com.opensymphony.module.sitemesh.taglib.decorator.UseHTMLPageTEI</teiclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>id</name>
<required>true</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
</tag>
<tag>
<name>useHtmlPage</name>
<tagclass>com.opensymphony.module.sitemesh.taglib.decorator.UsePageTag</tagclass>
<teiclass>com.opensymphony.module.sitemesh.taglib.decorator.UseHTMLPageTEI</teiclass>
<bodycontent>JSP</bodycontent>
<attribute>
<name>id</name>
<required>true</required>
<rtexprvalue>false</rtexprvalue>
</attribute>
</tag>
 
</taglib>
/trunk/WebContent/WEB-INF/decorators.xml
1,7 → 1,7
<decorators defaultdir="/decorators">
<decorator name="main" page="mainTemplate.jsp">
<pattern>*</pattern>
</decorator>
<decorator name="main" page="mainTemplate.jsp">
<pattern>*</pattern>
</decorator>
 
<!-- <decorator name="panel" page="main.jsp"/>-->
<!-- <decorator name="panel" page="main.jsp"/> -->
</decorators>
/trunk/WebContent/WEB-INF/lib/struts2-fullhibernatecore-plugin-1.4-GA-sources.zip
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/WebContent/admin/main.jsp
4,6 → 4,8
</head>
<body>
 
<p>Willkommen im Admin-Bereich</p>
<p>
Willkommen im Admin-Bereich
</p>
</body>
</html>
/trunk/WebContent/admin/nav.jsp
1,37 → 1,21
<div id="navigation">
<ul>
<li>
User
<ul>
<li>
<a href="userAddForm">Hinzuf&uuml;gen</a>
</li>
<li>
<a href="userList">&Auml;ndern, L&ouml;schen</a>
</li>
</ul>
</li>
<li>
Beziehungstypen
<ul>
<li>
<a href="relTypeAddForm">Hinzuf&uuml;gen</a>
</li>
<li>
<a href="relTypeList">&Auml;ndern, L&ouml;schen</a>
</li>
</ul>
</li>
<li>
User-Settings
<ul>
<li>
<a href="../Logout">Logout</a>
</li>
</ul>
</li>
</ul>
<ul>
<li>User
<ul>
<li><a href="userAddForm">Hinzuf&uuml;gen</a></li>
<li><a href="userList">&Auml;ndern, L&ouml;schen</a></li>
</ul></li>
 
<li>Beziehungstypen
<ul>
<li><a href="relTypeAddForm">Hinzuf&uuml;gen</a></li>
<li><a href="relTypeList">&Auml;ndern, L&ouml;schen</a></li>
</ul></li>
 
<li>User-Settings
<ul>
<li><a href="../Logout">Logout</a></li>
</ul></li>
 
</ul>
</div>
/trunk/WebContent/admin/userAdd.jsp
4,8 → 4,14
</head>
<body>
 
<h1>User hinzugef&uuml;gt</h1>
<p>Der Benutzer wurde hinzugef&uuml;gt</p>
<p>TODO: Weiterleitung!!</p>
<h1>
User hinzugef&uuml;gt
</h1>
<p>
Der Benutzer wurde hinzugef&uuml;gt
</p>
<p>
TODO: Weiterleitung!!
</p>
</body>
</html>
/trunk/WebContent/admin/relTypeAdd.jsp
4,8 → 4,14
</head>
<body>
 
<h1>Beziehungstyp hinzugef&uuml;gt</h1>
<p>Der Beziehungstyp wurde hinzugef&uuml;gt</p>
<p>TODO: Weiterleitung!!</p>
<h1>
Beziehungstyp hinzugef&uuml;gt
</h1>
<p>
Der Beziehungstyp wurde hinzugef&uuml;gt
</p>
<p>
TODO: Weiterleitung!!
</p>
</body>
</html>
/trunk/WebContent/admin/adminError.jsp
4,6 → 4,9
</head>
<body>
 
<p>Es ist ein Fehler aufgetreten. Bitte gehen Sie zurück und versuchen Sie es erneut. Wir bitten um Entschuldigung</p>
<p>
Es ist ein Fehler aufgetreten. Bitte gehen Sie zurück und versuchen
Sie es erneut. Wir bitten um Entschuldigung
</p>
</body>
</html>
/trunk/WebContent/resources/css/main.css
1,156 → 1,149
@charset "utf-8";
 
body, td {
font-family:Arial, Helvetica, sans-serif;
font-size:12px;
text-align:left;
body,td {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
text-align: left;
}
 
body {
margin: 0;
padding: 12px;
margin: 0;
padding: 12px;
}
 
h1 {
font-size: 21px;
margin-top: 0;
padding: 0;
font-size: 21px;
margin-top: 0;
padding: 0;
}
 
h2 {
font-size: 14px;
margin-top: 20px;
margin-bottom: 10px;
font-size: 14px;
margin-top: 20px;
margin-bottom: 10px;
}
 
h3 {
font-size:13px;
font-size: 13px;
}
 
img {
border:none;
border: none;
}
 
 
 
/*********************************************************************************
* Links
*/
 
a, a:link, a:visited, a:active {
color: #AA0000;
text-decoration: none;
a,a:link,a:visited,a:active {
color: #AA0000;
text-decoration: none;
}
 
a:hover {
color: #E30119;
text-decoration: underline;
color: #E30119;
text-decoration: underline;
}
 
a.button {
display: block;
font-weight: bold;
padding-top: 4px;
padding-left: 6px;
padding-bottom: 4px;
padding-right: 6px;
border-top: 1px solid #BBBBBB;
border-left: 1px solid #BBBBBB;
border-bottom: 1px solid #555555;
border-right: 1px solid #555555;
background-color: #CCCCCC;
text-decoration: none;
display: block;
font-weight: bold;
padding-top: 4px;
padding-left: 6px;
padding-bottom: 4px;
padding-right: 6px;
border-top: 1px solid #BBBBBB;
border-left: 1px solid #BBBBBB;
border-bottom: 1px solid #555555;
border-right: 1px solid #555555;
background-color: #CCCCCC;
text-decoration: none;
}
 
a.button:active {
text-decoration: none;
text-decoration: none;
}
 
a.button:visited {
text-decoration: none;
text-decoration: none;
}
 
a.button:hover {
background-color: #DDDDDD;
background-color: #DDDDDD;
}
 
 
/*********************************************************************************
* Table
*/
 
table {
margin: 5px 0 10px 0;
padding: 0;
margin: 5px 0 10px 0;
padding: 0;
}
 
table.no_margin {
margin: 0;
margin: 0;
}
 
td, th {
text-align: left;
vertical-align: top;
margin: 0;
padding: 0 10px 0 0;
td,th {
text-align: left;
vertical-align: top;
margin: 0;
padding: 0 10px 0 0;
}
 
/* style for listing tables */
table.list {
border-collapse: collapse;
border-collapse: collapse;
}
 
table.list td, table.list th {
margin: 0;
padding: 3px 30px 3px 1px;
border-bottom: 1px solid #EBEBED;
table.list td,table.list th {
margin: 0;
padding: 3px 30px 3px 1px;
border-bottom: 1px solid #EBEBED;
}
 
/* style for form tables */
table.form {
border-collapse: collapse;
border-collapse: collapse;
}
 
table.form td, table.form th {
margin: 0;
padding: 0 20px 6px 0;
table.form td,table.form th {
margin: 0;
padding: 0 20px 6px 0;
}
 
/* Header table */
table.header {
margin: 0;
margin: 0;
}
 
td.no_padding {
padding: 0;
padding: 0;
}
 
 
/*********************************************************************************
* Custom classes
*/
 
div#page-container {
width: 100%;
width: 100%;
}
 
div#header {
width: 100%;
padding: 0 0 15px 0;
border-bottom: #EBEBED 10px solid;
width: 100%;
padding: 0 0 15px 0;
border-bottom: #EBEBED 10px solid;
}
 
div#navbar {
float: left;
width: 200px;
padding: 15px 20px 0 0;
position:absolute;
float: left;
width: 200px;
padding: 15px 20px 0 0;
position: absolute;
}
 
div#content {
padding: 15px 0 10px 230px;
padding: 15px 0 10px 230px;
 
/*
/*
border-color:#F00;
border-style:solid;
border-width:thick;
158,146 → 151,140
}
 
.right {
text-align: right;
text-align: right;
}
 
span.normal {
font-weight: normal;
font-weight: normal;
}
 
/*********************************************************************************
* Login
*/
div#login {
background-color: #EBEBED;
width: 350px;
padding: 10px;
margin: auto;
margin-top: 50px;
text-align: center;
background-color: #EBEBED;
width: 350px;
padding: 10px;
margin: auto;
margin-top: 50px;
text-align: center;
}
 
p.login_failed {
color: #DD0000;
font-weight: bold;
background-color: #FFFFFF;
color: #DD0000;
font-weight: bold;
background-color: #FFFFFF;
}
 
input.login {
width: 200px;
width: 200px;
}
 
 
 
 
/*********************************************************************************
* Dialogs
*/
div.errormsg { /* Old version by Kevin */
font-weight: bold;
border: 2px solid black;
color: #DD0000;
position: fixed;
left:10px;
top: 10px;
padding-top: 20px;
padding-bottom: 20px;
margin-left:40%;
text-align: center;
font-size: 16px;
width: 20%;
font-weight: bold;
border: 2px solid black;
color: #DD0000;
position: fixed;
left: 10px;
top: 10px;
padding-top: 20px;
padding-bottom: 20px;
margin-left: 40%;
text-align: center;
font-size: 16px;
width: 20%;
}
 
#dialog {
font-weight: bold;
border: 5px solid #888888;
color: #000000;
position: absolute;
left: 30%;
top: 20px;
text-align: left;
padding: 10px 10px 10px 80px;
margin: 20px auto auto auto;
width: 40%;
background-color: #FFFFFF;
z-index: 1000;
font-weight: bold;
border: 5px solid #888888;
color: #000000;
position: absolute;
left: 30%;
top: 20px;
text-align: left;
padding: 10px 10px 10px 80px;
margin: 20px auto auto auto;
width: 40%;
background-color: #FFFFFF;
z-index: 1000;
}
 
#overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 500;
background-color: #EBEBED;
opacity: 0.7; /* for real browsers */
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=70)"; /* for IE 8 */
filter: alpha(opacity=70); /* for IE */
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 500;
background-color: #EBEBED;
opacity: 0.7; /* for real browsers */
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";
/* for IE 8 */
filter: alpha(opacity = 70); /* for IE */
}
 
 
/* Error dialog */
.dialog_error {
background: #FFFFFF url(../../resources/images/dialog_error.png) no-repeat 10px 10px;
background: #FFFFFF url(../../resources/images/dialog_error.png)
no-repeat 10px 10px;
}
 
/* Warning dialog */
.dialog_warning {
background: #FFFFFF url(../../resources/images/dialog_warning.png) no-repeat 10px 10px;
background: #FFFFFF url(../../resources/images/dialog_warning.png)
no-repeat 10px 10px;
}
 
/* Info dialog */
.dialog_info {
background: #FFFFFF url(../../resources/images/dialog_info.png) no-repeat 10px 10px;
background: #FFFFFF url(../../resources/images/dialog_info.png)
no-repeat 10px 10px;
}
 
/* Question dialog */
.dialog_question {
background: #FFFFFF url(../../resources/images/dialog_question.png) no-repeat 10px 10px;
background: #FFFFFF url(../../resources/images/dialog_question.png)
no-repeat 10px 10px;
}
 
/*Notification*/
.notificationIcon {
float:right;
float: right;
}
 
 
/* Title of dialog box */
#dialog_title {
float: left;
width: 100%;
margin: 0 0 10px 0;
padding: 0;
font-size: 14px;
font-weight: bold;
float: left;
width: 100%;
margin: 0 0 10px 0;
padding: 0;
font-size: 14px;
font-weight: bold;
}
 
/* Text of dialog box */
#dialog_text {
float: left;
width: 100%;
margin: 0 0 10px 0;
padding: 0;
font-size: 14px;
font-weight: normal;
float: left;
width: 100%;
margin: 0 0 10px 0;
padding: 0;
font-size: 14px;
font-weight: normal;
}
 
/* Buttons in dialog box */
#dialog_buttons {
width: 100%;
float: left;
text-align: right;
margin: 0;
padding: 10px 0 0 0;
width: 100%;
float: left;
text-align: right;
margin: 0;
padding: 10px 0 0 0;
}
 
 
/*********************************************************************************
* Navigation on the left side
*/
304,75 → 291,73
 
/* First level of navigation */
#navigation ul {
list-style-type: none;
list-style-image: none;
margin: 0;
padding: 0;
list-style-type: none;
list-style-image: none;
margin: 0;
padding: 0;
}
 
#navigation ul li {
border-bottom: #EBEBED 7px solid;
margin: 0;
padding: 5px 0 5px 1px;
font-weight: bold;
font-size: 13px;
border-bottom: #EBEBED 7px solid;
margin: 0;
padding: 5px 0 5px 1px;
font-weight: bold;
font-size: 13px;
}
 
/* Second level of navigation */
#navigation ul li ul {
padding: 3px 0 0 0;
padding: 3px 0 0 0;
}
 
#navigation ul li ul li {
border-bottom: none;
margin: 0;
padding: 3px 0 3px 7px;
font-weight: normal;
font-size: 12px;
border-bottom: none;
margin: 0;
padding: 3px 0 3px 7px;
font-weight: normal;
font-size: 12px;
}
 
/* Links in navigation area */
#navigation a {
text-decoration: none;
color: #333333;
text-decoration: none;
color: #333333;
}
 
#navigation a:active {
text-decoration: none;
color: #E30119;
text-decoration: none;
color: #E30119;
}
 
#navigation a:hover {
text-decoration: none;
color: #E30119;
text-decoration: none;
color: #E30119;
}
 
 
/*********************************************************************************
* General page formatting
*/
*/
p.main_hint {
font-weight: bold;
font-weight: bold;
}
 
p.sub_hint {
}
 
.hidden {
display: none;
display: none;
}
 
/*********************************************************************************
* Customer selection
*/
 
div.customer {
border-left: #EBEBED 5px solid;
padding: 0 5px 0 5px;
margin: 0 0 10px 0;
float: left;
width: 300px;
border-left: #EBEBED 5px solid;
padding: 0 5px 0 5px;
margin: 0 0 10px 0;
float: left;
width: 300px;
}
 
/*********************************************************************************
379,230 → 364,223
* Change Request
*/
table.change_request {
margin-left: -10px;
margin-left: -10px;
}
 
/*********************************************************************************
* Form fields
*/
.input_ro { /* read only input field */
border: 2px solid #EEEEEE;
background-color: #EEEEEE;
border: 2px solid #EEEEEE;
background-color: #EEEEEE;
}
 
.invalid { /* Fields containing invalid input */
border: 2px #FF0000 solid;
background-color: #FFDDDD;
border: 2px #FF0000 solid;
background-color: #FFDDDD;
}
 
 
/*********************************************************************************
* Shopping cart
*/
table.shopping_cart {
border-collapse: collapse;
border: 3px solid #EBEBED;
border-collapse: collapse;
border: 3px solid #EBEBED;
}
 
table.shopping_cart td {
padding: 3px 10px 3px 3px;
border-top: 1px solid #EBEBED;
padding: 3px 10px 3px 3px;
border-top: 1px solid #EBEBED;
}
 
table.shopping_cart tr.additional_info td {
border-top: none;
border-top: none;
}
 
table.shopping_cart td.right,
table.shopping_cart th.right {
padding-right: 20px;
table.shopping_cart td.right,table.shopping_cart th.right {
padding-right: 20px;
}
 
table.shopping_cart th {
padding: 3px 10px 3px 3px;
background-color: #EBEBED;
padding: 3px 10px 3px 3px;
background-color: #EBEBED;
}
 
/* Buttons "Place order and Request offer" */
table.shopping_cart div.button {
float: right;
margin: 7px 0 0 10px;
float: right;
margin: 7px 0 0 10px;
}
 
table.shopping_cart form {
margin: 0; padding: 0; /* Necessary for IE */
margin: 0;
padding: 0; /* Necessary for IE */
}
 
/* No padding-right for buttons in shopping cart */
table.shopping_cart th.buttons, th.buttons {
text-align: right;
padding-right: 0px;
table.shopping_cart th.buttons,th.buttons {
text-align: right;
padding-right: 0px;
}
 
/* Icon for opening additional info */
img.additional_info_icon {
width: 16px;
height: 16px;
padding: 0;
margin: 0 0 0 4px;
cursor: pointer;
vertical-align:text-top;
width: 16px;
height: 16px;
padding: 0;
margin: 0 0 0 4px;
cursor: pointer;
vertical-align: text-top;
}
 
/* Title "Important information" */
.additional_info_title {
font-weight: bold;
font-weight: bold;
}
 
/* Cells containing the additional info or the title of the info */
td.additional_info {
padding: 3px;
background-color: #FFFF99;
padding: 3px;
background-color: #FFFF99;
}
 
/* Actual text of additional info has to be a monospace font */
.additional_info_text {
font-family: "Courier New", Courier, monospace;
padding: 5px 0 0 0;
font-weight: bold;
font-family: "Courier New", Courier, monospace;
padding: 5px 0 0 0;
font-weight: bold;
}
 
/* Additional info, if a sparepart is not available (replacement part page) */
.additional_info_replacement {
padding: 3px;
background-color: #FFFF99;
font-family: "Courier New", Courier, monospace;
font-weight: bold;
padding: 3px;
background-color: #FFFF99;
font-family: "Courier New", Courier, monospace;
font-weight: bold;
}
 
/* deleted parts */
.part_deleted {
background-color: #FFBBBB;
background-color: #FFBBBB;
}
 
/* Arrow in empty shopping cart pointing to the entry form */
#arrow_left {
height: 38px;
padding-left: 45px;
background: url('../../resources/images/double_left_arrow.png') no-repeat 3px 3px;
height: 38px;
padding-left: 45px;
background: url('../../resources/images/double_left_arrow.png')
no-repeat 3px 3px;
}
 
/* Difference to minimum order value */
#order_diff th {
background-color: #FFCCCC;
color: #E30119;
background-color: #FFCCCC;
color: #E30119;
}
 
 
#shopping_cart_buttons {
width: 100%;
width: 100%;
}
 
.float_left {
float: left;
float: left;
}
 
.float_right {
float: right;
float: right;
}
 
 
/*********************************************************************************
* Filter
*/
 
#filter_list {
display: inline-block;
float: none;
display: inline-block;
float: none;
}
 
#filter_show label {
vertical-align: middle;
vertical-align: middle;
}
 
#filter_show fieldset {
padding: 5px;
padding: 5px;
}
 
#event_type_block {
width: 200px;
height: 80px;
float: left;
width: 200px;
height: 80px;
float: left;
}
 
#event_type_block select {
width: 150px;
width: 150px;
}
 
 
#user_id_block {
width: 200px;
height: 80px;
float: left;
width: 200px;
height: 80px;
float: left;
}
 
#selected_customer_block {
width: 200px;
height: 80px;
float: left;
width: 200px;
height: 80px;
float: left;
}
 
#date_filter_block {
width: 220px;
height: 80px;
float: left;
text-align: right;
width: 220px;
height: 80px;
float: left;
text-align: right;
}
 
#date_filter_block input {
padding-right: 5px;
padding-right: 5px;
}
 
 
#filter_spacer {
width: 10px;
height: 80px;
width: 10px;
height: 80px;
}
 
#filter_submit {
padding-top: 10px;
text-align: right;
padding-top: 10px;
text-align: right;
}
 
.event_list th {
text-align: left;
text-align: left;
}
 
.event_list td {
padding-right: 20px;
padding-right: 20px;
}
 
.event_selection_list{
width: 350px;
border: 1px solid black;
background-color: #EEEEEE;
position:absolute;
.event_selection_list {
width: 350px;
border: 1px solid black;
background-color: #EEEEEE;
position: absolute;
}
 
.event_selection_list_item {
padding: 2px;
cursor: pointer;
padding: 2px;
cursor: pointer;
}
 
.event_selection_list_item:hover , .event_selection_list_item_hover{
background-color: black;
color: white;
padding: 2px;
cursor: pointer;
.event_selection_list_item:hover,.event_selection_list_item_hover {
background-color: black;
color: white;
padding: 2px;
cursor: pointer;
}
 
.pager {
padding-top: 20px;
text-align: center;
padding-top: 20px;
text-align: center;
}
 
.pager span {
padding: 5px;
}
 
padding: 5px;
}