Hello!
I have got a problem with filling my dataTable with the right issues. Could pleeeaaassse someone help me with this?
The code for my jsp-page, where the result is shown, is:
<h:dataTable id="data" style="width: 100%"
styleClass...
var="what do I have to fill in???" value="#{suggestionBox.result}">
<h:column>
<f:facet name="header">
<h:outputText value="title" />
</f:facet>
<h:outputText value= "#{suggestionBox.result}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="id" />
</f:facet>
<h:outputText value= "#{suggestionBox.result}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="score" />
</f:facet>
<h:outputText value= "#{suggestionBox.result}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="source" />
</f:facet>
<h:outputText value= "#{suggestionBox.result}" />
</h:column>
</h:dataTable>
I have , ,... -tags around all this, of course.
The code of my bean is:
public class SG implemets Serializable...
private String...
public List autocomplete(Object event) {
List v = new Vector() ... for my suggestionBox!!
private List executeSuggestQuery(String query)...for the datable which is shown in the suggestion Box!!
public String Testausgabe() {
ArrayList list;
try {
list = search("\""+property+"\"", medline_index, medline_fields);
result = "";
for (int i=1; i<list.size(); i++)
{
result += i+" "+list.get(i).toString()+"\n";
}
catch...
}
return "success";
then the method search:
public ArrayList search(String q, ...)
...
return list;
public String getResult()...
public String getData(){...
...
I am working with Tomcat 6.
The String that I put in the suggestionBox is searched in an index and I get the result on my jsp-page. Know, of course, with my jsp-code, the whole result is listed in each column. But what do I have to do, so that only the title is listed in the column title and only the id is listed in the column id,...???
I am going mad with this. Could please someone help me with this!
Thank you!