Hello,
I’m trying to get the status message of users who are on my roster, but .getStatus() always return null while I know the user has set a custom status message. What I’m missing ?
public String convertValueToText(Object value, boolean selected,
boolean expanded, boolean leaf, int row,
boolean hasFocus) {
if (value != null && value instanceof DefaultMutableTreeNode) {
Object node = ((DefaultMutableTreeNode)value).getUserObject();
if (node instanceof RosterEntry)
{
String messageEtat;
if (((RosterEntry)node).getStatus()!=null)
{
messageEtat = ((RosterEntry)node).getStatus().toString();
}
else
{
messageEtat="";
}
return ((RosterEntry)node).getName() + " ";
}
else
{
return super.convertValueToText(value,selected,expanded,leaf,row,hasFocus);
}
}
return super.convertValueToText(value,selected,expanded,leaf,row,hasFocus);
}
};[/code]
Thanks !