[vlma-devel] commit: Fix the selection of announcements when creating a new program. ( Adrien Grand )
git version control
git at videolan.org
Sun Aug 31 22:00:33 CEST 2008
vlma | branch: master | Adrien Grand <jpountz at videolan.org> | Sun Aug 31 21:38:43 2008 +0200| [b135d5a5abe603726ad5f29382c46e045b6a07fe] | committer: Adrien Grand
Fix the selection of announcements when creating a new program.
> http://git.videolan.org/gitweb.cgi/vlma.git/?a=commit;h=b135d5a5abe603726ad5f29382c46e045b6a07fe
---
.../videolan/vlma/web/media/MediaProgramAdd.java | 3 ++-
.../WEB-INF/jsp/media/mediaprogramadd_right.jsp | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/vlma-webapp/src/main/java/org/videolan/vlma/web/media/MediaProgramAdd.java b/vlma-webapp/src/main/java/org/videolan/vlma/web/media/MediaProgramAdd.java
index 1c701db..5b46a20 100644
--- a/vlma-webapp/src/main/java/org/videolan/vlma/web/media/MediaProgramAdd.java
+++ b/vlma-webapp/src/main/java/org/videolan/vlma/web/media/MediaProgramAdd.java
@@ -108,7 +108,8 @@ public class MediaProgramAdd {
public Set<StreamingStrategy.Announcement> getAnnouncements() {
Set<StreamingStrategy.Announcement> result = new HashSet<StreamingStrategy.Announcement>();
for(AnnouncementCheckbox a : getAnnouncementCheckboxes()) {
- result.add(a.getAnnouncement());
+ if (a.getChecked())
+ result.add(a.getAnnouncement());
}
return result;
}
diff --git a/vlma-webapp/src/main/webapp/WEB-INF/jsp/media/mediaprogramadd_right.jsp b/vlma-webapp/src/main/webapp/WEB-INF/jsp/media/mediaprogramadd_right.jsp
index 4417f64..39c76ea 100644
--- a/vlma-webapp/src/main/webapp/WEB-INF/jsp/media/mediaprogramadd_right.jsp
+++ b/vlma-webapp/src/main/webapp/WEB-INF/jsp/media/mediaprogramadd_right.jsp
@@ -57,7 +57,8 @@
<td align="right"><fmt:message key="medias.program.add.announcements" /></td>
<td><c:forEach items="${mediaProgramAdd.announcementCheckboxes}" var="announcementOption" varStatus="loopStatus">
<spring:bind path="mediaProgramAdd.announcementCheckboxes[${loopStatus.index}].checked">
- <input type="checkbox" name="${announcementOption.announcement}" value="true" <c:if test="${announcementOption.checked}">checked="checked"</c:if>/>
+ <input type="hidden" name="_<c:out value="${status.expression}"/>" />
+ <input type="checkbox" name="<c:out value="${status.expression}"/>" <c:if test="${announcementOption.checked}">checked="checked"</c:if> />
<c:out value="${announcementOption.announcement}" />
${status.errorCode}
<br />
More information about the vlma-devel
mailing list