SWF-1018 - Update SelectionAware interface to make currentRowSelected a proper JavaBean property
This commit is contained in:
@@ -53,7 +53,7 @@ public class ManySelectionTrackingListDataModel extends SerializableListDataMode
|
||||
selections.addAll((List) getWrappedData());
|
||||
}
|
||||
|
||||
public void setSelected(boolean rowSelected) {
|
||||
public void setCurrentRowSelected(boolean rowSelected) {
|
||||
if (!isRowAvailable()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ public class OneSelectionTrackingListDataModel extends SerializableListDataModel
|
||||
}
|
||||
}
|
||||
|
||||
public void setSelected(boolean rowSelected) {
|
||||
public void setCurrentRowSelected(boolean rowSelected) {
|
||||
if (!isRowAvailable()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ public interface SelectionAware {
|
||||
* Sets whether the row pointed to by the model's current index is selected
|
||||
* @param rowSelected true to select the current row
|
||||
*/
|
||||
public void setSelected(boolean rowSelected);
|
||||
public void setCurrentRowSelected(boolean rowSelected);
|
||||
|
||||
/**
|
||||
* Sets the list of selected row data objects for the model.
|
||||
|
||||
@@ -64,7 +64,7 @@ public class SelectionTrackingActionListener implements ActionListener {
|
||||
if (valueAccessor != null) {
|
||||
Object value = ReflectionUtils.invokeMethod(valueAccessor, parent);
|
||||
if (value != null && value instanceof SelectionAware) {
|
||||
((SelectionAware) value).setSelected(true);
|
||||
((SelectionAware) value).setCurrentRowSelected(true);
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Row selection has been set on the current SelectionAware data model.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user