Он работает с двухсторонним связыванием данных.
Вы можете сделать это, используя odataModel метод createEntry.
createEntry ожидает параметр, путь к вашему entitySet, который вы хотите создать (это должно быть что-то вроде XXXXset). Представьте себе следующее:
1 - Пользователь нажимает кнопку «Добавить», которая отображает диалоговое окно с некоторыми полями и двумя кнопками (сохранить и отменить), чтобы добавить свою новую сущность.
2 - В «событии открытия» перед открытием диалогового окна вы создаете новую сущность с помощью метода createEntry. Его возвращение дает вам контекст, который вы можете привязать к диалогу.
that.contextCursoIniciativaEmpregadoASerCriada = that.getView().getModel().createEntry('/CursoIniciativaEmpregadoSet');
that.fragmentCriacaoDadosInicEmpregado.bindElement(that.contextCursoIniciativaEmpregadoASerCriada.sPath);
that.fragmentCriacaoDadosInicEmpregado.open();
3 - Появляется диалоговое окно с привязкой на месте.
4 - Пользователь заполняет диалоговое окно свойствами сущностей
5 - Пользователь нажимает кнопку сохранения, и вы отправляете свои изменения
I went ahead and began the conversion. I haven't finished yet, but in case someone else is considering an upgrade from 1.5 to 1.6, I'll go ahead and answer the question with what I've seen so far.
For many people (all?), the compiler won't work, and fails with a stack overflow error. You can fix this with the command line tools, but I haven't found a way to fix it with the plugin. To fix this from the command line, you'll need to add a stack parameter to increase the size of the stack. I build with ant, so I added the following line to build.xml:
As I learn more, I'll update this.
Update 5/3/2009:
The upgrade is done. Not sure I like it as much as 1.5. Eclipse isn't entirely in tune with the new file layout. That is, it's not recognizing the war directory as being the root for web content now. There's probably a setting for this somewhere.
Additional notes:
For the last item, the code isn't being instrumented by the ant build, so the production deploy isn't affected by this bug. It's only the code generated by Eclipse, which I explicitly exclude from the production war.
The following is a gratuitous plug for the web site where this is deployed, so don't read it if such things annoy you: https://penwag.com/
Update 5/9/2009
Update 6/2/2009
Нам удалось использовать параметр Xss с Cypal: перейдите в Preferenes, Cypal Studio, попробуйте Параметр виртуальной машины по умолчанию: -Xmx1024M -Xss1024k
HTH Винченцо Казелли http://www.rcp-vision.com