Dynamic menu update

45 views
Skip to first unread message

Richard

unread,
Aug 12, 2014, 5:56:35 AM8/12/14
to web...@googlegroups.com
Hello,

I  have a farely large menu structure in a page through buttons with dropdown menu's which are changed dynamically. A refresh of the whole page take about 5 seconds which is too long. Now I want to split this using components. These components must be reloaded depending on additions to the database through a SQLFORM.factory.

navigation.load:
                   <div id='menu_identity'>
                    </div>
                    {{=LOAD('default', 'menu_identity.load', ajax=False, ajax_trap=False, vars=request.vars, target='menu_identity') }}

menu_identity.load:
                     <li>{{=A(T("Add local EV"),_href=URL('internal','add_local_ev.load', 
                           vars=dict(com=com, sif=sif)), cid='internal_data_div' ) }}</li>

add_local_ev.load:
                     {{=LOAD('internal', 'process_add_local_ev', ajax=True, ajax_trap=True, vars=request.vars )}}


internal.py:
                     if form_add_local_ev.process(formname='add_lev').accepted:
                            .....
                             response.js = "jQuery('#%s').get(0).reload()" % 'menu_identity'

I think I am making the design to complicated and does not give the needed functionality.
Any assist is welcome.

Richard D

Richard

unread,
Aug 13, 2014, 4:36:22 AM8/13/14
to web...@googlegroups.com
My conclusion is that the menu is becoming too large any performance improvement will have minimal user experience improvement. I'll create other menus's on locations where users are working at that time. 

Richard D
Reply all
Reply to author
Forward
0 new messages