Update - Part2 - test

master
ff2009 2015-12-08 22:29:18 +00:00
parent a7cc3b520f
commit 6bd17ce406
82 changed files with 6 additions and 1674 deletions

View File

@ -1,4 +0,0 @@
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.9.4
Created-By: 1.8.0_66-b17 (Oracle Corporation)

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
<persistence-unit name="ProjectDAE-ejbPU" transaction-type="JTA">
<jta-data-source>jdbc/ProjectDAE</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="javax.persistence.schema-generation.database.action" value="drop-and-create"/>
</properties>
</persistence-unit>
</persistence>

View File

@ -1,8 +0,0 @@
entity/Administrator_.java
entity/EventParticipant_.java
entity/Event_.java
entity/Participant_.java
entity/Responsible_.java
entity/ParticipantEvent_.java
entity/Subject_.java
entity/User_.java

View File

@ -1,2 +0,0 @@
META-INF/eclipselink-orm.xml
META-INF/orm.xml

View File

@ -1,11 +0,0 @@
package entity;
import javax.annotation.Generated;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="EclipseLink-2.5.2.v20140319-rNA", date="2015-12-07T23:13:25")
@StaticMetamodel(Administrator.class)
public class Administrator_ extends User_ {
}

View File

@ -1,15 +0,0 @@
package entity;
import javax.annotation.Generated;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="EclipseLink-2.5.2.v20140319-rNA", date="2015-12-07T23:13:25")
@StaticMetamodel(EventParticipant.class)
public class EventParticipant_ {
public static volatile SingularAttribute<EventParticipant, Long> id_event;
public static volatile SingularAttribute<EventParticipant, Boolean> presence;
public static volatile SingularAttribute<EventParticipant, Integer> id_participant;
}

View File

@ -1,24 +0,0 @@
package entity;
import entity.Participant;
import entity.Responsible;
import java.util.Date;
import javax.annotation.Generated;
import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="EclipseLink-2.5.2.v20140319-rNA", date="2015-12-07T23:13:25")
@StaticMetamodel(Event.class)
public class Event_ {
public static volatile SingularAttribute<Event, Date> date;
public static volatile SingularAttribute<Event, Boolean> openInscriptions;
public static volatile SingularAttribute<Event, Responsible> responsible;
public static volatile SingularAttribute<Event, String> name;
public static volatile SingularAttribute<Event, Integer> id;
public static volatile SingularAttribute<Event, String> type;
public static volatile SingularAttribute<Event, String> local;
public static volatile ListAttribute<Event, Participant> participants;
}

View File

@ -1,15 +0,0 @@
package entity;
import javax.annotation.Generated;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="EclipseLink-2.5.2.v20140319-rNA", date="2015-12-07T23:13:25")
@StaticMetamodel(ParticipantEvent.class)
public class ParticipantEvent_ {
public static volatile SingularAttribute<ParticipantEvent, Integer> event_id;
public static volatile SingularAttribute<ParticipantEvent, Integer> participant_id;
public static volatile SingularAttribute<ParticipantEvent, Boolean> present;
}

View File

@ -1,16 +0,0 @@
package entity;
import entity.Event;
import entity.Subject;
import javax.annotation.Generated;
import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="EclipseLink-2.5.2.v20140319-rNA", date="2015-12-07T23:13:25")
@StaticMetamodel(Participant.class)
public class Participant_ extends User_ {
public static volatile ListAttribute<Participant, Subject> subjects;
public static volatile ListAttribute<Participant, Event> events;
}

View File

@ -1,14 +0,0 @@
package entity;
import entity.Event;
import javax.annotation.Generated;
import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="EclipseLink-2.5.2.v20140319-rNA", date="2015-12-07T23:13:25")
@StaticMetamodel(Responsible.class)
public class Responsible_ extends User_ {
public static volatile ListAttribute<Responsible, Event> events;
}

View File

@ -1,19 +0,0 @@
package entity;
import entity.Participant;
import javax.annotation.Generated;
import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="EclipseLink-2.5.2.v20140319-rNA", date="2015-12-07T23:13:25")
@StaticMetamodel(Subject.class)
public class Subject_ {
public static volatile SingularAttribute<Subject, Integer> courseYear;
public static volatile SingularAttribute<Subject, String> name;
public static volatile SingularAttribute<Subject, String> scholarYear;
public static volatile SingularAttribute<Subject, Integer> id;
public static volatile ListAttribute<Subject, Participant> participants;
}

View File

@ -1,16 +0,0 @@
package entity;
import javax.annotation.Generated;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="EclipseLink-2.5.2.v20140319-rNA", date="2015-12-07T23:13:25")
@StaticMetamodel(User.class)
public class User_ {
public static volatile SingularAttribute<User, String> password;
public static volatile SingularAttribute<User, String> name;
public static volatile SingularAttribute<User, Integer> id;
public static volatile SingularAttribute<User, String> email;
}

Binary file not shown.

View File

@ -1,8 +1,8 @@
build.xml.data.CRC32=73227301
build.xml.data.CRC32=286fe6b4
build.xml.script.CRC32=2639f0b7
build.xml.stylesheet.CRC32=5910fda3@1.55.1
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=73227301
nbproject/build-impl.xml.data.CRC32=286fe6b4
nbproject/build-impl.xml.script.CRC32=683baaed
nbproject/build-impl.xml.stylesheet.CRC32=6096d939@1.55.1

View File

