You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Gérard COLLIN <ge...@netonomy.com> on 2005/07/28 18:18:27 UTC

embedded x:dataTable bug ?

Hello,
 Using myfaces 1.09, if I embed a x:dataTable inside another one, then the model values are wrongly updated for the embedded table.
(I.E. It seems the model for the first row is updated with the data entered for the last one)
Moreover, If I change the x:datatable to h:datatable, then it works fine.
 For example:
	<x:dataTable id="container"...>
		...
		<h:column>
			<x:dataTable id="embeded"...>
				<...>
			</x:dataTable>
		</h:column>
	</x:dataTable>
Does not update model of the "embeded" datatable, whereas
	<x:dataTable id="container"...>
		...
		<h:column>
			<h:dataTable id="embeded"...>
				<...>
			</h:dataTable>
		</h:column>
	</x:dataTable>
works fine.

 Should I write a jira bug for this ?

 Gérard COLLIN.

PS: The complete source of my tables as seen in my jsp:

     	 <x:dataTable id="descriptorList" styleClass="listTable"
                        var="descriptor"
                        value="#{AttachProductTypeAttributesPage.descriptorList.list}"
                        sortColumn="#{CatalogContextBean.attributeDefinitionListContext.sortColumn}"
                        sortAscending="#{CatalogContextBean.attributeDefinitionListContext.ascending}"
                        preserveSort="true" 
                        preserveDataModel="false"
                        rows="10"
                        >
                    <f:facet name="header">
                        <h:outputText value="#{bundle.Title_Property_List}"  />
                    </f:facet>

                    <f:facet name="footer">
		                <n:fieldSet styleClass="button">
	                		<h:commandButton action="#{AttachProductTypeAttributesPage.modifyList}" value="#{bundle.Button_Submit}"/>
		                </n:fieldSet>
                    </f:facet>
                    <h:column>
                        <f:facet name="header">
                            <x:commandSortHeader columnName="columnBehavior" arrow="true">
                                <h:outputText value="BEHAVIORS" />
                            </x:commandSortHeader>
                        </f:facet>
                       		<h:dataTable id="behaviors" value="#{AttachProductTypeAttributesPage.behaviorQualifierValues}" var="qualifier">
                       			<h:column>
		                        	<h:outputLabel for="attached" value="#{qualifier.name}"></h:outputLabel>
			                        <h:selectBooleanCheckbox id="attached" value="#{AttachProductTypeAttributesPage.wrappedBehaviorValue.attached}"/>
			                        <h:inputText rendered="#{AttachProductTypeAttributesPage.wrappedBehaviorValue.integerValue}" value="#{AttachProductTypeAttributesPage.wrappedBehaviorValue.value}"/>
			                        <h:selectOneMenu rendered="#{AttachProductTypeAttributesPage.wrappedBehaviorValue.booleanValue}" value="#{AttachProductTypeAttributesPage.wrappedBehaviorValue.value}">
			                        	<f:selectItem itemLabel="true" itemValue="true"/> 
			                        	<f:selectItem itemLabel="false" itemValue="false"/> 
			                        </h:selectOneMenu>
			                        <f:verbatim><br/></f:verbatim>
			                    </h:column>
			                </h:dataTable>
                    </h:column>

                </x:dataTable>

Re: embedded x:dataTable bug ?

Posted by Gérard COLLIN <ge...@netonomy.com>.
Thanx !

 Gérard

