jsf - Richfaces ExtendedDataTable selection question -
Take a look at
Please help
You will see a "car market" table with multiple selection support. You will also notice that one of the selected rows appears in bold. What does this bold line mean? Is it somehow managed by the What am I trying to do, to create a new item to support Bean and emphasize the table selection to point to the newly created object. I have been able to set the selection through The bold style for the selected row is sent by the stylesheet with Richface. Each theme has its own stylesheet in Richface For example, Answer this comment: In Richfase 3.3, I am called You must first org.richfaces.component.UIExtendedDataTable or any other RF class? That line does not have to find an API.
setSelection () , but I have no control over that bold line, it remains in the previous state, please help.
Enriched: Expanded DataTable .
rf-edt-r-Sel or
rf-edt-r-act defines the style of the selected row, you You can override by declaring the style for those style category names where you
rich: Extended DataTable
& style style = "text / css" & gt; .rf-edt-r-sel {background-color: yellow; } .rf-edt-r-act {font-weight: bold; Red color; } & Lt; / Style & gt;
Pauses appears to be the row number of the expanded table. If you want to get the underlying object (i.e.
InventoryItem ) from the
UIExtendedDataTable , then you will need to set the line number you
setRowKey (selectionKey) Before getting the call
getRowData () to get the actual object, then
dataTable.setRowKey (selectKey) to enter
selectionItems
InventoryItem < / Code> to use
UIExtendedDataTable (except for the extended table "Selected Rows I "will appear in the box).
Objects for the basic purposes - DataTable.Getrevke (); and
dataTable.setRowKey (root); , you can refer to it.
UIExtendedDataTable , a method set activaver (), which seems to set an active record, but this latest version of the Richface 4.0 CR1 Has been deleted. Therefore you can use the
UIExtendedDataTable to achieve the same effect
int property to
boldRow in your MBN Code> after which you will have a
and
incomplete attribute of the button should call the JavaScript API of the UIExtendedDataTable which is equal to the line number
boldRow , and then use the
Render attribute to refresh UIExtendedDataTable . Then
and
& lt; Rich: Expanded DataTable & gt; might look like this:
& lt; A4j: commandButton value = "submit" action = "# {MBean.action}" render = "# {rich: customer ID ('table')}" incomplete = "# {rich: component ('table')}. Select (# {MBN .boldRow}) # # {Rich: Component ('Table')}. SetActiveRow (# {MBean.boldRow}); "/ & Gt; & Lt; Rich: Extended Data ID = "Table" ................ & lt; / Rich: Extended DataTable & gt;
Comments
Post a Comment