@ -5,4 +5,3 @@ j2ee.server.home=C:/Users/franc/GlassFish_Server/glassfish
j2ee.server.instance=[C:\\Users\\franc\\GlassFish_Server\\glassfish;C:\\Users\\franc\\GlassFish_Server\\glassfish\\domains\\domain1]deployer:gfv3ee6wc:localhost:4848
j2ee.server.middleware=C:/Users/franc/GlassFish_Server
netbeans.user=C:\\Users\\franc\\AppData\\Roaming\\NetBeans\\8.1
user.properties.file=C:\\Users\\franc\\AppData\\Roaming\\NetBeans\\8.1\\build.properties

View File

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group>
<file>file:/D:/Users/Francisco/Documents/NetBeansProjects/ProjectDAE/ProjectDAE-ejb/src/java/ejbs/EventBean.java</file>
<file>file:/D:/Users/Francisco/Documents/NetBeansProjects/ProjectDAE/ProjectDAE-ejb/src/java/ejbs/ResponsibleBean.java</file>
<file>file:/D:/Users/Francisco/Documents/NetBeansProjects/ProjectDAE/ProjectDAE-ejb/src/java/ejbs/ParticipantBean.java</file>
</group>
</open-files>
</project-private>

View File

@ -35,6 +35,7 @@ j2ee.platform.wsit.classpath=
j2ee.server.type=gfv3ee6
jar.compress=false
jar.name=ProjectDAE-ejb.jar
jars.in.ejbjar=false
javac.classpath=
javac.debug=true
javac.deprecation=false

View File

@ -6,10 +6,10 @@
<name>ProjectDAE-ejb</name>
<minimum-ant-version>1.6.5</minimum-ant-version>
<source-roots>
<root id="src.dir" name="Source Packages"/>
<root id="src.dir"/>
</source-roots>
<test-roots>
<root id="test.src.dir" name="Test Packages"/>
<root id="test.src.dir"/>
</test-roots>
</data>
</configuration>

View File

@ -1,262 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core">
<head>
<title>Admin Page</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body>
<!-- //////////////////////////ADMINISTRATOR////////////////////////// -->
<div>Administrators:</div>
<h:dataTable value="#{administratorManager.allAdministrators}"
var="administrator"
summary="List of all Administrators"
rules="all"
cellpadding="5">
<h:column>
<f:facet name="header">ID</f:facet>
<h:outputText value="#{administrator.id}"/>
</h:column>
<h:column>
<f:facet name="header">Name</f:facet>
<h:outputText value="#{administrator.name}"/>
</h:column>
<h:column>
<f:facet name="header">Email</f:facet>
<h:outputText value="#{administrator.email}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Actions" />
</f:facet>
<h:form>
<h:commandLink value="Update" action="admin_administrator_update?faces-redirect=true">
<f:setPropertyActionListener target="#{administratorManager.currentAdministrator}" value="#{administrator}" />
</h:commandLink>
<h:commandLink value="Remove" actionListener="#{administratorManager.removeAdministrator}">
<f:param name="administratorID" id="administratorID" value="#{administrator.id}"/>
</h:commandLink>
</h:form>
</h:column>
</h:dataTable>
<h:form>
<h:commandLink action="admin_administrator_create" value="New Administator"></h:commandLink>
<br></br>
</h:form>
<br></br><br></br>
<!-- //////////////////////////RESPONSIBLE////////////////////////// -->
<div>Responsibles:</div>
<h:dataTable value="#{administratorManager.allResponsibles}"
var="responsible"
summary="List of all Responsible"
rules="all"
cellpadding="5">
<h:column>
<f:facet name="header">ID</f:facet>
<h:outputText value="#{responsible.id}"/>
</h:column>
<h:column>
<f:facet name="header">Name</f:facet>
<h:outputText value="#{responsible.name}"/>
</h:column>
<h:column>
<f:facet name="header">Email</f:facet>
<h:outputText value="#{responsible.email}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Actions" />
</f:facet>
<h:form>
<h:commandLink value="Details" action="responsible_details?faces-redirect=true">
<f:setPropertyActionListener target="#{administratorManager.currentResponsible}" value="#{responsible}" />
</h:commandLink>
<h:commandLink value="Update" action="admin_responsible_update?faces-redirect=true">
<f:setPropertyActionListener target="#{administratorManager.currentResponsible}" value="#{responsible}" />
</h:commandLink>
<h:commandLink value="Remove" actionListener="#{administratorManager.removeResponsible}">
<f:param name="responsibleID" id="responsibleID" value="#{responsible.id}" />
</h:commandLink>
</h:form>
</h:column>
</h:dataTable>
<h:form>
<h:commandLink action="admin_responsible_create" value="New Responsible"></h:commandLink>
<br></br>
</h:form>
<br></br><br></br>
<!-- //////////////////////////PARTICIPANT////////////////////////// -->
<div>Participants:</div>
<h:dataTable value="#{administratorManager.allParticipants}"
var="participant"
summary="List of all Participant"
rules="all"
cellpadding="5">
<h:column>
<f:facet name="header">ID</f:facet>
<h:outputText value="#{participant.id}"/>
</h:column>
<h:column>
<f:facet name="header">Name</f:facet>
<h:outputText value="#{participant.name}"/>
</h:column>
<h:column>
<f:facet name="header">Email</f:facet>
<h:outputText value="#{participant.email}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Actions" />
</f:facet>
<h:form>
<h:commandLink value="Details" action="participant_details?faces-redirect=true">
<f:setPropertyActionListener target="#{administratorManager.currentParticipant}" value="#{participant}" />
</h:commandLink>
<h:commandLink value="Update" action="admin_participant_update?faces-redirect=true">
<f:setPropertyActionListener target="#{administratorManager.currentParticipant}" value="#{participant}" />
</h:commandLink>
<h:commandLink value="Remove" actionListener="#{administratorManager.removeParticipant}">
<f:param name="participantID" id="participantID" value="#{participant.id}" />
</h:commandLink>
</h:form>
</h:column>
</h:dataTable>
<h:form>
<h:commandLink action="admin_participant_create" value="New Participant"></h:commandLink>
<br></br>
</h:form>
<br></br>
<!-- //////////////////////////Event////////////////////////// -->
<div>Events:</div>
<h:dataTable value="#{administratorManager.allEvents}"
var="event"
summary="List of all Event"
rules="all"
cellpadding="5">>
<h:column>
<f:facet name="header">ID</f:facet>
<h:outputText value="#{event.id}"/>
</h:column>
<h:column>
<f:facet name="header">Date</f:facet>
<h:outputText value="#{event.date}"/>
</h:column>
<h:column>
<f:facet name="header">Name</f:facet>
<h:outputText value="#{event.name}"/>
</h:column>
<h:column>
<f:facet name="header">Type</f:facet>
<h:outputText value="#{event.type}"/>
</h:column>
<h:column>
<f:facet name="header">Local</f:facet>
<h:outputText value="#{event.local}"/>
</h:column>
<h:column>
<f:facet name="header">Responsible</f:facet>
<h:outputText value="#{event.responsible_name}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Actions" />
</f:facet>
<h:form>
<h:commandLink value="Details" action="event_details?faces-redirect=true">
<f:setPropertyActionListener target="#{administratorManager.currentEvent}" value="#{event}" />
</h:commandLink>
<h:commandLink value="Update" action="update_event?faces-redirect=true">
<f:setPropertyActionListener target="#{administratorManager.currentEvent}" value="#{event}" />
</h:commandLink>
<h:commandLink value="Remove" actionListener="#{administratorManager.removeEvent}">
<f:param name="eventID" id="eventID" value="#{event.id}" />
</h:commandLink>
</h:form>
</h:column>
</h:dataTable>
<h:form>
<h:commandLink action="create_event" value="Create Event"></h:commandLink>
</h:form>
<br></br>
<!-- //////////////////////////Subjects////////////////////////// -->
<div>Subjects</div>
<h:dataTable value="#{administratorManager.allSubjects}"
var="subject"
summary="List of all Subject"
rules="all"
cellpadding="5">>
<h:column>
<f:facet name="header">ID</f:facet>
<h:outputText value="#{subject.id}"/>
</h:column>
<h:column>
<f:facet name="header">Name</f:facet>
<h:outputText value="#{subject.name}"/>
</h:column>
<h:column>
<f:facet name="header">Ano</f:facet>
<h:outputText value="#{subject.courseYear}"/>
</h:column>
<h:column>
<f:facet name="header">Anolectivo</f:facet>
<h:outputText value="#{subject.scholarYear}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Actions" />
</f:facet>
<h:form>
<h:commandLink value="Details" action="event_details?faces-redirect=true">
<f:setPropertyActionListener target="#{administratorManager.currentSubject}" value="#{subject}" />
</h:commandLink>
</h:form>
</h:column>
</h:dataTable>
<h:form>
<br></br>
<h:commandLink action="index" value="Back"></h:commandLink>
</h:form>
</body>
</html>