On Thursday 28 July 2005 18:21, Bruno Aranda wrote:
> Yes, Gérard, nesting tables is a known issue which has been already
> fixed. You can try with a nightly build...
>
> Regards,
>
> Bruno
>
> 2005/7/28, Gérard COLLIN <ge...@netonomy.com>:
> > Hello,
> >
> >  Using myfaces 1.09, if I embed a x:dataTable inside another one, then
> > the model values are wrongly updated for the embedded table.
> >
> > (I.E. It seems the model for the first row is updated with the data
> > entered for the last one)
> >
> > Moreover, If I change the x:datatable to h:datatable, then it works fine.
> >
> >  For example:
> >
> >  <x:dataTable id="container"...>
> >
> >  ...
> >
> >  <h:column>
> >
> >  <x:dataTable id="embeded"...>
> >
> >  <...>
> >
> >  </x:dataTable>
> >
> >  </h:column>
> >
> >  </x:dataTable>
> >
> > Does not update model of the "embeded" datatable, whereas
> >
> >  <x:dataTable id="container"...>
> >
> >  ...
> >
> >  <h:column>
> >
> >  <h:dataTable id="embeded"...>
> >
> >  <...>
> >
> >  </h:dataTable>
> >
> >  </h:column>
> >
> >  </x:dataTable>
> >
> > works fine.
> >
> >
> >
> >  Should I write a jira bug for this ?
> >
> >
> >
> >  Gérard COLLIN.
> >
> >
> >
> > PS: The complete source of my tables as seen in my jsp:
> >
> >
> >
> >  <x:dataTable id="descriptorList" styleClass="listTable"
> >
> >  var="descriptor"
> >
> > value="#{AttachProductTypeAttributesPage.descriptorList.list}"
> >
> > sortColumn="#{CatalogContextBean.attributeDefinitionListContext.sortColum
> >n}"
> >
> > sortAscending="#{CatalogContextBean.attributeDefinitionListContext.ascend
> >ing}"
> >
> >  preserveSort="true"
> >
> >  preserveDataModel="false"
> >
> >  rows="10"
> >
> >
> >
> >  <f:facet name="header">
> >
> >  <h:outputText value="#{bundle.Title_Property_List}" />
> >
> >  </f:facet>
> >
> >
> >
> >  <f:facet name="footer">
> >
> >  <n:fieldSet styleClass="button">
> >
> >  <h:commandButton
> > action="#{AttachProductTypeAttributesPage.modifyList}"
> > value="#{bundle.Button_Submit}"/>
> >
> >  </n:fieldSet>
> >
> >  </f:facet>
> >
> >  <h:column>
> >
> >  <f:facet name="header">
> >
> >  <x:commandSortHeader columnName="columnBehavior" arrow="true">
> >
> >  <h:outputText value="BEHAVIORS" />
> >
> >  </x:commandSortHeader>
> >
> >  </f:facet>
> >
> >  <h:dataTable id="behaviors"
> > value="#{AttachProductTypeAttributesPage.behaviorQualifierValues}"
> > var="qualifier">
> >
> >  <h:column>
> >
> >  <h:outputLabel for="attached" value="#{qualifier.name}"></h:outputLabel>
> >
> >  <h:selectBooleanCheckbox id="attached"
> > value="#{AttachProductTypeAttributesPage.wrappedBehaviorValue.attached}"/
> >>
> >
> >  <h:inputText
> > rendered="#{AttachProductTypeAttributesPage.wrappedBehaviorValue.integerV
> >alue}"
> > value="#{AttachProductTypeAttributesPage.wrappedBehaviorValue.value}"/>
> >
> >  <h:selectOneMenu
> > rendered="#{AttachProductTypeAttributesPage.wrappedBehaviorValue.booleanV
> >alue}"
> > value="#{AttachProductTypeAttributesPage.wrappedBehaviorValue.value}">
> >
> >  <f:selectItem itemLabel="true" itemValue="true"/>
> >
> >  <f:selectItem itemLabel="false" itemValue="false"/>
> >
> >  </h:selectOneMenu>
> >
> >  <f:verbatim><br/></f:verbatim>
> >
> >  </h:column>
> >
> >  </h:dataTable>
> >
> >  </h:column>
> >
> >
> >
> >  </x:dataTable>

Re: embedded x:dataTable bug ?

Posted by Bruno Aranda <br...@gmail.com>.
Yes, Gérard, nesting tables is a known issue which has been already
fixed. You can try with a nightly build...

Regards,

Bruno

