Please see my .png file and help me out how can i set just team id?
Any expert? thanks in advance
Please see my .png file and help me out how can i set just team id?
Any expert? thanks in advance
Hi Kamrul
If you don’t set any ItemLabelGenerator, the default will be toString()
- in your case Team.toString()
, this is why you see Team(teamId=India, playerSet=......
.
You can change that to display only the team id with this line:
team1.setItemLabelGenerator(Team::getTeamId);
Kaspar Scherrer:
Hi KamrulIf you don’t set any ItemLabelGenerator, the default will be
toString()
- in your caseTeam.toString()
, this is why you seeTeam(teamId=India, playerSet=......
.You can change that to display only the team id with this line:
team1.setItemLabelGenerator(Team::getTeamId);
Its’s give me an error when i try to binding data.
nb: TeamId is an EnumType
Then you need to further define what value of the Country enum you want to display. Let’s assume your Country
enum has the country name in a String called name
, with a getter for it called getName()
:
team1.setItemLabelGenerator(team -> team.getTeamId().getName());