Details
-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: EE-1.3.1.GA_P05
-
Fix Version/s: EE-1.3.1.GA_P07
-
Component/s: Faces
-
Labels:None
-
Environment:mobi with ace
-
Support Case References:Support Case 14226:- https://icesoft.my.salesforce.com/5000g00001nXm0b
Description
note that the size of the dataTable can vary, but the dataTable does not update the size dynamically..hoping it's the test case,
Main concern is the sizing of the tabSet itself. Since the dataTable size is not available when the tabSet is initialized, the size does not reflect it. Test opens first in the pane1 and that is the size of the tabPane contents even after the tab changes. perhaps a resize should occur when tab changes?
-
Hide
- SC14226.zip
- 24 kB
- Judy Guglielmin
-
- SC14226/.DS_Store 6 kB
- __MACOSX/SC14226/._.DS_Store 0.2 kB
- SC14226/build.xml 3 kB
- SC14226/nbproject/ant-deploy.xml 2 kB
- SC14226/nbproject/build-impl.xml 78 kB
- SC14226/nbproject/genfiles.properties 0.5 kB
- SC14226/nbproject/.../private.properties 0.4 kB
- SC14226/nbproject/private/private.xml 0.8 kB
- SC14226/nbproject/project.properties 4 kB
- SC14226/nbproject/project.xml 1 kB
- SC14226/src/conf/MANIFEST.MF 0.0 kB
- SC14226/src/java/Car.java 1 kB
- SC14226/src/java/LayoutBean.java 14 kB
- SC14226/web/index.xhtml 5 kB
- SC14226/web/META-INF/context.xml 0.1 kB
- SC14226/web/WEB-INF/web.xml 1 kB
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
Simply setting autoHeight="true" resizes the tab bodies to fit their contents.
alternate test case when dataTable is wider than tabSet.
I tried to add the code to resize the scrollable tables inside mobi:tabSet, but I couldn't reproduce the horizontal alignment issue, despite my test case having different header columns and body columns sizes.
Another reason why this can't be done is that in ICEfaces 3.3 there is not ice.ace.instance() to get a component object by specifying a client id. In 3.3 we need to know the name of the widgetVar, and that's not possible to do from the mobi:tabSet code.
The only possible workaround for this issue, as there are no listeners for this component is to add some javascript to call resizeScrolling() on the table. The code for this test case looks like this:
<script> var tabContainingTable = document.getElementById('contentForm:test1tab_1'); tabContainingTable.addEventListener("click", function(){ setTimeout(function() {window['widget_contentForm_table'].resizeScrolling(); }, 100); }); </script>
However, in my testing, the widgetVar couldn't be found and produced an error, even though it was clearly initialized when the page was loaded.
A better workaround would be to add the following code on the page:
<script> var tabContainingTable = document.getElementById('contentForm:test1tab_1'); tabContainingTable.addEventListener("click", function(){ setTimeout(function() {window.ice.ace.DataTables['contentForm:table'].resizeScrolling(); }, 1000); }); </script>
This is like a built-in ice.ace.instance() functionality in the ace:dataTable component, so it's possible to get data table instances by id that are registered in the object window.ice.ace.DataTables. The delay is actually necessary to be long, otherwise there will be and object not found error.
r52085: added function to mobi:tabSet to resize ace:dataTable components found in content panes whenever changing to a different tab, in order to fix possible misalignments
r52211: mobi:tabSet, fix to apply the autoHeight functionality when tab contents are loaded dynamically
r52212: committed fix to fedex branch http://dev.icesoft.com/svn/ossrepo/icefaces-ee/patches/icemobile-1.3.1_P05_Fedex/icemobile
I could actually reproduce the issue on the attached test case. The problem was that when loading the page for the first time after clearing the cache, the issue wasn't present; everything looked and worked normal. Only when loading the page on a different tab or when reloading the page, during the same session, was when the issue was actually visible. This is a fix for an issue that had been always there: the autoHeight functionality was only executed when the component was first loaded on the page. So, if the tabSet had dynamic content, this dynamic content wasn't being taken into account when doing the autoHeight operations. This fix invokes the autoHeight function when changing tabs, and it also invokes the ace:dataTable's resizeScrolling() and resizePaginator() functions afterwards.
jars to be added to this project are
icefaces-ee-3.3.0_P05.jar (or current maintenance)
icefaces-ee-ace-3.3.0_P05(or current maintenance)
icefaces-ee-mobi-1.3.1_P05(or current maintenance)
javax.faces.jar
jstl.jar