voyent
Issue with ace:ajax editStart event and ace:rowEditor  XML
Forum Index -> Components
Author Message
wilgayag

Joined: 10/Aug/2011 17:21:12
Messages: 9
Offline


Hello,

I am currently using ICEfaces 3.2 ee.

I recently upgraded from 3.0 to 3.2.

I have a dataTable with a roweditor component. I am also using an ajax component to catch the editStart event from the dataTable.

All of these components worked in 3.0, but are no longer functioning correctly since the upgrade to 3.2.

When I try to edit a row it will now appear as though the components inside the input facet of the cellEditor don't exist.(emptyRowEditor.jpg attachment)

However, it works correctly with the last row of the table.(notEmptyRowEditor.jpg attachment)

Any help is greatly appreciated. I've been trying to fix this for a few days and have stripped my datatable down to narrow bug possibilities.

Code:
 <ace:dataTable
     value="entities"
     var="entity" rows="10">
 						
     <ace:ajax event="editStart"/>
 
     <ace:column>
         <ace:cellEditor>
             <f:facet name="output">
                 <h:outputText value="entity.name" />
             </f:facet>
             <f:facet name="input">
                 <h:inputText value="entityNameUpdate" />
             </f:facet>
         </ace:cellEditor>
     </ace:column>
 
     <ace:column>
         <ace:rowEditor
 	startTitle="edit"
 	submitTitle="save"
 	cancelTitle="cancel" />
     </ace:column>
 </ace:dataTable>
 
[Thumb - emptyRowEditor.jpg]
 Filename emptyRowEditor.jpg [Disk] Download
 Description
 Filesize 20 Kbytes
 Downloaded:  383 time(s)

[Thumb - notEmptyRowEditor.jpg]
 Filename notEmptyRowEditor.jpg [Disk] Download
 Description
 Filesize 22 Kbytes
 Downloaded:  396 time(s)

philip.breau


Joined: 08/May/2006 00:00:00
Messages: 2989
Offline


Hi,
If you'd like to post a simple test case, we can take a look. The code snippet above was intentionally missing the #{} in the expressions right?

Philip

.
wilgayag

Joined: 10/Aug/2011 17:21:12
Messages: 9
Offline


Hi Phil,

Thanks for the response.

Yeah, i was trying to make it clear what components i was using without being too specific.

But I can post the code for my page that I currently use to test this.
I'll attach my xhtml page as well.

I have also found that if I remove the ace:ajax tag the roweditor works as expected.

Code:
 <ui:fragment xmlns:h="http://java.sun.com/jsf/html"
 	xmlns:f="http://java.sun.com/jsf/core"
 	xmlns:ui="http://java.sun.com/jsf/facelets"
 	xmlns:ice="http://www.icesoft.com/icefaces/component"
 	xmlns:ace="http://www.icefaces.org/icefaces/components">
 
 <h:form>
     <ace:panel>
         <ace:dataTable
 	value="#{serviceBean.businessMetadataService.metadataEntities}"
 	var="entity" rows="10">
 					
 	<ace:ajax event="editStart"/>
 
 	<ace:column>
 	    <ace:cellEditor>
 	             <f:facet name="output">
 		    <h:outputText value="#{entity.name}" />
 	             </f:facet>
 	             <f:facet name="input">
 		    <h:inputText value="#{serviceBean.businessMetadataService.entityNameUpdate}" />
 	             </f:facet>
 	    </ace:cellEditor>
 	</ace:column>
 
 	<ace:column>
 	    <ace:rowEditor
 		startTitle="Edit"
 	                submitTitle="Save"
 		cancelTitle="Cancel" />
 	</ace:column>
 
         </ace:dataTable>
     </ace:panel>
 </h:form>
 </ui:fragment>
 
 Filename businessMetadata.xhtml [Disk] Download
 Description
 Filesize 1005 bytes
 Downloaded:  290 time(s)

philip.breau


Joined: 08/May/2006 00:00:00
Messages: 2989
Offline


Congratulations you just won a prize! That's an interesting bug. I can reproduce it. It's the combination of using the ace:ajax with the dataTable when it's nested in the ace:panel. I've opened ICE-9067 if you'd like to follow that.

