Click here to Skip to main content
14,299,664 members
Rate this:
Please Sign up or sign in to vote.
See more:
Dear I have a JSF project and want to update a row in JSF datatable.
I have a database which called domain has columns
domainName
failed
na
inProgress.

<h:dataTable value="#{UserBeanClass.selectedDomainList}" var="domains">
									
									<h:column>
										<f:facet name="header">Domain Name</f:facet>
										<h:inputText value="#{domains.domainName}"></h:inputText>
									</h:column>
								   
									<h:column>
										<f:facet name="header">Failed</f:facet>
										<h:inputText value="#{domains.failed}"></h:inputText>
									</h:column>
										   
									<h:column>
										<f:facet name="header">NA</f:facet>
										<h:inputText value="#{domains.na}"></h:inputText>
									</h:column>
										   
									<h:column>
										<f:facet name="header">In Progress</f:facet>
										<h:inputText value="#{domains.inProgress}"></h:inputText>
									</h:column>
										   
									<h:column>
										<f:facet name="header">Actions</f:facet>
										<h:form>
											<h:commandLink action="#{UserBeanClass.UpdateDomain(domains)}"></h:commandLink>
											<h:commandLink action="#{UserBeanClass.DeleteDomain(domains)}"></h:commandLink>
										</h:form>
									</h:column>
</h:dataTable>


and my Java code

public String UpdateDomain (Domains domain) {
		DomainOperations domainOperations = new DomainOperations();
		if(domainOperations.updateDomain(domain) > 0) {

		return "edit";
	}
}


What I have tried:

Code works but domains value is never going to change, its value remain still the same.

Could you help me?
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100