2005/7/28, Gérard COLLIN <ge...@netonomy.com>:
>  
> 
> Hello, 
> 
>  Using myfaces 1.09, if I embed a x:dataTable inside another one, then the
> model values are wrongly updated for the embedded table. 
> 
> (I.E. It seems the model for the first row is updated with the data entered
> for the last one) 
> 
> Moreover, If I change the x:datatable to h:datatable, then it works fine. 
> 
>  For example: 
> 
>  <x:dataTable id="container"...> 
> 
>  ... 
> 
>  <h:column> 
> 
>  <x:dataTable id="embeded"...> 
> 
>  <...> 
> 
>  </x:dataTable> 
> 
>  </h:column> 
> 
>  </x:dataTable> 
> 
> Does not update model of the "embeded" datatable, whereas 
> 
>  <x:dataTable id="container"...> 
> 
>  ... 
> 
>  <h:column> 
> 
>  <h:dataTable id="embeded"...> 
> 
>  <...> 
> 
>  </h:dataTable> 
> 
>  </h:column> 
> 
>  </x:dataTable> 
> 
> works fine. 
> 
>  
> 
>  Should I write a jira bug for this ? 
> 
>  
> 
>  Gérard COLLIN. 
> 
>  
> 
> PS: The complete source of my tables as seen in my jsp: 
> 
>  
> 
>  <x:dataTable id="descriptorList" styleClass="listTable" 
> 
>  var="descriptor" 
> 
> value="#{AttachProductTypeAttributesPage.descriptorList.list}"
> 
> sortColumn="#{CatalogContextBean.attributeDefinitionListContext.sortColumn}"
> 
> sortAscending="#{CatalogContextBean.attributeDefinitionListContext.ascending}"
> 
>  preserveSort="true" 
> 
>  preserveDataModel="false" 
> 
>  rows="10" 
> 
>  > 
> 
>  <f:facet name="header"> 
> 
>  <h:outputText value="#{bundle.Title_Property_List}" /> 
> 
>  </f:facet> 
> 
>  
> 
>  <f:facet name="footer"> 
> 
>  <n:fieldSet styleClass="button"> 
> 
>  <h:commandButton
> action="#{AttachProductTypeAttributesPage.modifyList}"
> value="#{bundle.Button_Submit}"/> 
> 
>  </n:fieldSet> 
> 
>  </f:facet> 
> 
>  <h:column> 
> 
>  <f:facet name="header"> 
> 
>  <x:commandSortHeader columnName="columnBehavior" arrow="true"> 
> 
>  <h:outputText value="BEHAVIORS" /> 
> 
>  </x:commandSortHeader> 
> 
>  </f:facet> 
> 
>  <h:dataTable id="behaviors"
> value="#{AttachProductTypeAttributesPage.behaviorQualifierValues}"
> var="qualifier"> 
> 
>  <h:column> 
> 
>  <h:outputLabel for="attached" value="#{qualifier.name}"></h:outputLabel> 
> 
>  <h:selectBooleanCheckbox id="attached"
> value="#{AttachProductTypeAttributesPage.wrappedBehaviorValue.attached}"/>
> 
>  <h:inputText
> rendered="#{AttachProductTypeAttributesPage.wrappedBehaviorValue.integerValue}"
> value="#{AttachProductTypeAttributesPage.wrappedBehaviorValue.value}"/>
> 
>  <h:selectOneMenu
> rendered="#{AttachProductTypeAttributesPage.wrappedBehaviorValue.booleanValue}"
> value="#{AttachProductTypeAttributesPage.wrappedBehaviorValue.value}">
> 
>  <f:selectItem itemLabel="true" itemValue="true"/> 
> 
>  <f:selectItem itemLabel="false" itemValue="false"/> 
> 
>  </h:selectOneMenu> 
> 
>  <f:verbatim><br/></f:verbatim> 
> 
>  </h:column> 
> 
>  </h:dataTable> 
> 
>  </h:column> 
> 
>  
> 
>  </x:dataTable> 
> 
>