For the time being you might try nesting the dataTable in a different container other than the ace:panel.

Thanks!

.
wilgayag

Joined: 10/Aug/2011 17:21:12
Messages: 9
Offline


Were you able to get it to work by just removing the ace:panel container? It doesn't seem to fix it for me. Though I just removed the surrounding ace:panel tag without using another container. The dataTable is a direct child of the h:form.

Thank you for the support.
philip.breau


Joined: 08/May/2006 00:00:00
Messages: 2989
Offline


Yes, for me, testing with trunk, the problem seems to go away when you remove the ace:panel or the ace:ajax tag.

.
sam_louis

Joined: 01/Apr/2010 00:00:00
Messages: 7
Offline


Hi there,
I just spent the past two days trying plagued with this bug as well. I would like to add that this is not fixed. I have been testing with different jsf pages and just redownloaded the 3.3 after reading this post but still the same issue.

My issue is a little different the fields do show up for all the rows upon clicking on the row Editor and the listener for the rowEditor do get called. However when editing any row but the last one, the UIInput.updateModel doesn't get called except for the first field. The rest of the fields bound value expressions don't get updated. After i found the bug and commented out the editStart everything worked as expected. In my test page I don't have an ace:panel surrounding the datatable.
Here is my test page.

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
 <html xmlns="http://www.w3.org/1999/xhtml"
 	xmlns:ui="http://java.sun.com/jsf/facelets"
 	xmlns:h="http://java.sun.com/jsf/html"
 	xmlns:f="http://java.sun.com/jsf/core"
 	xmlns:c="http://java.sun.com/jsp/jstl/core"
 	xmlns:ice="http://www.icesoft.com/icefaces/component"
 	xmlns:ace="http://www.icefaces.org/icefaces/components"
 	
 	>
 
 <h:head>
 </h:head>
 <h:body>
 <h:form>
 	<h:panelGroup id="pnlErrors" binding="#{pnlErrors}">
 			<h:messages id="errMsgs"  errorClass="errMsg" />
 			</h:panelGroup>
 			Schedule ID: #{scheduleTime.scheduleID} #{scheduleTime.schedule.scheduleID}
 		<ace:dataTable
 				id="tblScheduleTime"
 				value="#{scheduleTime.schedule.scheduleTimeSlotShowTimes}"
 				var="at"
 				
 			>
 				<!-- 
 				<ace:row
 					condition="group"
 					groupBy="#{at.subjectName}"
 					pos="before"
 					styleClass="group-header"
 				>
 					<ace:column colspan="6">
                         		#{at.subjectName}
                     		</ace:column>
 				</ace:row> -->
 				<ace:column headerText="ID">
 					<h:outputText
 						id="timeSlotID"
 						value="#{at.ID}"
 					></h:outputText>
 				</ace:column>
 				<ace:column
 					headerText="Subject"
 					rendered="false"
 					groupBy="#{at.subjectName}"
 				>
 					<!-- <h:inputHidden id="subjectID" value="#{at.subjectID}"/> -->
 				</ace:column>
 				<ace:column
 					id="colStartDate"
 					headerText="Start Date"
 				>
 					<ace:cellEditor>
 						<f:facet name="output">
 
 							<h:outputText value="#{at.startDateEnum.name}" />
 						</f:facet>
 						<f:facet name="input">
 						
 
 							
 							<!-- <h:selectOneMenu
 								value="#{at.subjectID}"
 								binding="#{subjectID}"
 							>
 								<f:selectItems
 									value="#{scheduleTime.subjects}"
 									var="s"
 									itemLabel="#{s.subjname}"
 									itemValue="#{s.ID}"
 								/>
 							</h:selectOneMenu> -->
 							
 							<h:selectOneMenu
 								value="#{at.startDateEnum}"
 								id="selStartTime"
 							>
 								<f:selectItems
 									value="#{scheduleTime.weekDays}"
 									var="n"
 									itemLabel="#{n.name}"
 									itemDescription="#{n.name}"
 									itemValue="#{n}"
 								/>
 								<f:converter converterId="entityConverter" />
 								
 								
 							</h:selectOneMenu>
 						</f:facet>
 					</ace:cellEditor>
 				</ace:column>
 				<ace:column
 					id="colEndDate"
 					headerText="End Date"
 				>
 					<ace:cellEditor>
 						<f:facet name="output">
 							<h:outputText value="#{at.endDateEnum.name}" />
 						</f:facet>
 						<f:facet name="input">
 							<h:outputText value="Sometext"/>
 							<!-- <h:selectOneMenu
 								value="#{at.endDateEnum}"
 								id="selEndTime"
 								rendered="true"
 							>
 								<f:selectItems
 									value="#{scheduleTime.weekDays}"
 									var="n"
 									itemLabel="#{n.name}"
 									itemDescription="#{n.name}"
 									itemValue="#{n}"
 								/>
 								<f:converter converterId="entityConverter" />
 							</h:selectOneMenu> -->
 						</f:facet>
 					</ace:cellEditor>
 				</ace:column>
 				<ace:column
 					id="colStartTime"
 					headerText="Start Time"
 				>
 					<ace:cellEditor>
 						<f:facet name="output">
 							<h:outputText value="#{at.startDateTime}" />
 						</f:facet>
 						<f:facet name="input">
 							<h:outputText value="Test"/>
 							<!-- <ace:dateTimeEntry
 								id="dtStartTime"
 								value="#{at.startTime}"
 								pattern="hh:mm a"
 								timeOnly="true"
 								showButtonPanel="false"
 								renderAsPopup="true"
 							>
 
 							</ace:dateTimeEntry> -->
 							
 						</f:facet>
 					</ace:cellEditor>
 				</ace:column>
 				<ace:column
 					id="colEndTime"
 					headerText="End Time"
 				>
 					<ace:cellEditor>
 						<f:facet name="output">
 							<h:outputText value="#{at.endDateTime}" />
 						</f:facet>
 						<f:facet name="input">
 							<h:outputText value="Test"></h:outputText>
 							<ace:dateTimeEntry
 								id="dtEndTime"
 								value="#{at.endTime}"
 								pattern="hh:mm a"
 								timeOnly="true"
 								showButtonPanel="false"
 								renderAsPopup="true"
 							>
 								
 							
 							
 							</ace:dateTimeEntry>
 							
 						
 						</f:facet>
 					</ace:cellEditor>
 				</ace:column>
 				<ace:column headerText="Edit">
 						
 					<ace:rowEditor
 						id="rowEdit"
 						rowEditListener="#{scheduleTime.timeSlotEdited}"
 					>
 						<!-- <h:commandLink
 							action="#{scheduleTime.delete(at)}"
 							rendered="${empty rowState.activeCellEditorIds}"
 							value="✖"
 							styleClass="deleteBtn"
 							title="Delete"
 							alt="Delete"
 							onclick="return confirmDelete();"
 						>
 							<f:setPropertyActionListener
 								target="#{scheduleTime.timeSlotToDelete}"
 								value="#{at.ID}"
 							/>
 						</h:commandLink> -->
 					</ace:rowEditor>
 				</ace:column>
 				<ace:ajax
 					event="editSubmit"
 					render="@this #{bf:getId(pnlErrors)}"
 					execute="@form"
 				>
 				</ace:ajax>
 				<ace:ajax
 					render="@this"
 					event="editStart"
 					listener="#{scheduleTime.editStart}" 
 					
 				/>
 				<ace:ajax
 					render="@this"
 					event="editCancel"
 					listener="#{scheduleTime.editCancelled}"
 				/>
 			</ace:dataTable>
 </h:form>
 </h:body>
 </html>


When the editStart is not commented the setStartDateEnum doesn't get called only the setEndTime gets called.

artzambrano

Joined: 21/Mar/2007 00:00:00
Messages: 177
Offline


Hi Sam,

I tested this issue with the 3.3 release jars by simply adding <ace:ajax render="@this" event="editStart" /> to the Row/Cell Editing demo in the showcase. Indeed, this issue wasn't solved in the 3.3 release. However, it is now solved in the 3.3 EE P03 and 4.0 releases.

So, if you're a supported customer, you can download the patch 3 of the 3.3 EE release. Otherwise, you can use the 4.0 release.

Art Zambrano
ICEsoft Technologies Inc.
 
Forum Index -> Components
Go to:   
Powered by JForum 2.1.7ice © JForum Team