View File

@ -1,73 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core">
<head>
<title>Event</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body>
<div>Events Management</div>
<h:dataTable value="#{administratorManager.allEvents}"
var="event"
summary="List of all events of the Responsible"
rules="all"
cellpadding="5">
<h:column>
<f:facet name="header">Date</f:facet>
<h:outputText value="#{event.date}"/>
</h:column>
<h:column>
<f:facet name="header">Name</f:facet>
<h:outputText value="#{event.name}"/>
</h:column>
<h:column>
<f:facet name="header">Type</f:facet>
<h:outputText value="#{event.type}"/>
</h:column>
<h:column>
<f:facet name="header">Local</f:facet>
<h:outputText value="#{event.local}"/>
</h:column>
<h:column>
<f:facet name="header">Responsible</f:facet>
<h:outputText value="#{event.responsible_name}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Actions" />
</f:facet>
<h:form>
<h:commandLink value="Details" action="event_details?faces-redirect=true">
<f:setPropertyActionListener target="#{administratorManager.currentEvent}" value="#{event}" />
</h:commandLink>
<h:commandLink value="Update" action="update_event?faces-redirect=true">
<f:setPropertyActionListener target="#{administratorManager.currentEvent}" value="#{event}" />
</h:commandLink>
<h:commandLink value="Remove" actionListener="#{administratorManager.removeEvent}">
<f:param name="eventID" id="eventID" value="#{event.id}" />
</h:commandLink>
</h:form>
</h:column>
</h:dataTable>
<h:form>
<h:commandLink action="create_event" value="New Event"></h:commandLink>
<br></br>
<h:commandLink action="index" value="Back"></h:commandLink>
</h:form>
</body>
</html>

View File

@ -1,4 +0,0 @@
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.9.4
Created-By: 1.8.0_66-b17 (Oracle Corporation)

View File

