trying to make a facelets template containing a dataTable
i'm trying to make a facelets template containing a dataTable. i have several problems, but first i'll show you how i wrote the template, simplified of course (the final template contains much more):
<ui:composition>
<h:dataTable value="#{tableSource}" var="#{vaar}" binding="#{tableBinding}" id="#{faceletId}">
<ui:insert />
<h:column>
<h:commandButton action="#{modifyAction}" id="modifyButton" value="Modify" />
</h:column>
</h:dataTable>
</ui:composition>
ok, this was the template. now i'll show you how i'm "calling it" in my page:
(simpleColumn is another template i made, which works -has no problems)
<xyz:myDataTable tableSource="#{mainBean.jobsList}" tableBinding="#{mainBean.jobsTable}" vaar="job"
faceletId="jobsListTable"modifyAction="#{mainBean.actionTodo}">
<xyz:simpleColumn headerTitle="Nume job" faceletId="jobName" fieldValue="#{job.name}" />
</xyz:myDataTable>
ok so here are my problems:
1 - i write "#{job.name}" to add a column with that value, but i get an error that the property "name" does not exist in type java.lang.String.
how do i fix this? i understand the problem ("job" is not defined as a variable, but as the simple string) but i don't know what to do
2- i write "#{mainBean.actionTodo}", and the function actionTodo() certainly exists in that bean, but i get an error that the property "actionTodo" is could not be found in that bean (i guess it's looking for a property, not a function). but why, it's in the "action" property of a submit button, so it should not be this way. how can i fix this?

