One row height
Hi all. I have a table with a specific width and height. I need rows to be shown in one line (one row height). In my case, if the cell content is too large (it has a lot of data), the row height grows in two or more rows, because it shows the whole data. I'm not interesting in showing the whole data, but I'm interesting in keeping the row height for all the rows in the table (one row height).
[404 byte] By [
linuc@] at [2007-11-26 8:42:29]

# 1
Hopefully, I am understanding what you want. I have 2 suggestions.
1. Modify your sql statement to return a substring. For example, if your table column is about 20 chars long, then just select a 20 char substring from the field.
2. Create a page bean property that returns a substring of the column's value to ensure that the value is not longer than the column width. I tested this by creating a table and droping the TRAVEL.PERSON data source on it.
I then added this property to my page bean:
private String shortJobTitle;
/**
* Getter for property shortJobTitle.
* @return Value of property shortJobTitle.
*/
public String getShortJobTitle() {
String jobTitle = (String) personDataProvider.getValue(
"PERSON.JOBTITLE",
tableRowGroup1.getRowKey());
if (jobTitle != null && jobTitle.length() > 2) {
jobTitle = jobTitle.substring(0, 2);
}
return jobTitle;
}
I then bound the column's text field to this property.
Hope this helps,
Chris
# 2
Regards option 1: In the same table there is a link that says "Details", it takes you to another page that gives you all the complete information about the row you selected (even data that doesn't appear in the table). To do that, I need to use the same dataprovider to show all the information (and if I use the substring in the sql statement, I won't be able to get the complete data).
Regards option 2: It was my second choice. But I think that if a do that for every cell, my web application performance will go down. What do you think?
I tought Creator might have a better solution. Does anybody know a better one?
Thanks for your response jetson!