@ -1,53 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core">
<head>
<title>Participant Page</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body>
<div>Participants:</div>
<h:dataTable value="#{administratorManager.allParticipants}"
var="participant"
summary="List of all Participant"
rules="all"
cellpadding="5">
<h:column>
<f:facet name="header">Name</f:facet>
<h:outputText value="#{participant.name}"/>
</h:column>
<h:column>
<f:facet name="header">Email</f:facet>
<h:outputText value="#{participant.email}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Actions" />
</f:facet>
<h:form>
<h:commandLink value="Entrar" action="participant_details?faces-redirect=true">
<f:setPropertyActionListener target="#{administratorManager.currentParticipant}" value="#{participant}" />
</h:commandLink>
</h:form>
</h:column>
</h:dataTable>
<h:form>
<br></br>
<h:commandLink action="index" value="Back"></h:commandLink>
</h:form>
</body>
</html>

View File

@ -1,54 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core">
<head>
<title>Responsible Page </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body>
<div>Responsibles:</div>
<h:dataTable value="#{administratorManager.allResponsibles}" var="responsible">
<h:column>
<f:facet name="header">Id</f:facet>
<h:outputText value="#{responsible.id}"/>
</h:column>
<h:column>
<f:facet name="header">Name</f:facet>
<h:outputText value="#{responsible.name}"/>
</h:column>
<h:column>
<f:facet name="header">Email</f:facet>
<h:outputText value="#{responsible.email}"/>
</h:column>
<h:column>
<h:form>
<h:commandLink value="Entrar" action="responsible_details?faces-redirect=true">
<f:setPropertyActionListener target="#{administratorManager.currentResponsible}" value="#{responsible}" />
</h:commandLink>
</h:form>
</h:column>
</h:dataTable>
<h:form>
<h:commandLink action="admin_user_create" value="New Responsible"></h:commandLink>
<br></br>
<h:commandLink action="index" value="Back"></h:commandLink>
</h:form>
</body>
</html>

View File

@ -1,24 +0,0 @@
<?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>

View File

@ -1,51 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core">
<head>
<title>List Participants</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body>
<div>Lista de Utilizadores / Participantes : </div>
<br></br>
<h:form>
<h:column>
<h:selectManyListbox
id="participant"
value="#{administratorManager.listParticipants}"
title="Add participants to Event"
>
<f:selectItems
value="#{administratorManager.allParticipants}"
var="participant"
itemValue="#{participant.id}"
itemLabel="#{participant.name}"
/>
</h:selectManyListbox >
</h:column>
<br></br>
<h:commandButton value="Submit" action="result" />
<h:commandButton value="Reset" type="reset" />
<h:panelGrid>
<h:commandButton
id="submit"
value="Submit"
action="#{administratorManager.printToScreen}">
</h:commandButton>
<h:message for="submit" />
</h:panelGrid>
</h:form>
</body>
</html>

View File

@ -1,64 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core">
<h:head>
<title>Create User</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</h:head>
<h:body>
<h:form>
<h:panelGrid columns="3">
<h:outputLabel for="username" value="Username: "/>
<h:inputText
id="username"
required ="true"
requiredMessage="Username cannot be empty!"
value="#{administratorManager.newAdministrator.id}">
</h:inputText>
<h:message for="name" />
<h:outputLabel for="name" value="Name: "/>
<h:inputText
id="name"
required ="true"
requiredMessage="Name cannot be empty!"
value="#{administratorManager.newAdministrator.name}">
</h:inputText>
<h:message for="name" />
<h:outputLabel for="email" value="Email: "/>
<h:inputText
id="email"
required ="true"
requiredMessage="Email cannot be empty!"
value="#{administratorManager.newAdministrator.email}">
<f:validateRegex pattern="[\w\.-]*[a-zA-Z0-9_]@[\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]" />
</h:inputText>
<h:message for="email" />
<h:outputLabel for="password" value="Password: "/>
<h:inputSecret
id="password"
required ="true"
requiredMessage="Password cannot be empty!"
value="#{administratorManager.newAdministrator.password}">
</h:inputSecret>
<h:message for="password" />
</h:panelGrid>
<h:panelGrid>
<h:commandButton
id="submit"
value="Submit"
action="#{administratorManager.createAdmininstrator}">
</h:commandButton>
<h:message for="submit" />
</h:panelGrid>
</h:form>
</h:body>
</html>

View File

@ -1,34 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core">
<head>
<title>User List</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body>
<h:dataTable value="#{administratorManager.allAdministrators}" var="administrator">
<h:column>
<f:facet name="header">Username</f:facet>
<h:outputText value="#{administrator.id}"/>
</h:column>
<h:column>
<f:facet name="header">Name</f:facet>
<h:outputText value="#{administrator.name}"/>
</h:column>
<h:column>
<f:facet name="header">Email</f:facet>
<h:outputText value="#{administrator.email}"/>
</h:column>
</h:dataTable>
</body>
</html>

View File

@ -1,55 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core">
<h:head>
<title>Update User</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</h:head>
<h:body>
<h:form>
<h:panelGrid columns="3">
<h:outputLabel for="name" value="Name: "/>
<h:inputText
id="name"
required ="true"
requiredMessage="Name cannot be empty!"
value="#{administratorManager.currentAdministrator.name}">
</h:inputText>
<h:message for="name" />
<h:outputLabel for="email" value="Email: "/>
<h:inputText
id="email"
required ="true"
requiredMessage="Email cannot be empty!"
value="#{administratorManager.currentAdministrator.email}">
<f:validateRegex pattern="[\w\.-]*[a-zA-Z0-9_]@[\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]" />
</h:inputText>
<h:message for="email" />
<h:outputLabel for="password" value="Password: "/>
<h:inputSecret
id="password"
required ="true"
requiredMessage="Password cannot be empty!"
value="#{administratorManager.currentAdministrator.password}">
</h:inputSecret>
<h:message for="password" />
</h:panelGrid>
<h:panelGrid>
<h:commandButton
id="submit"
value="Submit"
action="#{administratorManager.updateAdministrator}">
</h:commandButton>
<h:message for="submit" style="color: red"/>
</h:panelGrid>
</h:form>
</h:body>
</html>

