[jboss-svn-commits] JBL Code SVN: r11965 - in labs/jbossforums/trunk/forums/src: resources/portal-forums-war/views/topics and 1 other directory.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Sat May 19 21:09:04 EDT 2007
Author: unibrew
Date: 2007-05-19 21:09:04 -0400 (Sat, 19 May 2007)
New Revision: 11965
Modified:
labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/PostAction.java
labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/posting_edit_body.xhtml
labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/posting_new_body.xhtml
labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/posting_reply_body.xhtml
Log:
[JBFORUMS-240] After terribly long and annoying fight with JSF I finally repaired all indexing for polls and attachments.
Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/PostAction.java
===================================================================
--- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/PostAction.java 2007-05-20 01:08:51 UTC (rev 11964)
+++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/PostAction.java 2007-05-20 01:09:04 UTC (rev 11965)
@@ -494,6 +494,14 @@
{
String optionIndex = ForumUtil.getParameter(Constants.p_option);
this.options.remove(optionIndex);
+ Iterator it = this.options.keySet().iterator();
+ Map temporary = new TreeMap();
+ byte counter = 1;
+ while (it.hasNext())
+ {
+ temporary.put(Byte.toString(counter++), this.options.get(it.next()));
+ }
+ this.options = temporary;
}
catch(Exception e)
{
Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/posting_edit_body.xhtml
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/posting_edit_body.xhtml 2007-05-20 01:08:51 UTC (rev 11964)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/posting_edit_body.xhtml 2007-05-20 01:09:04 UTC (rev 11965)
@@ -503,9 +503,9 @@
<span class="genmed">
<input type="text" id="option_${idx.index}" name="option_${idx.index}" value="${optionRow}" size="50" class="post" maxlength="255"/>
</span> 
- <h:commandButton action="#{editPost.updateOption}" value="${resource.Update}" styleClass="liteoption"
+ <h:commandButton id="UpdateOption_${idx.index}" action="#{editPost.updateOption}" value="${resource.Update}" styleClass="liteoption"
onclick="selectOption(${idx.index});"/>
- <h:commandButton action="#{editPost.deleteOption}" value="${resource.Delete}" styleClass="liteoption"
+ <h:commandButton id="DeleteOption_${idx.index}" action="#{editPost.deleteOption}" value="${resource.Delete}" styleClass="liteoption"
onclick="selectOption(${idx.index});"/>
</td>
</tr>
@@ -609,9 +609,9 @@
<td class="row1"><span class="gen"><b>${resource.Options}</b></span></td>
<td class="row2"><span class="genmed">
 
- <h:commandButton action="#{editPost.updateAttachment}" value="${resource.Update_comment}" styleClass="liteoption"
+ <h:commandButton id="UpdateAttachment_${idx.index}" action="#{editPost.updateAttachment}" value="${resource.Update_comment}" styleClass="liteoption"
onclick="selectAttachment('${idx.index}');"/>  
- <h:commandButton action="#{editPost.deleteAttachment}" value="${resource.Delete_attachment}" styleClass="liteoption"
+ <h:commandButton id="DeleteAttachment_${idx.index}" action="#{editPost.deleteAttachment}" value="${resource.Delete_attachment}" styleClass="liteoption"
onclick="selectAttachment('${idx.index}');"/>
</span>
</td>
Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/posting_new_body.xhtml
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/posting_new_body.xhtml 2007-05-20 01:08:51 UTC (rev 11964)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/posting_new_body.xhtml 2007-05-20 01:09:04 UTC (rev 11965)
@@ -506,9 +506,9 @@
<span class="genmed">
<input type="text" id="option_${idx.index}" name="option_${idx.index}" value="${optionRow}" size="50" class="post" maxlength="255"/>
</span> 
- <h:commandButton action="#{newTopic.updateOption}" value="${resource.Update}" styleClass="liteoption"
+ <h:commandButton id="UpdateOption_${idx.index}" action="#{newTopic.updateOption}" value="${resource.Update}" styleClass="liteoption"
onclick="selectOption(${idx.index});"/>
- <h:commandButton action="#{newTopic.deleteOption}" value="${resource.Delete}" styleClass="liteoption"
+ <h:commandButton id="DeleteOption_${idx.index}" action="#{newTopic.deleteOption}" value="${resource.Delete}" styleClass="liteoption"
onclick="selectOption(${idx.index});"/>
</td>
</tr>
@@ -606,10 +606,10 @@
<td class="row1"><span class="gen"><b>${resource.Options}</b></span></td>
<td class="row2"><span class="genmed">
 
- <h:commandButton action="#{newTopic.updateAttachment}" value="${resource.Update_comment}" styleClass="liteoption"
+ <h:commandButton id="UpdateAttachment_${idx.index}" action="#{newTopic.updateAttachment}" value="${resource.Update_comment}" styleClass="liteoption"
onclick="selectAttachment('${idx.index}');"/>
 
- <h:commandButton action="#{newTopic.deleteAttachment}" value="${resource.Delete_attachment}" styleClass="liteoption"
+ <h:commandButton id="DeleteAttachment_${idx.index}" action="#{newTopic.deleteAttachment}" value="${resource.Delete_attachment}" styleClass="liteoption"
onclick="selectAttachment('${idx.index}');"/>
</span>
</td>
Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/posting_reply_body.xhtml
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/posting_reply_body.xhtml 2007-05-20 01:08:51 UTC (rev 11964)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/posting_reply_body.xhtml 2007-05-20 01:09:04 UTC (rev 11965)
@@ -515,10 +515,10 @@
<td class="row1"><span class="gen"><b>${resource.Options}</b></span></td>
<td class="row2"><span class="genmed">
 
- <h:commandButton action="#{replyTopic.updateAttachment}" value="${resource.Update_comment}" styleClass="liteoption"
+ <h:commandButton id="UpdateAttachment_${idx.index}" action="#{replyTopic.updateAttachment}" value="${resource.Update_comment}" styleClass="liteoption"
onclick="selectAttachment('${idx.index}');"/>
 
- <h:commandButton action="#{replyTopic.deleteAttachment}" value="${resource.Delete_attachment}" styleClass="liteoption"
+ <h:commandButton id="DeleteAttachment_${idx.index}" action="#{replyTopic.deleteAttachment}" value="${resource.Delete_attachment}" styleClass="liteoption"
onclick="selectAttachment('${idx.index}');"/>
</span>
</td>
More information about the jboss-svn-commits
mailing list