Question

My usecase is a one-page site. On the page, there should be three "frames". One frame lists all the users. This frame is only seen by admins. Selecting a user triggers an action that fills the second frame - all logged Transactions of the user are shown in the second frame. If a nonadmin user logs in, the second frame is filled with his transaction log information. Now the information in the second window is basic - transaction Id and Date, so the third frame contains full transaction details (naturally, after the User/Admin selects a Transaction from the second frame) which the user can just see and the admin can edit and save. That's it.

From the database perspective, each transaction has the full User information instead of an ID as the foreign key, meaning that in order to fill the first frame, I need to make a Group by expression on the Users field so I can get the Unique users. In the next step, I just get all Transactions for the selected user (Id and Date information), and in the third step, I get the full row.

I apologize if this is too trivial and I'm not asking for hand holding, I'd just want to get a list of components that I could use for this because there are a lot of them in the SmartGWT showcase and I wouldn't want to "waste" time trying to force a component do something when there's a better one available.

Was it helpful?

Solution

One possible way to do this, in a as simple as possible way, based on your description, is through a combination of HLayout and VLayout objects for the layout, ListGrid objects for showing, in a tabular format, the information and Datasources, to retrieve and hold within the data from your database. If you prefer a tree like representation, you should look into TreeGrid, which is basically ListGrid, with a tree representation for its data. Other objects like Button and Label classes can be handy, and the SC object with its static methods can be used for pop ups to the user.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top