The interface with the databases is a bit of a hack and not currently
in a state that would be useful in production mode, but if there is
interest, and with a little help from some more experienced Rails/Hobo
developers, this could be fixed.

What happens is when the DRYML tag <jqigrid ..> is called it passes
the colmodel attribute to a function which stores it in a global. This
lets it know which columns are going to be requested via JSON. This
data is stored in a global persistent hash on the server, but not in a
way that would probably work with multiple server instances running.
That is if the page was served from one server instance, and then the
javascript JSON AJAX call was made to get the data got served by a
different server instance, it probably wouldn't have the global hash
listing the columns.  Perhaps that is where the nil error is coming
from.

The difficulty is that the Tomov grid does not send back the column
list when it requests data, so that it requires a custom server
response be coded for each variation in a grid.  But I wanted it to be
as easy as just dropping in a <jqigrid ...> tag and then having
everything else be taken care of behind the scenes so I coded the hack
in that stores the global variable containing column info.  The
response is handled by mixing some code into the ApplicationController
that handles the JSON requests for data, you can see that in lib/
hobo_jqi.rb.

I'm willing to fix it, just too inexperienced to know the best way to
go about it. My thinking was too modify the javascript of Tomovs grid
to send back metadata like table and column names when it does the
JSON AJAX calls.

Now that I have seen extjs maybe time would be better spent on that
but it has the licensing complication of having to pay if you use it
for commercial work.

I have run the install of the jqi-grid on a fresh hobo install from
git with the instructions that I put out and got it to work in
development mode so if you are just running a single instance of a
server there might be a different issue that you are experiencing.

Brett



On Aug 30, 1:46 am, Cornelius <[email protected]> wrote:
> hi all
>
> ok, i managed to get the class running but now get:
> You have a nil object when you didn't expect it!
>
> how does jqgrid which db table to use?
>
> many thanks
>
> cornelius
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to