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 org.richfaces.component.UIExtendedDataTable or any other RF class? That line does not have to find an API.

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 setSelection () , but I have no control over that bold line, it remains in the previous state, please help.

The bold style for the selected row is sent by the stylesheet with Richface. Each theme has its own stylesheet in Richface Enriched: Expanded DataTable .

For example, 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;   

Answer this comment:

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.

In Richfase 3.3, I am called 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

You must first int property to boldRow in your MBN Code> after which you will have a and to call the method of an MBin . This method will specify the row number that you want to select according to your logic. The 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 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

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -