Hello all,
I have a rich:dataTable that shows a list of beans for which one of the bean's properties should be editable through a rich:inplaceInput. I am trying to use the valueChangedListener model, but I am having trouble figuring out how to know the entity ID of the specific bean in my table that is being edited. Does anyone have suggestions of how I could do this?
<rich:dataTable value="#{myList}" var="_bean"> <rich:column>#{_bean.artist}</rich:column> <rich:column> <rich:inplaceInput value="#{_bean.album}" valueChangeListener="#{beanHome.saveAlbumListener}" immediate="true" /> </rich:column> </rich:dataTable>
<rich:dataTable value="#{myList}" var="_bean"> <rich:column>#{_bean.artist}</rich:column> <rich:column> <rich:inplaceInput value="#{_bean.album}" valueChangeListener="#{beanHome.saveAlbumListener}" immediate="true"> <a4j:actionparam name="ii_param_id" value="#{_bean.id}" assignTo="#{beanHome.currentEntityId}" /> <a4j:actionparam name="ii_param_field" value="album" assignTo="#{beanHome.currentEntityField}" /> </rich:inplaceInput> </rich:column> </rich:dataTable>
Hello,
Either call VCL on _bean itself, e.g.:
valueChangeListener="#{_bean.saveAlbumListener}"
javax.faces.application.Application#evaluateExpressionGet(facesContext, "_bean", Object.class)inside VCL.