commandButton not calling action
ikhnaton May 15, 2009 6:29 PMIn the segment of code below, for some odd reason, I am seeing two strange effects.
1. The form submission never calls my validator.
2. rcounter has no value when i try to use it in the form id, but it does have a value in the hidden field.
I am using SEAM 2.1.1.GA, Richfaces 3.3.0 GA, and JSF 1.2_09-b01-BETA1.
Any help in resolving these issue would be greatly appreciated.
<s:div rendered="#{commentViewList.hasData(imageFullView.id)}">
<rich:dataTable value="#{commentViewList.getCommentViewList(imageFullView.id)}" var="com" rowKeyVar="rcounter" id="table" columnsWidth="100px,500px,100px" >
<rich:column sortable="false" styleClass="commentBorder">
<f:facet name="header">
<h:outputText value="Name"/>
</f:facet>
<h:outputText value="#{com.name}"/>
</rich:column>
<rich:column sortable="false" styleClass="commentBorder">
<f:facet name="header">
<h:outputText value="Comment"/>
</f:facet>
<h:outputText value="#{com.comment}"/>
</rich:column>
<rich:column sortable="false" styleClass="commentBorder">
<f:facet name="header">
<h:outputText value="Time"/>
</f:facet>
<h:outputText value="#{com.time}"/>
</rich:column>
<rich:column sortable="false" styleClass="commentBorder" rendered="#{commentViewList.hasCommentByCurrentUser()}">
<f:facet name="header">
<h:outputText value="Delete"/>
</f:facet>
<s:fragment rendered="#{(com.uid eq servletUtils.userID) or imageFullView.isOwner()}">
<h:form id="delComment_#{rcounter}">
<h:inputHidden id="delValue" value="#{com.id}" />
<h:inputHidden id="delImage" value="#{imageFullView.id}" />
<h:inputHidden id="count" value="#{rcounter}" />
<h:commandButton type="submit" action="#{deleteCommentValidator.validate}" value="X" />
</h:form>
</s:fragment>
</rich:column>
</rich:dataTable>
</s:div>
1. The form submission never calls my validator.
2. rcounter has no value when i try to use it in the form id, but it does have a value in the hidden field.
I am using SEAM 2.1.1.GA, Richfaces 3.3.0 GA, and JSF 1.2_09-b01-BETA1.
Any help in resolving these issue would be greatly appreciated.
<s:div rendered="#{commentViewList.hasData(imageFullView.id)}">
<rich:dataTable value="#{commentViewList.getCommentViewList(imageFullView.id)}" var="com" rowKeyVar="rcounter" id="table" columnsWidth="100px,500px,100px" >
<rich:column sortable="false" styleClass="commentBorder">
<f:facet name="header">
<h:outputText value="Name"/>
</f:facet>
<h:outputText value="#{com.name}"/>
</rich:column>
<rich:column sortable="false" styleClass="commentBorder">
<f:facet name="header">
<h:outputText value="Comment"/>
</f:facet>
<h:outputText value="#{com.comment}"/>
</rich:column>
<rich:column sortable="false" styleClass="commentBorder">
<f:facet name="header">
<h:outputText value="Time"/>
</f:facet>
<h:outputText value="#{com.time}"/>
</rich:column>
<rich:column sortable="false" styleClass="commentBorder" rendered="#{commentViewList.hasCommentByCurrentUser()}">
<f:facet name="header">
<h:outputText value="Delete"/>
</f:facet>
<s:fragment rendered="#{(com.uid eq servletUtils.userID) or imageFullView.isOwner()}">
<h:form id="delComment_#{rcounter}">
<h:inputHidden id="delValue" value="#{com.id}" />
<h:inputHidden id="delImage" value="#{imageFullView.id}" />
<h:inputHidden id="count" value="#{rcounter}" />
<h:commandButton type="submit" action="#{deleteCommentValidator.validate}" value="X" />
</h:form>
</s:fragment>
</rich:column>
</rich:dataTable>
</s:div>