Jean-Francois Leveque

https://tree.taiga.io/project/jr-utily-grog-v3/us/44 Implementer l'historisation pour les éditeurs

https://tree.taiga.io/project/jr-utily-grog-v3/task/80 Minimalisation des namespaces de la page de liste
......@@ -18,7 +18,6 @@ import java.sql.Timestamp;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Random;
import java.util.Set;
@Named
......@@ -36,7 +35,6 @@ public class PublisherRevisionView implements Serializable {
private boolean editMode;
private boolean newPublisher;
private int publisherId;
// Données temporaires d'un PublisherRevision
private int publisherRevisionId;
private String publisherName;
......@@ -122,7 +120,7 @@ public class PublisherRevisionView implements Serializable {
newPublisher = false;
publisherRevisionId = publisherRevision.getPublisherRevisionId();
publisherId = publisher.getPublisherId();
// int publisherId = publisher.getPublisherId();
this.publisher = publisher;
publisherRevisionAuthor = publisherRevision.getPublisherRevisionAuthor();
publisherRevisionDatetime = publisherRevision.getPublisherRevisionDatetime();
......
......@@ -20,31 +20,30 @@
</ul>
<a jsf:outcome="listPublisherRevisions" jsf:rendered="#{not listPublisherRevisionsView.viewAll}">Voir tous les éditeurs</a>
<h:outputText rendered="#{listPublisherRevisionsView.publisherRevisions.isEmpty()}">Liste des révisions est vide</h:outputText>
<p jsf:rendered="#{listPublisherRevisionsView.publisherRevisions.isEmpty()}">Liste des révisions est vide</p>
<h:dataTable value="#{listPublisherRevisionsView.publisherRevisions}" var="revision">
<h:column>
<f:facet name="header">Visualiser ou Modifier</f:facet>
<h:link outcome="view">Visualiser ou Modifier Version
<a jsf:outcome="publisherRevision">Visualiser ou Modifier Version
<f:param name="publisherRevisionId" value="#{revision.publisherRevisionId}"/>
</h:link>
</a>
</h:column>
<h:column rendered="#{listPublisherRevisionsView.viewAll}">
<f:facet name="header">Editeur</f:facet>
<h:link outcome="listPublisherRevisions">
Visualiser ou valider version éditeur
<a jsf:outcome="listPublisherRevisions">Visualiser ou valider version éditeur
<f:param name="publisherId" value="#{revision.publisher.publisherId}"/>
</h:link>
</a>
</h:column>
<h:column>
<f:facet name="header">Valide</f:facet>
<h:outputText rendered="#{revision.publisherRevisionId == revision.publisher.validatedRevision.publisherRevisionId}">Validé</h:outputText>
<h:outputText rendered="#{listPublisherRevisionsView.viewAll and revision.publisherRevisionId != revision.publisher.validatedRevision.publisherRevisionId}">Non validé</h:outputText>
<p jsf:rendered="#{revision.publisherRevisionId == revision.publisher.validatedRevision.publisherRevisionId}">Validé</p>
<p jsf:rendered="#{listPublisherRevisionsView.viewAll and revision.publisherRevisionId != revision.publisher.validatedRevision.publisherRevisionId}">Non validé</p>
<!-- https://www.mkyong.com/jsf2/4-ways-to-pass-parameter-from-jsf-page-to-backing-bean/ f:param, problème avec Method expression -->
<h:form rendered="#{not listPublisherRevisionsView.viewAll and revision.publisherRevisionId != revision.publisher.validatedRevision.publisherRevisionId}">
<h:commandButton action="#{listPublisherRevisionsView.validate()}" value="Valider">
<form action="" jsf:rendered="#{not listPublisherRevisionsView.viewAll and revision.publisherRevisionId != revision.publisher.validatedRevision.publisherRevisionId}">
<button jsf:action="#{listPublisherRevisionsView.validate()}">Valider
<f:param name="publisherRevisionId" value="#{revision.publisherRevisionId}"/>
</h:commandButton>
</h:form>
</button>
</form>
</h:column>
<h:column>
<f:facet name="header">Name</f:facet>
......
......@@ -18,10 +18,11 @@ INSERT INTO UserTable (USER_ID, username, password, firstName, lastName, nicknam
(5, 'five', 'five', 'Emily', 'Kolburn', 'five', 'five@raza.org', TRUE, FALSE, TRUE, TRUE),
(6, 'six', 'six', 'Kal', 'Varrik', 'six', 'six@raza.org', TRUE, FALSE, TRUE, TRUE);
INSERT INTO Publisher () VALUES ();
INSERT INTO Publisher () VALUES ();
INSERT INTO Publisher () VALUES ();
INSERT INTO Publisher () VALUES ();
INSERT INTO Publisher VALUES ();
INSERT INTO Publisher VALUES ();
INSERT INTO Publisher VALUES ();
INSERT INTO Publisher VALUES ();
INSERT INTO PublisherRevision (publisher_PUBLISHER_ID, publisherName, publisherStreetAddress, publisherPostalCode,
publisherPostOfficeBoxNumber, publisherAddressRegion, publisherAddressLocality, publisherAddressCountry_COUNTRY_ID,
publisherTelephone, publisherEmail, publisherURL, publisherActive, publisherHistory, publisherRevisionAuthor_USER_ID,
......
......@@ -4,7 +4,7 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
version="2.0">
<!--
<navigation-rule>
<from-view-id>*</from-view-id>
<navigation-case>
......@@ -90,12 +90,5 @@
<to-view-id>/user/updateUser.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/publisher/listPublisherRevisions.xhtml</from-view-id>
<navigation-case>
<from-outcome>view</from-outcome>
<to-view-id>/publisher/publisherRevision.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
-->
</faces-config>
\ No newline at end of file
......