Scripted business object for dynamic query
I am trying to create a scripted business object but I'm running into some issues. I want to create a folder search admin form with a scripted business object that is bound to a grid. I want to pass parameters into the BO and return a result based on dynamic SQL that I build in the server script behind the BO. I got an example from processmapping.com and made the approrpiate changes to suit my needs.
When I click the Search button on my form, the query executes and the business object returns data (and adds rows to the grid), but the rows in the grid are just blank. I know there is data in the grid, because when I click a row, it puts data into dependent fields. I checked everything from BO parameter names and cases to client paging on the grid and I can't seem to figure out what the issue is. Has anyone here experience the same behavior with scripted business objects?
Comments
-
I think I've seen something like this before... if you've verified that the data is indeed in the DOM, but is not visible in the grid, check if the CASE of the variable definitions in the scripted business object match the CASE of the underlying returned table columns from the sql. I think it might be related to how the telerik grid columns bind to variables in the web client.
0 -
You know, I saw this solution on another website but it didn't register at first. I had my SQL statement as:
select eFolderId, eStageName from eFolder
and my variable definitions were:
eFolderId
eStageNameAfter running the query in TOAD, I realized that even though I had my SQL statement using camel case, when the query returned results, it was returning the column names in all caps. After changing my variable names to all caps, it started working. Is there any way this can be changed in a future release, or is this a limitation of Telerik grids? I personally prefer to use camel case while coding in C# as it's a common practice. It looks like any tables with columns names in all caps will run into this issue (in my case EVERY table).
0 -
It might just be a combination of how Oracle wants to return those column names and javascript's inherent case sensitivity. If Oracle supports selecting ‘UPPERCASECOLUMNNAME’ AS ‘camelCaseColumnName’ you might be able to workaround in the body of the SQL to match your camelCaseVariableDefinitions.
0 -
Thanks Tony. Oracle does support column aliasing in queries using double quotes:
select efolderid "eFolderId" from efolder
So this is a workaround that should work, however I can't seem to get it to. I'll keep playing around with it, but worst case I can just name my column variables in all caps.
0 -
Yes, I can confirm this is the case, and the alias appeoach is the solution.
Having several hundred BO's in a system converted from version 6, I know it fairly well now. We have had to change Every Single One.
With table BO's you have no option, and you probably have to recreate it when in this situation.
0
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 152 General Questions
- 148 Thrust Services
- 57 Developer Hackathon
- 37 Thrust Studio
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 32 eDOCS
- 190 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 10 XM Fax
- Follow Categories