Give a name to your components

{{=LOAD(...,target='one')}}
{{=LOAD(...,target='two')}}
{{=LOAD(...,target='three')}}

now any action can trigger a component reload

response.js="web2py_component('action','target')"

where action is the URL of the component and 'target' is 'one', 'two',
'three'', etc.



On Jun 2, 4:21 pm, Richard Vézina <ml.richard.vez...@gmail.com> wrote:
> Hello,
>
> Here my view code :
>
> {{extend 'layout_form.html'}}
>
> <style type="text/css" title="currentStyle">
> @import
> "{{=URL('static','plugin_added/jquery-ui-1.8.9.custom/development-bundle/th 
> emes/base/jquery.ui.all.css')}}";
> </style>
>
> <script type="text/javascript" charset="utf-8"
> src="{{=URL('static','plugin_added/jquery-ui-1.8.9.custom/js/jquery-1.4.4.m 
> in.js')}}"></script>
> <script type="text/javascript" charset="utf-8"
> src="{{=URL('static','plugin_added/jquery-ui-1.8.9.custom/development-bundl 
> e/ui/jquery.ui.core.js')}}"></script>
> <script type="text/javascript" charset="utf-8"
> src="{{=URL('static','plugin_added/jquery-ui-1.8.9.custom/development-bundl 
> e/ui/jquery.ui.widget.js')}}"></script>
> <script type="text/javascript" charset="utf-8"
> src="{{=URL('static','plugin_added/jquery-ui-1.8.9.custom/development-bundl 
> e/ui/jquery.ui.tabs.js')}}"></script>
> <script>
> $(function() {
>     $( "#tabs" ).tabs();});
>
> </script>
>
> <div class="demo">
> <br/>
> <br/>
> <br/>
> <div id="tabs">
>     <ul>
>         <li><a href="#tabs-1">{{=T('folder').capitalize()}}</a></li>
>         <li><a href="#tabs-2">{{=T('volume').capitalize()}}</a></li>
>         <li><a href="#tabs-3">{{=T('tome').capitalize()}}</a></li>
>         <li><a href="#tabs-4">{{=T('report').capitalize()}}</a></li>
>     </ul>
>     <div id="tabs-1">
>     <br/>
>
> {{=LOAD(c='ref',f='create_fvte',args='ref_fnaregistry',extension='load',aja 
> x=True,ajax_trap=False)}}
>     </div><!-- tabs-1 -->
>     <div id="tabs-2">
>     <br/>
>
> {{=LOAD(c='ref',f='create_fvte',args='ref_vregistry',extension='load',ajax= 
> True,ajax_trap=False)}}
>     </div><!-- tabs-2 -->
>     <div id="tabs-3">
>     <br/>
>
> {{=LOAD(c='ref',f='create_fvte',args='ref_tregistry',extension='load',ajax= 
> True,ajax_trap=False)}}
>     </div><!-- tabs-3 -->
>     <div id="tabs-4">
>     <br/>
>
> {{=LOAD(c='ref',f='create_fvte',args='ref_eregistry',extension='load',ajax= 
> True,ajax_trap=False)}}
>     </div><!-- tabs-4 -->
> </div><!-- tabs -->
>
> </div><!-- End demo -->
>
> The problem is that when the form loaded with component in tab-1 is submited
> and the user clic on tab-2 to fill the following form... The component is
> not up to date... So the new entry just made into the preceding form is not
> available to be pick in the second form dropbox...
>
> Is there a way to send a refresh component command on tab-2 clic or
> something?? Or the only solution be to add a refresh button that to force
> component reload??
>
> Thanks
>
> Richard

Reply via email to