Are jQuery tabs overkill in this case? - jquery-ui

I'd like to create a content box with two tabs. Each tab is associated with a table which contain server-side data. My thought right now is just to load the page with 10 rows worth of data for each table and hide/display each table respectively to begin.
I was then going to toggle display of the tabbed content based on either click events on the tabs OR GET parameters relating to which tabbed content is being acted on (through pagination, for example).
Should I just handle this with UI tabs or is toggling display reasonable in this case? Since the user can update their data, I assume that caching via the tab UI isn't helpful in this case.
Thanks,
Brendan

From what I understood, I don't think its going to be overkill. If you are worried about performance, ten rows for 2 tables is just 20, which is not much. Paginating will also get 10 more rows for each 'click' so it's still good there.
Do use tab activation through click events, but also use GET parameters to know in which page the user currently is, from which tab.
Regarding caching data that you know will change, it might be unnecessary (see my 1st paragraph). Caching can sometimes become unwieldy, so don't add an uneccesary layer of complexity.
As someone who suggests simplicity above all else, I'd discard the whole 'tab loading' thing but leaving the tabs per se (i.e. the interface elements that will be clicked) and when the user clicks each tab, it takes to another page with the tabs too, old-fashioned style.

Related

Correct method of Master / Detail changes

I have two Tables tblMaster and tblDetail with Linked fields, it all works great. But on some rare occasions I need to see all of the Detail files un-linked.
I have tried...
OnButton1Click(Sender...
begin
try
tblDetail.DisableControls;
if Button1.Down then
tblDetail.MasterSource:=nil else
tblDetail.MasterSource:=srcMaster;
finally
tblDetail.EnableControls;
end;
and that does what I need, but it takes a long time with a lot of records in the Table.
In place of the MasterSource, I also tried
tblDetail.LinkedFields:='' else
tblDetail.LinkedFields:='LinkID';
with about the same reuslts.
Is there some faster way to Link / un-link the file displays?
Using D5, Zeos 6 and SQLite3.
You are switching the detail table in and out of filtered mode.
This switching is what's taking up the time.
Because the switch causes a refresh from the database.
As per greymatter's suggestion you'd be better of with to TTable's one permanently linked to the master table and one free.
Another way to speed things up more is to have 2 TDbGrids.
One visible the other one hidden.
If you want to show all records hide the grid linked to the detail table and show the one linked to the free table and visa versa.
That way you'll not incurr the cost of the switch.
You may want to remember syncing the active row on the displayed and hidden grid (if possible) before the swap. Otherwise it might be jarring for the user to see the rows jump around too much.
Obviously you'd need to disable (grey out) the master table's Grid, so as to let the user know he's now looking at the detail table on its own without filtering.
Finally another option is to dispense with the master-detail and show a joined view of both tables.
This means that rows from the master table would repeat.
Something like.
select d.d1, d.d2, d.id, m.m1 from detail d
left join master m on (m.id = d.masterid)
Whether this makes sense in your application you'll have to decide.

hide UI components at RUN TIME , design issue

on a form I need a first set of UI controls at process start, later I only need a second set of components. I put the set for process set #1 on a first panel , after finish process step #1 I start to hide panel #1, is ther any better way from UI design guide lines ?
I would use Frames instead of Panels. You can design Frames at design-time just like Forms, and then create instances of your Frames at run-time as needed. So create your first Frame (you can even place it on the Form at design-time) and then at run-time, when ready you can destroy the first Frame instance and create an instance of the second Frame.
Using panels like you describe is a very common and very respectable way to proceed. Nothing wrong with doing it that way.
Another often used idiom is a page control with hidden tabs. So, make a page control. Add two tab sheets. Set TabVisible to False for both tab sheets. Then at run time set the ActivePage property of the page control to specify which page is shown to the user.
The page control approach is really rather similar to using panels. It's perhaps marginally easier to work with at design time, but much comes down to personal preference.

Partial View Wizard with Navigation

Looked many things up, but never posted before. Here's my situation. Any help would be most appreciated.
I've got a wizard with numerous screens with an associated navigation bar made using CSS. As users click from screen to screen, the navigation reflects the current wizard page the user is on. Each screen has different inputs to be collected. Database reads and writes are required during the render and submission of each page.
Here's the catch. Not every page is required. Only required pages are displayed in the navigation and the required information is stored in the database.
My goal is to reduce the number of database queries by dividing the navigation and remaining input into two separate partials. This way I don't have to render the navigation between each screen eliminating the single query every time between screens.
How would I submit the form of the current screen, render the partial view of the next screen, and yet update the query string to reflect the current partial view as well? This way if the user refreshes the page, they get the current screen.
Sounds like pre-optimization. How do you know you're going to have a problem with your navigation because of the database?
Why not separate out your navigation and output cache it?
If you bound determined to change the url without changing the content you need to use History API and if you need a fall back for browsers that don't support that you can use history.js.

Jump to next searchable text.

I contribute to develop a wrapper for a bioinformatics program.
The program's output is quite long (dozens of pages if printed), but structured into sections.
I would like to add "next" and "previous" section buttons to facilitate jumping up and down in the output.
One way of doing this would involve parsing the complete output, adding "id" or "name" anchors and linking to neighboring sections using <a href="#section2"> type links. However, thats a pain in the butt to do, adds the potential of new bugs, and would slow down the display.
All sections start "in the same manner" (ie. if you control-F search for a specific text, you will jump to the next section). Is there an easy way of using the fact that all sections start with the same text to add links that will let you jump to the next one?
Cheers
Perhaps the jQuery ScrollTo plugin can help you. You could add the links you need for navigating by Javascript/jQuery after the page has loaded.

Can I control DNN footer links?

How does DNN decide what items from the menu to put in the footer? On one of my portals, I see just "Home". On another one I see "Home" and the last menu item. On still another one, there is none. I understand that whether to put a footer or not might be dependent on the skin, but what decides which items to put there? Of the 3 portals I quoted, the first and the second one have the exact same skin.
The question comes from client requirement that we provide one of the menu items only in the footer and not the main menu. To boot, I don't know how the footer items are controlled. Your thoughts, please?

Resources