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/81 Gestion du rollback
Showing
6 changed files
with
108 additions
and
120 deletions
... | @@ -2,9 +2,6 @@ package org.legrog.web.publisher; | ... | @@ -2,9 +2,6 @@ package org.legrog.web.publisher; |
2 | 2 | ||
3 | import org.legrog.entities.Publisher; | 3 | import org.legrog.entities.Publisher; |
4 | import org.legrog.entities.PublisherRevision; | 4 | import org.legrog.entities.PublisherRevision; |
5 | -import org.legrog.entities.User; | ||
6 | -import org.legrog.web.user.UserService; | ||
7 | -import org.legrog.web.xyz.SharedService; | ||
8 | import org.slf4j.Logger; | 5 | import org.slf4j.Logger; |
9 | import org.slf4j.LoggerFactory; | 6 | import org.slf4j.LoggerFactory; |
10 | 7 | ||
... | @@ -13,8 +10,9 @@ import javax.enterprise.context.RequestScoped; | ... | @@ -13,8 +10,9 @@ import javax.enterprise.context.RequestScoped; |
13 | import javax.faces.context.FacesContext; | 10 | import javax.faces.context.FacesContext; |
14 | import javax.inject.Inject; | 11 | import javax.inject.Inject; |
15 | import javax.inject.Named; | 12 | import javax.inject.Named; |
16 | -import java.sql.Timestamp; | 13 | +import java.util.ArrayList; |
17 | -import java.util.*; | 14 | +import java.util.List; |
15 | +import java.util.Map; | ||
18 | 16 | ||
19 | @Named | 17 | @Named |
20 | @RequestScoped | 18 | @RequestScoped |
... | @@ -23,11 +21,6 @@ public class ListPublisherRevisionsView { | ... | @@ -23,11 +21,6 @@ public class ListPublisherRevisionsView { |
23 | 21 | ||
24 | @Inject | 22 | @Inject |
25 | PublisherService publisherService; | 23 | PublisherService publisherService; |
26 | - @Inject | ||
27 | - SharedService sharedService; | ||
28 | - @Inject | ||
29 | - UserService userService; | ||
30 | - | ||
31 | 24 | ||
32 | private Integer publisherId; | 25 | private Integer publisherId; |
33 | 26 | ||
... | @@ -43,15 +36,10 @@ public class ListPublisherRevisionsView { | ... | @@ -43,15 +36,10 @@ public class ListPublisherRevisionsView { |
43 | logger.debug("validate"); | 36 | logger.debug("validate"); |
44 | Publisher publisher = publisherService.getPublisher(publisherId); | 37 | Publisher publisher = publisherService.getPublisher(publisherId); |
45 | logger.debug("publisher (pre-validate) = {}", publisher); | 38 | logger.debug("publisher (pre-validate) = {}", publisher); |
46 | - FacesContext facesContext = FacesContext.getCurrentInstance(); | 39 | + Map<String,String> params = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap(); |
47 | - Map<String,String> params = | ||
48 | - facesContext.getExternalContext().getRequestParameterMap(); | ||
49 | Integer publisherRevisionId = new Integer(params.get("publisherRevisionId")); | 40 | Integer publisherRevisionId = new Integer(params.get("publisherRevisionId")); |
50 | - publisher.setValidatedRevision(publisherService.getPublisherRevision(publisherRevisionId)); | 41 | + |
51 | - User user = sharedService.getCurrentUser(); | 42 | + publisherService.validatePublisherRevision(publisher, publisherRevisionId); |
52 | - publisher.setValidator(user); | ||
53 | - publisher.setValidationDateTime(new Timestamp(new Date().getTime())); | ||
54 | - publisherService.updatePublisher(publisher); | ||
55 | // TODO : comprendre pourquoi ceci est nécessaire | 43 | // TODO : comprendre pourquoi ceci est nécessaire |
56 | publisherRevisions = publisherService.getAllPublisherRevisions(); | 44 | publisherRevisions = publisherService.getAllPublisherRevisions(); |
57 | publisherRevisions = filter(); | 45 | publisherRevisions = filter(); |
... | @@ -61,11 +49,10 @@ public class ListPublisherRevisionsView { | ... | @@ -61,11 +49,10 @@ public class ListPublisherRevisionsView { |
61 | @PostConstruct | 49 | @PostConstruct |
62 | public void init() { | 50 | public void init() { |
63 | publisherRevisions = publisherService.getAllPublisherRevisions(); | 51 | publisherRevisions = publisherService.getAllPublisherRevisions(); |
64 | - logger.info("init"); | 52 | + logger.debug("init"); |
65 | - | ||
66 | } | 53 | } |
67 | 54 | ||
68 | - List<PublisherRevision> filter() { | 55 | + protected List<PublisherRevision> filter() { |
69 | ArrayList<PublisherRevision> filteredPublisherRevisions= new ArrayList<PublisherRevision>(); | 56 | ArrayList<PublisherRevision> filteredPublisherRevisions= new ArrayList<PublisherRevision>(); |
70 | 57 | ||
71 | for(PublisherRevision publisherRevision : publisherRevisions) { | 58 | for(PublisherRevision publisherRevision : publisherRevisions) { |
... | @@ -86,6 +73,7 @@ public class ListPublisherRevisionsView { | ... | @@ -86,6 +73,7 @@ public class ListPublisherRevisionsView { |
86 | } | 73 | } |
87 | } | 74 | } |
88 | 75 | ||
76 | + // get, set et is | ||
89 | public Integer getPublisherId() { | 77 | public Integer getPublisherId() { |
90 | return publisherId; | 78 | return publisherId; |
91 | } | 79 | } |
... | @@ -97,4 +85,4 @@ public class ListPublisherRevisionsView { | ... | @@ -97,4 +85,4 @@ public class ListPublisherRevisionsView { |
97 | public boolean isViewAll() { | 85 | public boolean isViewAll() { |
98 | return viewAll; | 86 | return viewAll; |
99 | } | 87 | } |
100 | -} | 88 | +} |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | package org.legrog.web.publisher; | 1 | package org.legrog.web.publisher; |
2 | 2 | ||
3 | import org.legrog.web.xyz.SharedService; | 3 | import org.legrog.web.xyz.SharedService; |
4 | -import org.legrog.web.user.UserService; | ||
5 | import org.legrog.entities.Country; | 4 | import org.legrog.entities.Country; |
6 | import org.legrog.entities.Publisher; | 5 | import org.legrog.entities.Publisher; |
7 | import org.legrog.entities.PublisherRevision; | 6 | import org.legrog.entities.PublisherRevision; |
... | @@ -15,10 +14,7 @@ import javax.inject.Inject; | ... | @@ -15,10 +14,7 @@ import javax.inject.Inject; |
15 | import javax.inject.Named; | 14 | import javax.inject.Named; |
16 | import java.io.Serializable; | 15 | import java.io.Serializable; |
17 | import java.sql.Timestamp; | 16 | import java.sql.Timestamp; |
18 | -import java.util.Date; | ||
19 | -import java.util.HashSet; | ||
20 | import java.util.List; | 17 | import java.util.List; |
21 | -import java.util.Set; | ||
22 | 18 | ||
23 | @Named | 19 | @Named |
24 | @ViewScoped | 20 | @ViewScoped |
... | @@ -28,8 +24,6 @@ public class PublisherRevisionView implements Serializable { | ... | @@ -28,8 +24,6 @@ public class PublisherRevisionView implements Serializable { |
28 | @Inject | 24 | @Inject |
29 | PublisherService publisherService; | 25 | PublisherService publisherService; |
30 | @Inject | 26 | @Inject |
31 | - UserService userService; | ||
32 | - @Inject | ||
33 | SharedService sharedService; | 27 | SharedService sharedService; |
34 | 28 | ||
35 | private boolean editMode; | 29 | private boolean editMode; |
... | @@ -74,9 +68,12 @@ public class PublisherRevisionView implements Serializable { | ... | @@ -74,9 +68,12 @@ public class PublisherRevisionView implements Serializable { |
74 | } | 68 | } |
75 | 69 | ||
76 | public void save() { | 70 | public void save() { |
71 | + logger.debug("save()"); | ||
77 | if (newPublisher) { | 72 | if (newPublisher) { |
73 | + logger.debug("->add"); | ||
78 | add(); | 74 | add(); |
79 | } else { | 75 | } else { |
76 | + logger.debug("->update"); | ||
80 | update(); | 77 | update(); |
81 | } | 78 | } |
82 | } | 79 | } |
... | @@ -94,33 +91,17 @@ public class PublisherRevisionView implements Serializable { | ... | @@ -94,33 +91,17 @@ public class PublisherRevisionView implements Serializable { |
94 | publisherRevision.setPublisherStreetAddress(publisherStreetAddress); | 91 | publisherRevision.setPublisherStreetAddress(publisherStreetAddress); |
95 | publisherRevision.setPublisherTelephone(publisherTelephone); | 92 | publisherRevision.setPublisherTelephone(publisherTelephone); |
96 | publisherRevision.setPublisherURL(publisherURL); | 93 | publisherRevision.setPublisherURL(publisherURL); |
97 | - | ||
98 | - publisherRevision.setPublisherRevisionDatetime(new Timestamp(new Date().getTime())); | ||
99 | - | ||
100 | - User user = sharedService.getCurrentUser(); | ||
101 | - | ||
102 | - publisherRevision.setPublisherRevisionAuthor(user); | ||
103 | - | ||
104 | } | 94 | } |
105 | 95 | ||
106 | public void add() { | 96 | public void add() { |
107 | Publisher publisher = new Publisher(); | 97 | Publisher publisher = new Publisher(); |
108 | PublisherRevision publisherRevision = new PublisherRevision(); | 98 | PublisherRevision publisherRevision = new PublisherRevision(); |
109 | - Set<PublisherRevision> publisherRevisions = new HashSet<PublisherRevision>(); | ||
110 | - publisherRevisions.add(publisherRevision); | ||
111 | - publisher.setRevisions(publisherRevisions); | ||
112 | - | ||
113 | - publisherRevision.setPublisher(publisher); | ||
114 | - | ||
115 | setValues(publisherRevision); | 99 | setValues(publisherRevision); |
116 | 100 | ||
117 | - // FIXME un seul appel logique à faire (pour la gestion du rollback) | 101 | + publisherService.addPublisherWithRevision(publisher, publisherRevision); |
118 | - publisherService.addPublisher(publisher); | 102 | + |
119 | - publisherService.addPublisherRevision(publisherRevision); | ||
120 | - | ||
121 | newPublisher = false; | 103 | newPublisher = false; |
122 | publisherRevisionId = publisherRevision.getPublisherRevisionId(); | 104 | publisherRevisionId = publisherRevision.getPublisherRevisionId(); |
123 | -// int publisherId = publisher.getPublisherId(); | ||
124 | this.publisher = publisher; | 105 | this.publisher = publisher; |
125 | publisherRevisionAuthor = publisherRevision.getPublisherRevisionAuthor(); | 106 | publisherRevisionAuthor = publisherRevision.getPublisherRevisionAuthor(); |
126 | publisherRevisionDatetime = publisherRevision.getPublisherRevisionDatetime(); | 107 | publisherRevisionDatetime = publisherRevision.getPublisherRevisionDatetime(); |
... | @@ -129,12 +110,9 @@ public class PublisherRevisionView implements Serializable { | ... | @@ -129,12 +110,9 @@ public class PublisherRevisionView implements Serializable { |
129 | 110 | ||
130 | public void update() { | 111 | public void update() { |
131 | PublisherRevision publisherRevision = new PublisherRevision(); | 112 | PublisherRevision publisherRevision = new PublisherRevision(); |
132 | - | ||
133 | setValues(publisherRevision); | 113 | setValues(publisherRevision); |
134 | 114 | ||
135 | - // FIXME un seul appel logique à faire (pour la gestion du rollback) | ||
136 | publisherService.addRevisionToPublisher(publisher, publisherRevision); | 115 | publisherService.addRevisionToPublisher(publisher, publisherRevision); |
137 | - publisherService.addPublisherRevision(publisherRevision); | ||
138 | 116 | ||
139 | editMode = false; | 117 | editMode = false; |
140 | } | 118 | } |
... | @@ -174,6 +152,7 @@ public class PublisherRevisionView implements Serializable { | ... | @@ -174,6 +152,7 @@ public class PublisherRevisionView implements Serializable { |
174 | 152 | ||
175 | } | 153 | } |
176 | 154 | ||
155 | + // get, set et is | ||
177 | public int getPublisherRevisionId() { | 156 | public int getPublisherRevisionId() { |
178 | return publisherRevisionId; | 157 | return publisherRevisionId; |
179 | } | 158 | } | ... | ... |
... | @@ -7,18 +7,16 @@ import java.util.List; | ... | @@ -7,18 +7,16 @@ import java.util.List; |
7 | 7 | ||
8 | public interface PublisherService { | 8 | public interface PublisherService { |
9 | 9 | ||
10 | - void addPublisher(Publisher publisher); | 10 | + void addPublisherWithRevision(Publisher publisher, PublisherRevision publisherRevision); |
11 | 11 | ||
12 | - void updatePublisher(Publisher publisher); | 12 | + void validatePublisherRevision(Publisher publisher, Integer publisherRevisionId); |
13 | 13 | ||
14 | void addRevisionToPublisher(Publisher publisher, PublisherRevision publisherRevision); | 14 | void addRevisionToPublisher(Publisher publisher, PublisherRevision publisherRevision); |
15 | 15 | ||
16 | - List<Publisher> getAllPublishers(); | 16 | +// List<Publisher> getAllPublishers(); |
17 | 17 | ||
18 | Publisher getPublisher(Integer publisherId); | 18 | Publisher getPublisher(Integer publisherId); |
19 | 19 | ||
20 | - void addPublisherRevision(PublisherRevision publisherRevision); | ||
21 | - | ||
22 | List<PublisherRevision> getAllPublisherRevisions(); | 20 | List<PublisherRevision> getAllPublisherRevisions(); |
23 | 21 | ||
24 | PublisherRevision getPublisherRevision(Integer publisherRevisionId); | 22 | PublisherRevision getPublisherRevision(Integer publisherRevisionId); | ... | ... |
1 | package org.legrog.web.publisher; | 1 | package org.legrog.web.publisher; |
2 | 2 | ||
3 | 3 | ||
4 | -import org.legrog.entities.Publisher; | 4 | +import org.legrog.entities.*; |
5 | -import org.legrog.entities.PublisherRepository; | 5 | +import org.legrog.web.xyz.SharedService; |
6 | -import org.legrog.entities.PublisherRevision; | ||
7 | -import org.legrog.entities.PublisherRevisionRepository; | ||
8 | 6 | ||
9 | import javax.ejb.Stateless; | 7 | import javax.ejb.Stateless; |
10 | import javax.inject.Inject; | 8 | import javax.inject.Inject; |
9 | +import java.sql.Timestamp; | ||
10 | +import java.util.Date; | ||
11 | +import java.util.HashSet; | ||
11 | import java.util.List; | 12 | import java.util.List; |
12 | import java.util.Set; | 13 | import java.util.Set; |
13 | 14 | ||
... | @@ -19,39 +20,61 @@ public class PublisherServiceSpring implements PublisherService { | ... | @@ -19,39 +20,61 @@ public class PublisherServiceSpring implements PublisherService { |
19 | @Inject | 20 | @Inject |
20 | PublisherRevisionRepository publisherRevisionRepository; | 21 | PublisherRevisionRepository publisherRevisionRepository; |
21 | 22 | ||
22 | - public void addPublisherRevision(PublisherRevision publisherRevision) { | 23 | + @Inject |
23 | - publisherRevisionRepository.save(publisherRevision); | 24 | + SharedService sharedService; |
25 | + | ||
26 | + public void addPublisherWithRevision(Publisher publisher, PublisherRevision publisherRevision) { | ||
27 | + Set<PublisherRevision> publisherRevisions = new HashSet<PublisherRevision>(); | ||
28 | + publisherRevisions.add(publisherRevision); | ||
29 | + publisher.setRevisions(publisherRevisions); | ||
30 | + publisherRevision.setPublisher(publisher); | ||
31 | + publisherRevision.setPublisherRevisionAuthor(sharedService.getCurrentUser()); | ||
32 | + publisherRevision.setPublisherRevisionDatetime(new Timestamp(new Date().getTime())); | ||
33 | + this.savePublisherRevision(publisherRevision); | ||
34 | + this.savePublisher(publisher); | ||
24 | } | 35 | } |
25 | 36 | ||
26 | - public List<PublisherRevision> getAllPublisherRevisions() { | 37 | + public void addRevisionToPublisher(Publisher publisher, PublisherRevision publisherRevision) { |
27 | - return publisherRevisionRepository.findAll(); | 38 | + Set<PublisherRevision> publisherRevisionSet = publisher.getRevisions(); |
39 | + publisherRevisionSet.add(publisherRevision); | ||
40 | + publisher.setRevisions(publisherRevisionSet); | ||
41 | + publisherRevision.setPublisher(publisher); | ||
42 | + publisherRevision.setPublisherRevisionAuthor(sharedService.getCurrentUser()); | ||
43 | + publisherRevision.setPublisherRevisionDatetime(new Timestamp(new Date().getTime())); | ||
44 | + this.savePublisherRevision(publisherRevision); | ||
45 | + this.savePublisher(publisher); | ||
28 | } | 46 | } |
29 | 47 | ||
30 | - public PublisherRevision getPublisherRevision(Integer publisherRevisionId) { | 48 | + public void validatePublisherRevision(Publisher publisher, Integer publisherRevisionId) { |
31 | - return publisherRevisionRepository.findOne(publisherRevisionId); | 49 | + publisher.setValidatedRevision(this.getPublisherRevision(publisherRevisionId)); |
50 | + publisher.setValidator(sharedService.getCurrentUser()); | ||
51 | + publisher.setValidationDateTime(new Timestamp(new Date().getTime())); | ||
52 | + this.savePublisher(publisher); | ||
32 | } | 53 | } |
33 | 54 | ||
34 | - public void addPublisher(Publisher publisher) { | 55 | + protected void savePublisherRevision(PublisherRevision publisherRevision) { |
35 | - publisherRepository.save(publisher); | 56 | + publisherRevisionRepository.save(publisherRevision); |
36 | } | 57 | } |
37 | 58 | ||
38 | - public void updatePublisher(Publisher publisher) { | 59 | + protected void savePublisher(Publisher publisher) { |
39 | publisherRepository.save(publisher); | 60 | publisherRepository.save(publisher); |
40 | } | 61 | } |
41 | 62 | ||
42 | - public void addRevisionToPublisher(Publisher publisher, PublisherRevision publisherRevision) { | 63 | + // get |
43 | - Set<PublisherRevision> publisherRevisionSet = publisher.getRevisions(); | 64 | + public List<PublisherRevision> getAllPublisherRevisions() { |
44 | - publisherRevisionSet.add(publisherRevision); | 65 | + return publisherRevisionRepository.findAll(); |
45 | - publisher.setRevisions(publisherRevisionSet); | 66 | + } |
46 | - publisherRevision.setPublisher(publisher); | 67 | + |
47 | - publisherRepository.save(publisher); | 68 | + public PublisherRevision getPublisherRevision(Integer publisherRevisionId) { |
69 | + return publisherRevisionRepository.findOne(publisherRevisionId); | ||
48 | } | 70 | } |
49 | 71 | ||
50 | public Publisher getPublisher(Integer publisherId) { | 72 | public Publisher getPublisher(Integer publisherId) { |
51 | return publisherRepository.findOne(publisherId); | 73 | return publisherRepository.findOne(publisherId); |
52 | } | 74 | } |
53 | - | 75 | +/* |
54 | public List<Publisher> getAllPublishers() { | 76 | public List<Publisher> getAllPublishers() { |
55 | return publisherRepository.findAll(); | 77 | return publisherRepository.findAll(); |
56 | } | 78 | } |
79 | + */ | ||
57 | } | 80 | } | ... | ... |
... | @@ -47,56 +47,56 @@ | ... | @@ -47,56 +47,56 @@ |
47 | </h:column> | 47 | </h:column> |
48 | <h:column> | 48 | <h:column> |
49 | <f:facet name="header">Name</f:facet> | 49 | <f:facet name="header">Name</f:facet> |
50 | - #{revision.publisherName} | 50 | + ${revision.publisherName} |
51 | </h:column> | 51 | </h:column> |
52 | <h:column> | 52 | <h:column> |
53 | <f:facet name="header">Address</f:facet> | 53 | <f:facet name="header">Address</f:facet> |
54 | - #{revision.publisherPostOfficeBoxNumber}<br /> | 54 | + ${revision.publisherPostOfficeBoxNumber}<br /> |
55 | - #{revision.publisherStreetAddress}<br /> | 55 | + ${revision.publisherStreetAddress}<br /> |
56 | - #{revision.publisherPostalCode} #{revision.publisherAddressLocality}<br /> | 56 | + ${revision.publisherPostalCode} ${revision.publisherAddressLocality}<br /> |
57 | - #{revision.publisherAddressRegion}<br /> | 57 | + ${revision.publisherAddressRegion}<br /> |
58 | - #{revision.publisherAddressCountry.countryName} | 58 | + ${revision.publisherAddressCountry.countryName} |
59 | </h:column> | 59 | </h:column> |
60 | <h:column> | 60 | <h:column> |
61 | <f:facet name="header">Telephone</f:facet> | 61 | <f:facet name="header">Telephone</f:facet> |
62 | - #{revision.publisherTelephone} | 62 | + ${revision.publisherTelephone} |
63 | </h:column> | 63 | </h:column> |
64 | <h:column> | 64 | <h:column> |
65 | <f:facet name="header">Email</f:facet> | 65 | <f:facet name="header">Email</f:facet> |
66 | - #{revision.publisherEmail} | 66 | + ${revision.publisherEmail} |
67 | </h:column> | 67 | </h:column> |
68 | <h:column> | 68 | <h:column> |
69 | <f:facet name="header">URL</f:facet> | 69 | <f:facet name="header">URL</f:facet> |
70 | - #{revision.publisherURL} | 70 | + ${revision.publisherURL} |
71 | </h:column> | 71 | </h:column> |
72 | <h:column> | 72 | <h:column> |
73 | <f:facet name="header">Active ?</f:facet> | 73 | <f:facet name="header">Active ?</f:facet> |
74 | - #{revision.publisherActive} | 74 | + ${revision.publisherActive} |
75 | </h:column> | 75 | </h:column> |
76 | <h:column> | 76 | <h:column> |
77 | <f:facet name="header">History</f:facet> | 77 | <f:facet name="header">History</f:facet> |
78 | - #{revision.publisherHistory} | 78 | + ${revision.publisherHistory} |
79 | </h:column> | 79 | </h:column> |
80 | <h:column> | 80 | <h:column> |
81 | <f:facet name="header">Revision Author</f:facet> | 81 | <f:facet name="header">Revision Author</f:facet> |
82 | - #{revision.publisherRevisionAuthor.displayName} | 82 | + ${revision.publisherRevisionAuthor.displayName} |
83 | </h:column> | 83 | </h:column> |
84 | <h:column> | 84 | <h:column> |
85 | <f:facet name="header">Revision Datetime</f:facet> | 85 | <f:facet name="header">Revision Datetime</f:facet> |
86 | - #{revision.publisherRevisionDatetime} | 86 | + ${revision.publisherRevisionDatetime} |
87 | </h:column> | 87 | </h:column> |
88 | <h:column> | 88 | <h:column> |
89 | <f:facet name="header">Validation author</f:facet> | 89 | <f:facet name="header">Validation author</f:facet> |
90 | - <h:outputText rendered="#{revision.publisherRevisionId == revision.publisher.validatedRevision.publisherRevisionId}"> | 90 | + <div jsf:rendered="#{revision.publisherRevisionId == revision.publisher.validatedRevision.publisherRevisionId}"> |
91 | - #{revision.publisher.validator.displayName} | 91 | + ${revision.publisher.validator.displayName} |
92 | - </h:outputText> | 92 | + </div> |
93 | </h:column> | 93 | </h:column> |
94 | <h:column> | 94 | <h:column> |
95 | <f:facet name="header">Validation Datetime</f:facet> | 95 | <f:facet name="header">Validation Datetime</f:facet> |
96 | - <h:outputText rendered="#{revision.publisherRevisionId == revision.publisher.validatedRevision.publisherRevisionId}"> | 96 | + <div jsf:rendered="#{revision.publisherRevisionId == revision.publisher.validatedRevision.publisherRevisionId}"> |
97 | - #{revision.publisher.validationDateTime} | 97 | + ${revision.publisher.validationDateTime} |
98 | - </h:outputText> | 98 | + </div> |
99 | </h:column> | 99 | </h:column> |
100 | </h:dataTable> | 100 | </h:dataTable> |
101 | </body> | 101 | </body> |
102 | -</html> | 102 | +</html> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -25,39 +25,39 @@ | ... | @@ -25,39 +25,39 @@ |
25 | </ul> | 25 | </ul> |
26 | 26 | ||
27 | <h:panelGrid columns="2"> | 27 | <h:panelGrid columns="2"> |
28 | - publisherName | 28 | + <label for="publisherName">publisherName</label> |
29 | - <input type="text" value='#{publisherRevisionView.publisherName}' jsf:disabled="#{not publisherRevisionView.editMode}"/> | 29 | + <input type="text" id="publisherName" jsf:value='#{publisherRevisionView.publisherName}' jsf:disabled="#{not publisherRevisionView.editMode}"/> |
30 | - publisherStreetAddress | 30 | + <label for="publisherStreetAddress">publisherStreetAddress</label> |
31 | - <input type="text" value='#{publisherRevisionView.publisherStreetAddress}' jsf:disabled="#{not publisherRevisionView.editMode}"/> | 31 | + <input type="text" id="publisherStreetAddress" jsf:value='#{publisherRevisionView.publisherStreetAddress}' jsf:disabled="#{not publisherRevisionView.editMode}"/> |
32 | - publisherPostalCode | 32 | + <label for="publisherPostalCode">publisherPostalCode</label> |
33 | - <input type="text" value='#{publisherRevisionView.publisherPostalCode}' jsf:disabled="#{not publisherRevisionView.editMode}"/> | 33 | + <input type="text" id="publisherPostalCode" jsf:value='#{publisherRevisionView.publisherPostalCode}' jsf:disabled="#{not publisherRevisionView.editMode}"/> |
34 | - publisherPostOfficeBoxNumber | 34 | + <label for="publisherPostOfficeBoxNumber">publisherPostOfficeBoxNumber</label> |
35 | - <input type="text" value='#{publisherRevisionView.publisherPostOfficeBoxNumber}' jsf:disabled="#{not publisherRevisionView.editMode}"/> | 35 | + <input type="text" id="publisherPostOfficeBoxNumber" jsf:value='#{publisherRevisionView.publisherPostOfficeBoxNumber}' jsf:disabled="#{not publisherRevisionView.editMode}"/> |
36 | - publisherAddressRegion | 36 | + <label for="publisherAddressRegion">publisherAddressRegion</label> |
37 | - <input type="text" value='#{publisherRevisionView.publisherAddressRegion}' jsf:disabled="#{not publisherRevisionView.editMode}"/> | 37 | + <input type="text" id="publisherAddressRegion" jsf:value='#{publisherRevisionView.publisherAddressRegion}' jsf:disabled="#{not publisherRevisionView.editMode}"/> |
38 | - publisherAddressLocality | 38 | + <label for="publisherAddressLocality">publisherAddressLocality</label> |
39 | - <input type="text" value='#{publisherRevisionView.publisherAddressLocality}' jsf:disabled="#{not publisherRevisionView.editMode}"/> | 39 | + <input type="text" id="publisherAddressLocality" jsf:value='#{publisherRevisionView.publisherAddressLocality}' jsf:disabled="#{not publisherRevisionView.editMode}"/> |
40 | 40 | ||
41 | - publisherAddressCountry | 41 | + <label for="publisherAddressCountry">publisherAddressCountry</label> |
42 | - <h:selectOneMenu value="#{publisherRevisionView.publisherAddressCountry}" converter="omnifaces.SelectItemsConverter" disabled="#{not publisherRevisionView.editMode}"> | 42 | + <h:selectOneMenu id="publisherAddressCountry" value="#{publisherRevisionView.publisherAddressCountry}" converter="omnifaces.SelectItemsConverter" disabled="#{not publisherRevisionView.editMode}"> |
43 | - <f:selectItems value="#{publisherRevisionView.availableCountries}" var="country" itemLabel="#{country.countryName}"/> | 43 | + <f:selectItems value="#{publisherRevisionView.availableCountries}" var="country" itemLabel="#{country.countryName}"/> |
44 | - </h:selectOneMenu> | 44 | + </h:selectOneMenu> |
45 | 45 | ||
46 | - publisherTelephone | 46 | + <label for="publisherTelephone">publisherTelephone</label> |
47 | - <input type="text" value='#{publisherRevisionView.publisherTelephone}' jsf:disabled="#{not publisherRevisionView.editMode}"/> | 47 | + <input type="text" id="publisherTelephone" jsf:value='#{publisherRevisionView.publisherTelephone}' jsf:disabled="#{not publisherRevisionView.editMode}"/> |
48 | - publisherEmail | 48 | + <label for="publisherEmail">publisherEmail</label> |
49 | - <input type="text" value='#{publisherRevisionView.publisherEmail}' jsf:disabled="#{not publisherRevisionView.editMode}"/> | 49 | + <input type="text" id="publisherEmail" jsf:value='#{publisherRevisionView.publisherEmail}' jsf:disabled="#{not publisherRevisionView.editMode}"/> |
50 | - publisherURL | 50 | + <label for="publisherURL">publisherURL</label> |
51 | - <input type="text" value='#{publisherRevisionView.publisherURL}' jsf:disabled="#{not publisherRevisionView.editMode}"/> | 51 | + <input type="text" id="publisherURL" jsf:value='#{publisherRevisionView.publisherURL}' jsf:disabled="#{not publisherRevisionView.editMode}"/> |
52 | 52 | ||
53 | - publisherActive | 53 | + <label for="publisherActive">publisherActive</label> |
54 | - <input type="checkbox" jsf:disabled="#{not publisherRevisionView.editMode}" value="#{publisherRevisionView.publisherActive}"/> | 54 | + <input type="checkbox" id="publisherActive" jsf:disabled="#{not publisherRevisionView.editMode}" jsf:value="#{publisherRevisionView.publisherActive}"/> |
55 | <ui:remove> | 55 | <ui:remove> |
56 | <h:selectBooleanCheckbox value="#{publisherRevisionView.publisherActive}" disabled="#{not publisherRevisionView.editMode}"/> | 56 | <h:selectBooleanCheckbox value="#{publisherRevisionView.publisherActive}" disabled="#{not publisherRevisionView.editMode}"/> |
57 | </ui:remove> | 57 | </ui:remove> |
58 | 58 | ||
59 | - publisherHistory | 59 | + <label for="publisherHistory">publisherHistory</label> |
60 | - <textarea rows="" cols="" jsf:disabled="#{not publisherRevisionView.editMode}" jsf:value="#{publisherRevisionView.publisherHistory}"/> | 60 | + <textarea id="publisherHistory" rows="" cols="" jsf:disabled="#{not publisherRevisionView.editMode}" jsf:value="#{publisherRevisionView.publisherHistory}"/> |
61 | 61 | ||
62 | <div jsf:rendered="#{not publisherRevisionView.newPublisher}">publisherRevisionAuthor</div> | 62 | <div jsf:rendered="#{not publisherRevisionView.newPublisher}">publisherRevisionAuthor</div> |
63 | <div jsf:rendered="#{not publisherRevisionView.newPublisher}">#{publisherRevisionView.publisherRevisionAuthor.displayName}</div> | 63 | <div jsf:rendered="#{not publisherRevisionView.newPublisher}">#{publisherRevisionView.publisherRevisionAuthor.displayName}</div> | ... | ... |
-
Please register or login to post a comment