留言板

expando, setattribute, group of values

Jan Agermose,修改在10 年前。

expando, setattribute, group of values

Junior Member 帖子: 64 加入日期: 10-4-9 最近的帖子
I created a custom attribute for "user" (more actually) and one is a "Group of Text Values " so its a dropdown and Im trying to set its value from code using "setAttribute" just like the others. This does not work giving me an exception

java.lang.String cannot be cast to [Ljava.lang.String;

(casting string to array of string I think)

how should I set the value?
Jan Agermose,修改在10 年前。

RE: expando, setattribute, group of values

Junior Member 帖子: 64 加入日期: 10-4-9 最近的帖子
awnser:

user.getExpandoBridge().setAttribute("key", new String[] {"value"});