[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

RoR: Tree and Grid Widgets

Jenjhiz

7/5/2005 5:12:00 PM

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

3 Answers

Zach Dennis

7/5/2005 5:34:00 PM

0

Jenjhiz wrote:
> 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



bww00amdahl

7/5/2005 6:54:00 PM

0

Does anyone have an example(s) of Zach's 2B recommendation ????
Thanks

Jenjhiz

7/5/2005 7:38:00 PM

0

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