View File

@ -1,64 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core">
<h:head>
<title>Create User</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</h:head>
<h:body>
<h:form>
<h:panelGrid columns="3">
<h:outputLabel for="username" value="Username: "/>
<h:inputText
id="username"
required ="true"
requiredMessage="Username cannot be empty!"
value="#{administratorManager.newParticipant.id}">
</h:inputText>
<h:message for="name" />
<h:outputLabel for="name" value="Name: "/>
<h:inputText
id="name"
required ="true"
requiredMessage="Name cannot be empty!"
value="#{administratorManager.newParticipant.name}">
</h:inputText>
<h:message for="name" />
<h:outputLabel for="email" value="Email: "/>
<h:inputText
id="email"
required ="true"
requiredMessage="Email cannot be empty!"
value="#{administratorManager.newParticipant.email}">
<f:validateRegex pattern="[\w\.-]*[a-zA-Z0-9_]@[\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]" />
</h:inputText>
<h:message for="email" />
<h:outputLabel for="password" value="Password: "/>
<h:inputSecret
id="password"
required ="true"
requiredMessage="Password cannot be empty!"
value="#{administratorManager.newParticipant.password}">
</h:inputSecret>
<h:message for="password" />
</h:panelGrid>
<h:panelGrid>
<h:commandButton
id="submit"
value="Submit"
action="#{administratorManager.createParticipant}">
</h:commandButton>
<h:message for="submit" />
</h:panelGrid>
</h:form>
</h:body>
</html>

View File

@ -1,55 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core">
<h:head>
<title>Update User</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</h:head>
<h:body>
<h:form>
<h:panelGrid columns="3">
<h:outputLabel for="name" value="Name: "/>
<h:inputText
id="name"
required ="true"
requiredMessage="Name cannot be empty!"
value="#{administratorManager.currentParticipant.name}">
</h:inputText>
<h:message for="name" />
<h:outputLabel for="email" value="Email: "/>
<h:inputText
id="email"
required ="true"
requiredMessage="Email cannot be empty!"
value="#{administratorManager.currentParticipant.email}">
<f:validateRegex pattern="[\w\.-]*[a-zA-Z0-9_]@[\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]" />
</h:inputText>
<h:message for="email" />
<h:outputLabel for="password" value="Password: "/>
<h:inputSecret
id="password"
required ="true"
requiredMessage="Password cannot be empty!"
value="#{administratorManager.currentParticipant.password}">
</h:inputSecret>
<h:message for="password" />
</h:panelGrid>
<h:panelGrid>
<h:commandButton
id="submit"
value="Submit"
action="#{administratorManager.updateParticipant}">
</h:commandButton>
<h:message for="submit" style="color: red"/>
</h:panelGrid>
</h:form>
</h:body>
</html>

View File

@ -1,64 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core">
<h:head>
<title>Create User</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</h:head>
<h:body>
<h:form>
<h:panelGrid columns="3">
<h:outputLabel for="username" value="Username: "/>
<h:inputText
id="username"
required ="true"
requiredMessage="Username cannot be empty!"
value="#{administratorManager.newResponsible.id}">
</h:inputText>
<h:message for="name" />
<h:outputLabel for="name" value="Name: "/>
<h:inputText
id="name"
required ="true"
requiredMessage="Name cannot be empty!"
value="#{administratorManager.newResponsible.name}">
</h:inputText>
<h:message for="name" />
<h:outputLabel for="email" value="Email: "/>
<h:inputText
id="email"
required ="true"
requiredMessage="Email cannot be empty!"
value="#{administratorManager.newResponsible.email}">
<f:validateRegex pattern="[\w\.-]*[a-zA-Z0-9_]@[\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]" />
</h:inputText>
<h:message for="email" />
<h:outputLabel for="password" value="Password: "/>
<h:inputSecret
id="password"
required ="true"
requiredMessage="Password cannot be empty!"
value="#{administratorManager.newResponsible.password}">
</h:inputSecret>
<h:message for="password" />
</h:panelGrid>
<h:panelGrid>
<h:commandButton
id="submit"
value="Submit"
action="#{administratorManager.createResponsible}">
</h:commandButton>
<h:message for="submit" />
</h:panelGrid>
</h:form>
</h:body>
</html>

View File

@ -1,55 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core">
<h:head>
<title>Update User</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</h:head>
<h:body>
<h:form>
<h:panelGrid columns="3">
<h:outputLabel for="name" value="Name: "/>
<h:inputText
id="name"
required ="true"
requiredMessage="Name cannot be empty!"
value="#{administratorManager.currentResponsible.name}">
</h:inputText>
<h:message for="name" />
<h:outputLabel for="email" value="Email: "/>
<h:inputText
id="email"
required ="true"
requiredMessage="Email cannot be empty!"
value="#{administratorManager.currentResponsible.email}">
<f:validateRegex pattern="[\w\.-]*[a-zA-Z0-9_]@[\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]" />
</h:inputText>
<h:message for="email" />
<h:outputLabel for="password" value="Password: "/>
<h:inputSecret
id="password"
required ="true"
requiredMessage="Password cannot be empty!"
value="#{administratorManager.currentResponsible.password}">
</h:inputSecret>
<h:message for="password" />
</h:panelGrid>
<h:panelGrid>
<h:commandButton
id="submit"
value="Submit"
action="#{administratorManager.updateResponsible}">
</h:commandButton>
<h:message for="submit" style="color: red"/>
</h:panelGrid>
</h:form>
</h:body>
</html>

