Primefaces - datatable inside panelgrid has invisible selected row - jsf

I have p:dialog, inside there is p:panelGrid, and one of column is p:dataTable. Datatable has selectionmode single. Problem is: dataTable loses all styling it defaulty had (it looks like pure unstyled html table). Also when i click row in dataTable, row is invisible, no data is shown. Also rowSelect functionally works, because data from selected row displays in input fields in another outputPanel correctly. Its just invisible

Related

JSF datatable - method always gets called with last element in datatable

I have component thats basically datatable made of list of buttons. Each button opens dialog thats another component, and passes current var of datatable to this component (dialog). Inside dialog there is button that submits element and text. This command button has actionListener=#{beanClass.beanMethod(cc.attrs.passedListElement)}. Problem is element passed to method is always last element in datatable, even if i click in middle element of datatable. Why its happening?

Filter value in primefaces datatable

Is it possible to see if filter area in a datable is empty or not and what is it's value?
I am using a datatable with pagination, when I add a new row to the datatable, I want to see if my rows are filtered or not to find the page in which newly added row is located.

Rerender cell in rich:extendedDataTable using ajaxKeys gets rich:dataTable style class

I have a rich:extendedDataTable and a a4j:commandButton outside this table. When clicking the button, I want to rerender only one row and not the whole table so that the scroll remains on my selected row.
For that, I implemented the solution proposed on this other thread: reRender a specific row of rich:dataTable
It worked but it has a terrible side effect. I only rerender one cell and upon being rerendered, the cell shows a bit odd and it's not aligned anymore with the rest. Checking the source, I noticed that this rendered cell now has a <td class="rich-table-cell"...>and the other cells have <td class="extdt-cell rich-extdt-cell" ...>. So the rerender gives my cell a rich:dataTable class name instead of the rich:extendedDataTable class name that it belongs to.
Any ideas why and what should I do to have it rerender with the correct class?

Primefaces tabview menu

Im having a problem with Primefaces tabview. It's tabs consists of selectOneMenu elements that look like this:
`
<p:selectOneMenu value="#{bean.currentItem.marketType}">
<f:selectItems value="#{bean.marketTypes}"/>
</p:selectOneMenu>
`
Now, I show this view as a dialog every time i select row from a dataTable (in order to edit selected record). The strange behavior is: the first time I refresh the page, i select the row, and the dialog pops out correctly. In all tabs of a tabview, all selectOneMenu elements shows correct data for selected record. However, when i close dialog and reopen it by selecing row again, only those selectOneMenu elements shows correct data, which where in a selected tab from a tabview before the dialog was closed.
Does any one know how to keep data in all tabs every time I open a dialog without refreshing the page?
Solved, there is a bug in Primefaces that is described here:
Primefaces tabView executes form validation on tab change

Collapsible Panels in jsf/primefaces

So what I want is this (Just the collapsible part):
http://www.primefaces.org/showcase-labs/ui/layoutEvents.jsf;jsessionid=238C388CE45C77A9B90898A82F2340EA
With 2 differences.
I want it in a datatable
I want to make a custom button that will control whether or not they are collapsed
Is this possible if so is there a good example I can go off?
i would start by
creating the dataTable as you want it to look with the row fully 'expanded'
put the data to be toggled in a panelGroup
put some sort of toggle on the row
put an effect on the panelGroup
put an action on your toggle to show/hide the panelGroup for the row
Some component libraries have this. they call them 'expandible rows', some display the data in the row, some render the row(s) below the 'parent' one.
One issue that i found (in earlier versions) is that when you had the data display in a separate row and you had a paginator set to show a set rows to display, it would bump the last row(s) when expanding the requested row to expand. I don't know if that is still the case.

Resources