Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 358839

Summary: VE does not work when service binding code added
Product: z_Archived Reporter: Xin Wu <cdlwuxin>
Component: EDTAssignee: Project Inbox <edt.javascriptgen-inbox>
Status: CLOSED WORKSFORME QA Contact:
Severity: critical    
Priority: P3 CC: cdlwuxin, chenzhh, jspadea, svihovec
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Xin Wu CLA 2011-09-25 22:55:03 EDT
Build Identifier: 20110924 nightly build

VE does not work when service binding code added

Reproducible: Always

Steps to Reproduce:
1. Create new Web Client with Service Project
2. Create a service and add the binding in DD editor
3. Create a RUIHandler, drag and drop some widgets into it. Make sure the design view and preview works well.
4. Add service binding declaration in source view "srv service1 {@Resource};"
5. Switch to design view and preview, no widgets can be shown
Comment 1 Xin Wu CLA 2011-09-25 23:01:46 EDT
resource binding URI set as workspace://test1/server.service1 in DD editor
Comment 2 Xin Wu CLA 2011-09-26 05:24:52 EDT
Reset component to JavaScriptGen

Error message:
Could not render UI
[CRRUI3651E] no service binding "srv" in deployment descriptor "test1" 
[CRRUI2094E] 
    ServiceBinder.ServiceBinder.loadBindFile() [native JavaScript]
    ServiceBinder.ServiceBinder.getBinding() [native JavaScript]

Uncaught [type=eglx.services.ServiceInvocationException]
test1/client/h1.html?contextKey=7:92
Comment 3 Brian Svihovec CLA 2011-09-26 09:20:52 EDT
What name was used in the DD file when entering the binding for "workspace://test1/server.service1"?  After Joe's change from last week, the binding name must now match the name of the Variable (e.g. srv in this case), and not the Type.
Comment 4 Justin Spadea CLA 2011-09-26 09:28:40 EDT
This is working for me, so long as you do what Brian said and use the correct binding name. If this is still a problem, please reopen and attach your project.
Comment 5 Xin Wu CLA 2011-09-26 21:42:49 EDT
Thanks Brian & Justin, it works.
Comment 6 Xin Wu CLA 2011-09-26 22:28:20 EDT
Some additional questions. 
In the add resource binding wizard, user browser the REST service/interface. Then the REST service binding name will set to the service/interface type by default, shall we add some message to inform user change the name to variable name?
Just a thought in mind, thanks for your comments.
Comment 7 Justin Spadea CLA 2011-09-27 09:20:48 EDT
Yes, we have a bug opened for that suggestion - see bug 358659
Comment 8 Xin Wu CLA 2011-09-27 21:23:07 EDT
Ok, thanks Justin