dataTable and method on items
My problem is the following :
I have an object which contain a collection. Each item of this collection contains a collection. I want to delete, edit, save each of these items. But I can't. Please help me.
I read it was possible to call directly methods on the items on this website :
http://turbomanage.wordpress.com/200...n-a-datatable/
But I have this error : "#{renderer.saveRenderer}: javax.faces.el.MethodNotFoundException: saveRenderer"
Here is the first code :
<h:dataTable id="layers"
styleClass="list-background" value="#{layerList.layers}" var="layer">
<h:column>
<h:graphicImage url="./images/galigeo/new_ana.gif"
onclick="openJsp('rendererassistant.jsf?layer=#{layer.name}')"
alt="#{msg.new_renderer}" />
<h:outputText value="#{layer.aliasName}" style="padding-left:5px;" />
<h:dataTable id="layers" styleClass="list-background"
value="#{layer.renderers}" var="renderer" style="left:20px">
<h:column>
<h:commandLink action="#{renderer.saveRenderer}">
<h:graphicImage url="./images/galigeo/save_2.gif"
alt="#{msg.save}" />
</h:commandLink>
</h:column>
<h:column>
<h:graphicImage url="./images/galigeo/sup.gif" onclick=""
alt="#{msg.delete}" />
</h:column>
<h:column>
<h:graphicImage url="./images/galigeo/iconCategManage.gif"
onclick="" alt="#{msg.edit}" />
</h:column>
<h:column>
<h:outputText value="#{renderer.label}" />
</h:column>
</h:dataTable>
</h:column>
</h:dataTable>
I tried with binding and this is what I'm interested :
http://balusc.xs4all.nl/srv/dev-jep-dat.html
But it doesn't work too; I have this error : "Error setting property 'myDataTable' in bean of type null"
Here is the second code :
<h:dataTable id="layers"
styleClass="list-background" value="#{layerList.layers}" var="layer">
<h:column>
<h:graphicImage url="./images/galigeo/new_ana.gif"
onclick="openJsp('rendererassistant.jsf?layer=#{layer.name}')"
alt="#{msg.new_renderer}" />
<h:outputText value="#{layer.aliasName}" style="padding-left:5px;" />
<h:dataTable id="layers" styleClass="list-background"
value="#{layer.renderers}" var="renderer" binding="#{layer.myDataTable}" style="left:20px">
<h:column>
<h:commandLink action="#{layer.saveRenderer}">
<h:graphicImage url="./images/galigeo/save_2.gif"
alt="#{msg.save}" />
</h:commandLink>
</h:column>
<h:column>
<h:graphicImage url="./images/galigeo/sup.gif" onclick=""
alt="#{msg.delete}" />
</h:column>
<h:column>
<h:graphicImage url="./images/galigeo/iconCategManage.gif"
onclick="" alt="#{msg.edit}" />
</h:column>
<h:column>
<h:outputText value="#{renderer.label}" />
</h:column>
</h:dataTable>

