OK, so I'll express what I'm doing in bullet points without code (as I'm in a massive muddle)...
- Using a single-page application with
<p:layout>
consisting of<p:layoutUnit>
s (in different pages brought to main page using<ui:include>
) - One of these
<p:layoutUnit>
s is a single<p:dataTable>
updating dynamically (also it's a dynamic dataTable based on selected single-row and associated<p:commandButton>
- Rest of the
<p:layoutUnit>
s update dynamically based on actions happening in dataTable (they contain buttons whose actions (presently not defined) update with change in dataTable data and dynamic 'header text') - dataTable uses dynamic columns (as data to be shown changes, if it helps, data is in a 'tree structure' and I navigate 'up' and 'down using buttons (common 'back' in header) and 'next'
<p:commandButton>
for each row)
Now to the actual problem
When I use the 'next' button to go to the next level of data in the tree, let me illustrate what happens:
- Root -> 'Next' -> Goes to Child -> data updated
- Child -> 'Next' -> No action -> Use one of the non-dataTable buttons with no function defined -> default JSF/PF action is Page Refresh -> data updated
- 'Next' -> Goes to Child
Why does this happen? Why does the 'no action' period happen in between? I feel like I'm missing something here. It's never happened before. None of the controller's functions are triggerable at that time. I've checked this by using the debugger in my IDE. I'm 100% sure it's a problem with the dynamic dataTable. But I don't understand why as I've initiated Column Controller in the 'preRenderView'
stage using <f:event>
Also using an 'id' for the body in the Main Index Page and updating using RequestContext just makes the page blank.
I've tried multiple combinations of View and Request Scopes for the Column Controller and used a 'PreViewRender' event listener in the dataTable to initiate the Column Controller. All of my efforts.
One particular combination (IIRC **NOT ** using the PreViewRender listener causing even the data to not be updated in the dataTable, forget non-functioning of <p:commandButton>
s or <p:remoteCommand>
on <a>
onclick
s.
As there is a huge amount of code spanning this and am in a muddle myself now, I'll add code when you make some headway.