When I attempt to render a select widget using HTRAF, I get an "Uncaught TypeError: Cannot read property 'length' of undefined" on line 776 of jquery.htraf.js. The data-htsql attribute is filled with a proper query and I can see the results manually. The problem seems to be that the data and meta properties are not filled in via the Ajax response. Line 43 and 44 are returning undefined up the stack chain of jquery.htraf.js. Is there some config I need to do to the htsql service to get it to render the json appropriately to be compatible with the HTRAF library?
I have started the htsql service with the following command and yaml file:
htsql-ctl serve -C casemart.yaml &
htsql:
db:
engine: mysql
database: casemart
username: root
password: *********
host: localhost
port: 3306
tweak.autolimit:
limit: 1000
tweak.shell.default:
tweak.override:
included-tables: [casemart.*]
foreign-keys:
- sfcase(account_id) -> sfaccount(id)
- sfcase(owner_id) -> sfuser(id)
- sfcase(createdby_id) -> sfuser(id)
- sfcase(closed_date_dim_id) -> date_dim(date_id)