| XWT and Custom Widget [message #929429] |
Mon, 01 October 2012 09:03  |
Jürgen Weinberger Messages: 26 Registered: August 2012 |
Junior Member |
|
|
Hi! I am still playing arround with xwt more or less successfull.
I am trying to build a custom Text Widget which has already some text auto completion available.
The widget looks more or less like this:
ContentAssist Text extends Text {
private List<String> proposals;
..
protected void checkSubclass() {
}
public void setProposals(List<String> proposals) {
..
}
public List<String> getProposals() {
return proposals:
}
}
in my xwt:
Quote:
<z:ContentassistText proposals="{Binding path=defaultRoles}"/>
I have another combo where the binding with defaultRoles works perfect when i set it as input. Also the setter-method in my widget-class is called but the problem is that i always get an array with the binding data instead of the strings.
So do i have to look up the binding my self? I thought i should get the List without any trouble. By the way defaultRoles has a List<String> in the background.
I had another widget where i only bound a String and there it was easy.
Thanks for any help and
best regards weinma
|
|
|
|
|
| Re: XWT and Custom Widget [message #930290 is a reply to message #930197] |
Tue, 02 October 2012 03:16  |
Jürgen Weinberger Messages: 26 Registered: August 2012 |
Junior Member |
|
|
Hey! Just an update. I tried it with
public void setProposal(Object object) {
...
}
and just changed the type to Object at my CustomWidget
So now i get an correct ArrayList<Object> with the Strings and just have to do some type checks and casts.
My last question is if this is the way to do something like this or is it possible to get the a list with the right typesafe data?
Best regards
Weinma
[Updated on: Tue, 02 October 2012 03:16] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.06951 seconds