View File

@ -1,84 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core">
<h:head>
<title>Create Event</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</h:head>
<h:body>
<h:form>
<h:panelGrid columns="3">
<h:outputLabel for="id" value="ID: "/>
<h:inputText
id="id"
required ="true"
requiredMessage="ID cannot be empty!"
value="#{administratorManager.newEvent.id}">
</h:inputText>
<h:message for="id" />
<h:outputLabel for="date" value="Date: "/>
<h:inputText
id="date"
required ="true"
requiredMessage="Date cannot be empty!"
value="#{administratorManager.newEvent.date}">
<f:convertDateTime pattern="dd/MM/yyyy" />
</h:inputText>
<h:message for="date" />
<h:outputLabel for="name" value="Name: "/>
<h:inputText
id="name"
required ="true"
requiredMessage="Name cannot be empty!"
value="#{administratorManager.newEvent.name}">
</h:inputText>
<h:message for="name" />
<h:outputLabel for="type" value="Type: "/>
<h:inputText
id="type"
required ="true"
requiredMessage="Type cannot be empty!"
value="#{administratorManager.newEvent.type}">
</h:inputText>
<h:message for="type" />
<h:outputLabel for="local" value="Local: "/>
<h:inputText
id="local"
required ="true"
requiredMessage="Local cannot be empty!"
value="#{administratorManager.newEvent.local}">
</h:inputText>
<h:message for="local" />
<h:outputLabel for="responsible" value="Responsible: "/>
<h:selectOneMenu
id="responsible"
value="#{administratorManager.newEvent.responsible_id}" >
<f:selectItems
value="#{administratorManager.allResponsibles}"
var="responsible"
itemValue="#{responsible.id}"
itemLabel="#{responsible.name}" />
</h:selectOneMenu>
<h:message for="responsible" />
</h:panelGrid>
<h:panelGrid>
<h:commandButton
id="submit"
value="Submit"
action="#{administratorManager.createEvent}">
</h:commandButton>
<h:message for="submit" />
</h:panelGrid>
</h:form>
</h:body>
</html>

View File

@ -1,159 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core">
<head>
<title>Event Details</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body>
<div>Event Details:</div>
<h:dataTable value="#{administratorManager.currentEvent}"
var="event"
summary="List of all Event"
rules="all"
cellpadding="5">
<h:column>
<f:facet name="header">ID</f:facet>
<h:outputText value="#{event.id}"/>
</h:column>
<h:column>
<f:facet name="header">Date</f:facet>
<h:outputText value="#{event.date}"/>
</h:column>
<h:column>
<f:facet name="header">Name</f:facet>
<h:outputText value="#{event.name}"/>
</h:column>
<h:column>
<f:facet name="header">Type</f:facet>
<h:outputText value="#{event.type}"/>
</h:column>
<h:column>
<f:facet name="header">Local</f:facet>
<h:outputText value="#{event.local}"/>
</h:column>
<h:column>
<f:facet name="header">Responsible</f:facet>
<h:outputText value="#{event.responsible_name}"/>
</h:column>
<h:column>
<f:facet name="header">Open Inscriptions</f:facet>
<h:outputText value="#{event.openInscriptions}"/>
</h:column>
<h:column>
<h:form rendered="#{!event.openInscriptions}">
<h:commandLink value="Open inscriptions" actionListener="#{administratorManager.openInscription}">
<f:param name="eventID" id="eventID" value="#{event.id}"/>
</h:commandLink>
</h:form>
<h:form rendered="#{event.openInscriptions}">
<h:commandLink value="Close inscriptions" actionListener="#{administratorManager.closeInscription}">
<f:param name="eventID" id="eventID" value="#{event.id}"/>
</h:commandLink>
</h:form>
<h:form>
<h:commandLink action="add_participant_event" value="Add Participant"></h:commandLink>
</h:form>
</h:column>
</h:dataTable>
<br></br>
<div>Enrolled Participants:</div>
<h:dataTable value="#{administratorManager.enrolledParticipants}"
var="participant"
summary="List of Enrolled Participants"
rules="all"
cellpadding="5">
<h:column>
<f:facet name="header">ID</f:facet>
<h:outputText value="#{participant.id}"/>
</h:column>
<h:column>
<f:facet name="header">Name</f:facet>
<h:outputText value="#{participant.name}"/>
</h:column>
<h:column>
<f:facet name="header">Email</f:facet>
<h:outputText value="#{participant.email}"/>
</h:column>
<h:column>
<f:facet name="header">Present</f:facet>
<h:outputText value="No"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Actions" />
</f:facet>
<h:form>
<h:commandLink value="Remove participant" actionListener="#{administratorManager.unrollParticipants}" action="event_details?faces-redirect=true">
<f:param name="participantId" id="participantId" value="#{participant.id}"/>
</h:commandLink>
</h:form>
</h:column>
</h:dataTable>
<br></br>
<div>Unrolled Participants:</div>
<h:dataTable value="#{administratorManager.unrolledParticipants}"
var="participant"
summary="List of Unrolled Participants"
rules="all"
cellpadding="5">
<h:column>
<f:facet name="header">ID</f:facet>
<h:outputText value="#{participant.id}"/>
</h:column>
<h:column>
<f:facet name="header">Name</f:facet>
<h:outputText value="#{participant.name}"/>
</h:column>
<h:column>
<f:facet name="header">Email</f:facet>
<h:outputText value="#{participant.email}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Actions" />
</f:facet>
<h:form>
<h:commandLink value="Add participant" actionListener="#{administratorManager.enrollParticipants}" action="event_details?faces-redirect=true">
<f:param name="participantId" id="participantId" value="#{participant.id}"/>
</h:commandLink>
</h:form>
</h:column>
</h:dataTable>
<br></br>
<h:form>
<h:commandLink action="AdminPage" value="Back"></h:commandLink>
</h:form>
</body>
</html>

