RoR: Tree and Grid Widgets

J

Jenjhiz

So far I'm impressed with what I see in RoR. I look at using RoR to
write traditional c/s database applications. The interface I prefer is
a tree on the left side and an integrated view of a set of records on
the right side, either displaying a single record in form format, or a
set of records in grid format. I haven't seen examples of this type of
RoR application. Any pointers?
Thanks,
gk
 
Z

Zach Dennis

Jenjhiz said:
So far I'm impressed with what I see in RoR. I look at using RoR to
write traditional c/s database applications. The interface I prefer is
a tree on the left side and an integrated view of a set of records on
the right side, either displaying a single record in form format, or a
set of records in grid format. I haven't seen examples of this type of
RoR application. Any pointers?

There are a few ways you can handle displaying/loading the interface:
1 - using frames, a left and right frame
2 - everything in 1 view, on 1 page
a. use standard HTTP Request
b. use XmlHTTPRequests

I'd recommend using 2b. For your tree/grid component you'd simply use
some javascript, html/css and perhaps a few images. You could wrap each
item of your tree/grid in a javascript object. When the user selects the
next tree/grid item you could send the XmlHTTPRequest to rails, which
would process and send back the information associated to your selected
item.

You could use javascript on the client-side and have it update your text
boxes which displayed actual record data.

Zach
 
J

Jenjhiz

Hi,
Thanks for the reply. So basically the handling of widgets is still all
in Javascript, and user gestures sent back to the Controller, which
will direct requests to the proper actions and view. As a forever Ruby
dabbler -- I've never had the motivation to get serious about it until
RoR chugged into town -- it's still a long way for me from having the
knowledge of what to do in general to putting the nuts and bolts
together. Assume a simple data/view model such as on the left side of
the page is a tree that displays index info of master records, and the
right hand display shows the rest of the master record in form format
acting as header, and below this header is a grid containing detail
records relating to the master record. You can do CRUD actions on the
master and the detail, and things like sort by a column, search using a
list of value in a popup, and all those nice things that users have
come to take for granted. I have a hard time visualizing how to proceed
from here. One controller? Two controllers, one for the master record
the other for the detail record? Delete_record action, or delete_master
and delete_detail actions? Etc. Should be interesting. I figured that
someone must have done something of this sort, as this is a basic
application design.
Thanks again.
gk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,175
Messages
2,570,942
Members
47,490
Latest member
Finplus

Latest Threads

Top