Is there a way to bind an outputtext to a bean method that needs an parameter?
The problem is this:
I have a datatable that displays some values from a database:
an id, a date and a string. All this values are from the same table in the
database. I would also like to display the name of the person that have this id.
This name is in another table, but connected through the same id.
I would like to find this name with this method in my bean:
public String getEier(Long eierId){
this.eierId=eierId;
boolean funnet=false;
MessageOwner eier=null;
Iterator varseleieriterator=this.aktueltvarsel.getOwnerIds().iterator();
while(varseleieriterator.hasNext() && !funnet){
eier=(MessageOwner) varseleieriterator.next();
funnet=eier.getEierId().longValue()==eierId;
}
String eiernavn=eier.getEierNavn();
return eiernavn;
}
>From the jsp I write
<h:dataTable value="#{tabnavigering.tittelliste}" var="tittelliste"
id="orginalinfo">
<h:column>
<h:outputText value="#{tittelliste.eierId}"/>
<h:outputText value="#{tabnavigering.eier['tittelliste.eierId']}">
</h:outputText>
But this doesn't work. Is there a way to send a parameter in the valuebinding?