View File

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html">
<h:head>
<title>Events Management</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</h:head>
<h:body>
<div>User management</div>
<h:form>
<h:commandLink action="AdminPage" value="Administrator"></h:commandLink>
<br></br>
<h:commandLink action="ResponsiblePage" value="Responsible"></h:commandLink>
<br></br>
<h:commandLink action="ParticipantPage" value="Participant"></h:commandLink>
<br></br>
<h:commandLink action="EventPage" value="Event"></h:commandLink>
</h:form>
</h:body>
</html>

View File

@ -1,34 +0,0 @@
<?xml version='1.0' encoding='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"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
<h:head>
<title>Facelet Title</title>
</h:head>
<h:body>
<p>Introduza as suas credenciais:</p>
<form method="post" action="j_security_check">
<h:panelGrid columns="2">
<h:outputLabel for="j_username" value="Utilizador: " />
<input type="text" name="j_username" />
<h:outputLabel for="j_password" value="Palavra passe: " />
<input type="password" name="j_password" />
</h:panelGrid>
<br></br>
<h:panelGrid columns="3">
<input type="submit" name="submit" value="Entrar" />
<input type="reset" value="Limpar"/>
<h:button outcome="index" value="Cancelar" />
</h:panelGrid>
</form>
</h:body>
</html>

View File

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Not Implemented Yet</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body>
<div>Not Implemented Yet</div>
</body>
</html>

View File

@ -1,81 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core">
<head>
<title>Participant Detail</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body>
<div>Participant Details:</div>
<h:dataTable value="#{administratorManager.currentParticipant}"
var="participant"
summary="List Participant detais"
rules="all"
cellpadding="5">>
<h:column>
<f:facet name="header">Id</f:facet>
<h:outputText value="#{participant.id}"/>
</h:column>
<h:column>
<f:facet name="header">Name</f:facet>
<h:outputText value="#{participant.name}"/>
</h:column>
<h:column>
<f:facet name="header">Email</f:facet>
<h:outputText value="#{participant.email}"/>
</h:column>
</h:dataTable>
<br></br>
<div>Participant Events:</div>
<h:dataTable value="#{administratorManager.currentParticipantEvents}"
var="event"
summary="List of all events of the Responsible"
rules="all"
cellpadding="5">
<h:column>
<f:facet name="header">Date</f:facet>
<h:outputText value="#{event.date}"/>
</h:column>
<h:column>
<f:facet name="header">Name</f:facet>
<h:outputText value="#{event.name}"/>
</h:column>
<h:column>
<f:facet name="header">Type</f:facet>
<h:outputText value="#{event.type}"/>
</h:column>
<h:column>
<f:facet name="header">Local</f:facet>
<h:outputText value="#{event.local}"/>
</h:column>
<h:column>
<f:facet name="header">Responsible</f:facet>
<h:outputText value="#{event.responsible_name}"/>
</h:column>
<h:column>
<f:facet name="header">Responsible</f:facet>
<h:outputText value="#{event.responsible_name}"/>
</h:column>
<h:column>
<h:form rendered="#{event.openInscriptions}">
<h:commandLink value="Open inscriptions" action="participant_details?faces-redirect=true">
<f:setPropertyActionListener target="#{administratorManager.registPresence}" value="#{event}" />
</h:commandLink>
</h:form>
</h:column>
</h:dataTable>
<h:form>
<h:commandLink action="AdminPage" value="Back"></h:commandLink>
</h:form>
</body>
</html>

View File

