Suggestion to update trapped A links in components

9 views
Skip to first unread message

Ide

unread,
Sep 16, 2014, 11:02:38 AM9/16/14
to web...@googlegroups.com
I am trying to make an application that has the left hand menu created using one web2py component and the main view within the web page created using another component.

I make the links in the menu on the left hand side using code like this:
{{=A('linked page',_href='http://example.com/app/controller/func/action?1=param',cid=mainview)}}

This then updates the main view with the relevant content supplied by the component (in my case the arg (action) and var (1=param) determine what content gets loaded into the 'mainview' element). However, the data-w2p_remote attribute on the #mainview element does not get changed to reflect the new location, so any form submission from the new page doesn't retain any parameters contained within the URL specified in the _href parameter in the example above.

Can I ask (or suggest) that when a component is refreshed/reloaded that the data-w2p_remote attribute gets updated to reflect the  new URL used to load that component? I think this would keep the client side DOM a little more consistent and keep behaviour as expected under the various ciircumstances.I did have a look in web2py.js to try and find the relevant part of the code, but I got lost trying to follow through the various functions involved :-)

Thanks.
Reply all
Reply to author
Forward
0 new messages