There are two problems with the method mentioned above:
1. this.pcmf_getValues() returns null on unselected tables which results in a NullPointerException.
2. l_cont.pcmf_clearValues() should be called outside (before) the for loop ;)
Current method:
public void pcmf_setSelected(int [] xRows)
{
HoGenericDataContainer l_cont = this.pcmf_getValues();
for (int i = 0; i < xRows.length; i++)
{
l_cont.pcmf_clearValues();
l_cont.pcmf_addValue(Integer.toString(xRows[i]));
}
this.pcmf_setValues(l_cont);
}
Possible (untested) solution:
public void pcmf_setSelected(int [] xRows)
{
HoGenericDataContainer l_cont = this.pcmf_getValues();
if(l_cont == null)
l_cont = new HoGenericDataContainer();
else
l_cont.pcmf_clearValues();
for (int i = 0; i < xRows.length; i++)
{
l_cont.pcmf_addValue(Integer.toString(xRows[i]));
}
this.pcmf_setValues(l_cont);
}
MfG, Marcus
Logged In: YES
user_id=1836061
Originator: YES
... same (pcmf_clearValues) for MuGenericTable#pcmf_setSelected(int[] xRows)