-
1. Re: Strange behavior on dataTables on dynamic tabs.
michpetrov Aug 27, 2015 8:03 AM (in response to peter.falken)Well if the dataScroller is part of the problem then include it in the code. (Switch to the advanced editor to use the syntax highlighter) Are you trying to have one global datascroller for all the tabs?
-
2. Re: Strange behavior on dataTables on dynamic tabs.
peter.falken Aug 27, 2015 10:56 AM (in response to michpetrov)Michal,
You're right I missed adding the datascroller to the code.
In this case a seperate instance of the datascroller tag is associated with each table.
I've updated the code in the first post to reflect this.
-
3. Re: Strange behavior on dataTables on dynamic tabs.
michpetrov Aug 28, 2015 5:47 AM (in response to peter.falken)I'm seeing every dataScroller work on its own. However I had to modify your code - where do #{rows} and #{value} come from? Rich:column does not have either label or value attributes, what version of RichFaces are you using?
-
4. Re: Strange behavior on dataTables on dynamic tabs.
peter.falken Aug 28, 2015 9:22 AM (in response to michpetrov)#{rows} & #{value} are from the custom tag that I had created - rows is set to 15 and value is really calling a function that get the employee list that have last names starting with #{letter}.
I'm using RichFaces 4.5.8.Final
The case is that when I look at the third page of People with last names starting with 'C' and I switch to the tab for 'Z' that only has one page. The table is render without any results even though it does have at least 10 rows.
-
5. Re: Strange behavior on dataTables on dynamic tabs.
michpetrov Aug 31, 2015 5:11 AM (in response to peter.falken)Could you create a reproducer? (sscce.org) Or you can try checking when the value method is called, I think the problem might be there.
-
6. Re: Strange behavior on dataTables on dynamic tabs.
peter.falken Sep 15, 2015 12:08 PM (in response to michpetrov)Sure Michal, I'll create a reproducer - I'll have it in a couple of days.
==================================================
Sept.15
Michal,
I've created a SCE - attached is the source and the WAR.
* You might need to update the POM to have RichFaces compiled into the WAR - I'm using RF as a Module on Wildfly to make my WARs leaner.
STEPS TO REPRODUCE.
- Load the WAR - I'm using WildFly 9.0.1 and RF 4.5.8.Final as a Module (PeterFalken/WFModules · GitHub)
- Navigate to index.xhtml or context ROOT
- Any TAB from A-Y and change the data scroller to the second or third page.
- Then click on TAB Z
* The table on TAB is shown as empty.
If you select any tab but leave the data scroller on the first page.
And navigate to TAB Z - this tab will show a table with one record and no data scroller.
Please let me know if this is enough information.
-
7. Re: Strange behavior on dataTables on dynamic tabs.
peter.falken Sep 15, 2015 12:04 PM (in response to michpetrov)Michal,
I've updated this thread with a SCE on my previous post.
-
8. Re: Strange behavior on dataTables on dynamic tabs.
michpetrov Sep 16, 2015 4:38 AM (in response to peter.falken)Surely 2 tabs would have been enough to demonstrate the behavior?
Instead of rendered="#{pag_head and value.size() gt rows}" you can use renderIfSinglePage="false", it works fine then. Although the behavior is strange. I'll take a look at it.
-
9. Re: Strange behavior on dataTables on dynamic tabs.
peter.falken Sep 16, 2015 11:28 AM (in response to michpetrov)Thank you Michal.
Using renderIfSinglePage="false" solves the empty table issue, the only difference I can see is that when using renderIfSinglePage="false", the header of the table is still render (small rectangle at the top) as if the datascroller is there but with all its controls hidden ( this doesn't affect functionality, it seems more of an asthetics issue ).
Regards,
Luis