|
|
Re: XWT + DataBinding +DataContext +Replace [message #505235 is a reply to message #505197] |
Mon, 28 December 2009 04:45 |
Yves YANG Messages: 688 Registered: July 2009 |
Senior Member |
|
|
"Walter Prabhakar" <kwchess@gmail.com> wrote in message
news:hhaeth$s4v$1@build.eclipse.org...
> Problem
> ---------
> In my java code, I have the following
>
> oC = (Control) XWT.load(parent, url, loadModel("SG.xml"));
> System.out.println ( XWT.getDataContext(oC)) ;
>
> I would like to refresh the TableViewer with the contents of SGNew.xml in
> the runtime.
You can always to get the file content, create a IObservableList to pass and
then pass it to TableViewer. But you need to know data binding framework.
>
> Since I didn't see setDataContext such as
> XWT.setDataContext(oC,loadModel("SGNew.xml")),
> I tried setting the input of TableViewer with the result of
> loadModel("SGNew.xml"), obviously it threw the following error
> "org.eclipse.core.runtime.AssertionFailedException: assertion failed: This
> content provider only works with input of type IObservableList"
>
> What is the best way to proceed ?
The simple way is just to reload the XWT resource to recreate UI with new
data context.
Best regards
yves
>
> Thanks,
> Best Regards,
> Walter G. Prabhakar.
|
|
|
|
|
Re: XWT + DataBinding +DataContext +Replace [message #566799 is a reply to message #505197] |
Mon, 28 December 2009 04:45 |
Yves YANG Messages: 688 Registered: July 2009 |
Senior Member |
|
|
"Walter Prabhakar" <kwchess@gmail.com> wrote in message
news:hhaeth$s4v$1@build.eclipse.org...
> Problem
> ---------
> In my java code, I have the following
>
> oC = (Control) XWT.load(parent, url, loadModel("SG.xml"));
> System.out.println ( XWT.getDataContext(oC)) ;
>
> I would like to refresh the TableViewer with the contents of SGNew.xml in
> the runtime.
You can always to get the file content, create a IObservableList to pass and
then pass it to TableViewer. But you need to know data binding framework.
>
> Since I didn't see setDataContext such as
> XWT.setDataContext(oC,loadModel("SGNew.xml")),
> I tried setting the input of TableViewer with the result of
> loadModel("SGNew.xml"), obviously it threw the following error
> "org.eclipse.core.runtime.AssertionFailedException: assertion failed: This
> content provider only works with input of type IObservableList"
>
> What is the best way to proceed ?
The simple way is just to reload the XWT resource to recreate UI with new
data context.
Best regards
yves
>
> Thanks,
> Best Regards,
> Walter G. Prabhakar.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03598 seconds