@ -1,99 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core">
<head>
<title>Responsible Detais</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body>
<div>Responsible Details</div>
<h:dataTable value="#{administratorManager.currentResponsible}"
var="responsible"
summary="List Responsible detais"
rules="all"
cellpadding="5">
<h:column>
<f:facet name="header">Id</f:facet>
<h:outputText value="#{responsible.id}"/>
</h:column>
<h:column>
<f:facet name="header">Name</f:facet>
<h:outputText value="#{responsible.name}"/>
</h:column>
<h:column>
<f:facet name="header">Email</f:facet>
<h:outputText value="#{responsible.email}"/>
</h:column>
</h:dataTable>
<br></br><br></br>
<div>Responsible Events</div>
<h:dataTable value="#{administratorManager.currentResponsibleEvents}"
var="event"
summary="List of all events of the Responsible"
rules="all"
cellpadding="5"
>
<h:column>
<f:facet name="header">Date</f:facet>
<h:outputText value="#{event.date}"/>
</h:column>
<h:column>
<f:facet name="header">Name</f:facet>
<h:outputText value="#{event.name}"/>
</h:column>
<h:column>
<f:facet name="header">Type</f:facet>
<h:outputText value="#{event.type}"/>
</h:column>
<h:column>
<f:facet name="header">Local</f:facet>
<h:outputText value="#{event.local}"/>
</h:column>
<h:column>
<f:facet name="header">Open Inscriptions</f:facet>
<h:outputText value="#{event.openInscriptions}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Actions" />
</f:facet>
<h:form>
<h:commandLink value="Details" action="event_details?faces-redirect=true">
<f:setPropertyActionListener target="#{administratorManager.currentEvent}" value="#{event}" />
</h:commandLink>
</h:form>
<h:form rendered="#{!event.openInscriptions}">
<h:commandLink value="Open inscriptions" actionListener="#{administratorManager.openInscription}">
<f:param name="eventID" id="eventID" value="#{event.id}"/>
</h:commandLink>
</h:form>
<h:form rendered="#{event.openInscriptions}">
<h:commandLink value="Close inscriptions" actionListener="#{administratorManager.closeInscription}">
<f:param name="eventID" id="eventID" value="#{event.id}"/>
</h:commandLink>
</h:form>
<h:form>
<h:commandLink action="add_participant_event" value="Add Participant"></h:commandLink>
</h:form>
</h:column>
</h:dataTable>
<br></br><br></br>
<h:form>
<br></br>
<h:commandLink action="AdminPage" value="Back"></h:commandLink>
</h:form>
</body>
</html>

View File

@ -1,79 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core">
<h:head>
<title>Update User</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</h:head>
<h:body>
<h:form>
<h:panelGrid columns="3">
<h:outputLabel for="date" value="Data: "/>
<h:inputText
id="date"
required ="true"
requiredMessage="Date cannot be empty!"
value="#{administratorManager.currentEvent.date}">
<f:convertDateTime pattern="dd/MM/yyyy" />
</h:inputText>
<h:message for="date" />
<h:outputLabel for="name" value="Name: "/>
<h:inputText
id="name"
required ="true"
requiredMessage="Name cannot be empty!"
value="#{administratorManager.currentEvent.name}">
</h:inputText>
<h:message for="name" />
<h:outputLabel for="type" value="Type: "/>
<h:inputText
id="type"
required ="true"
requiredMessage="Type cannot be empty!"
value="#{administratorManager.currentEvent.type}">
</h:inputText>
<h:message for="type" />
<h:outputLabel for="local" value="Local: "/>
<h:inputText
id="local"
required ="true"
requiredMessage="Local cannot be empty!"
value="#{administratorManager.currentEvent.local}">
</h:inputText>
<h:message for="local" />
<h:outputLabel for="responsible" value="Responsible: "/>
<h:selectOneMenu
id="responsible"
value="#{administratorManager.currentEvent.responsible_id}" >
<f:selectItems
value="#{administratorManager.allResponsibles}"
var="responsible"
itemValue="#{responsible.id}"
itemLabel="#{responsible.name}" />
</h:selectOneMenu>
<h:message for="responsible" />
</h:panelGrid>
<h:panelGrid>
<h:commandButton
id="submit"
value="Submit"
action="#{administratorManager.updateEvent}">
</h:commandButton>
<h:message for="submit" style="color: red"/>
</h:panelGrid>
</h:form>
</h:body>
</html>

Binary file not shown.

View File

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group>
<file>file:/D:/Users/Francisco/Documents/NetBeansProjects/ProjectDAE/ProjectDAE-war/src/java/webpackage/AdministratorManager.java</file>
</group>
</open-files>
</project-private>

View File

@ -13,7 +13,7 @@ j2ee.appclient.mainclass.args=${j2ee.appclient.tool.args}
j2ee.compile.on.save=true
j2ee.deploy.on.save=true
j2ee.platform=1.7
j2ee.platform.classpath=
j2ee.platform.classpath=${j2ee.server.home}/modules/endorsed/javax.annotation-api.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/cdi-api.jar:${j2ee.server.home}/modules/javax.batch-api.jar:${j2ee.server.home}/modules/javax.ejb-api.jar:${j2ee.server.home}/modules/javax.el.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent-api.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent.jar:${j2ee.server.home}/modules/javax.enterprise.deploy-api.jar:${j2ee.server.home}/modules/javax.faces.jar:${j2ee.server.home}/modules/javax.inject.jar:${j2ee.server.home}/modules/javax.interceptor-api.jar:${j2ee.server.home}/modules/javax.jms-api.jar:${j2ee.server.home}/modules/javax.json.jar:${j2ee.server.home}/modules/javax.mail.jar:${j2ee.server.home}/modules/javax.management.j2ee-api.jar:${j2ee.server.home}/modules/javax.persistence.jar:${j2ee.server.home}/modules/javax.resource-api.jar:${j2ee.server.home}/modules/javax.security.auth.message-api.jar:${j2ee.server.home}/modules/javax.security.jacc-api.jar:${j2ee.server.home}/modules/javax.servlet-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.transaction-api.jar:${j2ee.server.home}/modules/javax.websocket-api.jar:${j2ee.server.home}/modules/javax.ws.rs-api.jar:${j2ee.server.home}/modules/javax.xml.registry-api.jar:${j2ee.server.home}/modules/javax.xml.rpc-api.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.middleware}/mq/lib/jaxm-api.jar
j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar
j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar
j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar