I started to create an app using GWT 2.3 and then incorporated widgets from Smart GWT 2.4 but just upgraded to 2.5 today. My app is using the RequestFactory servlet along with MyBatis for basic CRUD operations. Upon further reading, it appears that using a DataSource with my DynamicForm will be more efficient. When looking at the examples (builtInDS) in the 2.5 download, RPC is being used as opposed to RequestFactory. Without diving any deeper, does anyone know if it is possible to use the Smart GWT DataSource with the RequestFactory?
Announcement
Collapse
No announcement yet.
X
-
So I got things working using the evaluation version (smartgwtee-2.5) and Oracle 11g after reviewing the "quick guide" and a few other posts w/in the forum. I am now trying to call a stored proc. that I wrote that returns an OUT param of sys_refcursor.
the sp is as follows:
PROCEDURE Get...(prc OUT sys_refcursor)
AS
BEGIN
OPEN prc FOR SELECT...
END;
This is how I have the call set up in the ...ds.xml file:
<DataSource ID="employees" serverType="sql" tableName="EMP">
<operationBinding operationType="fetch">
<customSQL>call getemployees()</customSQL>
</operationBinding>
</DataSource>
Is this possible with the DataSource? Do I need to change how the stored proc is constructed?
Comment
-
So the problem that I am encountering now is how to handle the OUT parameter that I need to pass into the SP call. When the following is executed, Oracle obviously complains about the wrong number of args in the call to the SP.
<customSQL>
call getemployees()
</customSQL>
I see the example in the guide for a remove operation, but how do I handle specifying an OUT param? In SQL Server, one would not have to worry about specifying an OUT param since you can simple say "SELECT * FROM..." as the return type. Is the thought here that I need to re-write the SP to not take an OUT param? Maybe change to a function which is possible.Last edited by mikeswong; 10 Aug 2011, 18:40.
Comment
-
Yes, the super-simple approach of just dropping SQL into a customSQL block requires that the SQL return the value that is supposed to go back to the client. Otherwise we'd need a bunch more declarations to understand which OUT param is intended to be the result and how to get data out of it.
If you can either switch to a function or wrap the procedure with a function this should work.
Comment
-
Hi mikeswong,
did you ever solve your problem? I have a similar one in this thread.
Thank you & Best regards
Blama
Comment
Comment