Skip to content

Commit

Permalink
Fixed issue: "scrolling table inside container is not scrollable"
Browse files Browse the repository at this point in the history
  • Loading branch information
YurinM committed Jul 8, 2015
1 parent 479787a commit c29f4b4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions openFaces/source/org/openfaces/renderkit/table/TableStructure.java
Expand Up @@ -241,6 +241,7 @@ public void render(FacesContext context, HeaderCell.AdditionalContentWriter addi
writer.startElement("td", table);
writer.writeAttribute("style", "vertical-align: top", null);
writer.startElement("div", table);
writer.writeAttribute("style", getContentPosition(table), null);
}

TableHeader header = getHeader();
Expand Down Expand Up @@ -268,6 +269,17 @@ public void render(FacesContext context, HeaderCell.AdditionalContentWriter addi
belowFacet.encodeAll(context);
}

private String getContentPosition(AbstractTable table) {
final String style = table.getStyle();
String position = "position: absolute; ";

if (style != null && style.contains("position")) {
position = "";
}

return position;
}

private void writeStyleAndClass(FacesContext context, AbstractTable table, ResponseWriter writer) throws IOException {
String style = table.getStyle();
String textStyle = getTextStyle(table);
Expand Down

0 comments on commit c29f4b4

Please sign in to comment.