[
https://issues.jboss.org/browse/RF-10754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12621935#comment-12621935
]
Peter Hallama commented on RF-10754:
------------------------------------
Hi there,
Got the same issue and tried to investigate a bit: The issue seems to come from
the rendered style-tag with div.rf-edt-cnt width = 100%, this seems to be used
somewhere to comupte the width by js or by some browser feature and by having
multiple classes or style definitions the width of this div seems to be unbound
when checking with firebug.
Anyway I found a way to work around this without stepping too deep into the js
code of extendedDataTable I just mentioned that updateLayout function refers to
this.scrollElement.clientWidth (that for some reason is too big with multiple
tables).
This effect I justed fixed as kind of work around in the init function by
directly applying the width that can be computed correctly from the
sourrounding div of the :footer.
The code looks like this:
{code}
this.frozenColumnCount = this.frozenHeaderPartElement ?
this.frozenHeaderPartElement.firstChild.rows[0].cells.length : 0;//TODO
Richfaces.firstDescendant;
this.scrollElement = document.getElementById(id + ":footer");
//begin multiple table fix
var headerElem = document.getElementById(id + ":header");
var bodyElem = document.getElementById(id + ":body");
//compute correct width by gettong from parent div
var parentWidth =
this.scrollElement.parentNode.parentNode.parentNode.parentNode.parentNode.offsetWidth;
this.scrollElement.style.width = parentWidth + "px";
headerElem.style.width = parentWidth + "px";
if(bodyElem != null){
//might be null in case of empty body...
bodyElem.style.width = parentWidth + "px";
}
//end multiple Table fix
{code}
this fixes the issue quite well also I'm not 100% sure if there is a better way
to fix the root cause so it would be great to get another fix.
Hope this helps,
Best regards
> extendedDataTable: two or more components placed on the page causes
> horizontal scroll to disappear
> --------------------------------------------------------------------------------------------------
>
> Key: RF-10754
> URL: https://issues.jboss.org/browse/RF-10754
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-tables
> Affects Versions: 4.0.0.Final
> Reporter: Ilya Shaikovsky
> Fix For: 4.Future
>
>
> just get any example where table has horizontal scroll and add one more table
> by copy/paste. (change id's if need)
> result: scroll disappear.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues