Thanks Anthony

It looks like the problem was related to using
request.env.http_web2py_component_element instead of request.cid (I was
using request.env.http_web2py_component_element instead of request.cid as a
workaround of a bug in the previous version)...

now I know that request.env.http_web2py_component_element instead is not
exaclty the same as request.cid


just in case you want to reproduce it:

WELCOME/VIEWS/DEFAULT/COMP_IN.LOAD

{{=msg}}<br/>
{{=A('comp
IN',_href='comp_in.load',cid=request.env.http_web2py_component_element)}}



WELCOME/VIEWS/DEFAULT/COMP_OUT.LOAD

{{=LOAD('default','comp_in.load',ajax=False)}}
{{=A('comp
OUT',_href='comp_out.load',cid=request.env.http_web2py_component_element)}}
{{=LOAD('default','comp_in.load',ajax=False)}}
{{=A('comp
OUT',_href='comp_out.load',cid=request.env.http_web2py_component_element)}}
{{=LOAD('default','comp_in.load',ajax=False)}}
{{=A('comp
OUT',_href='comp_out.load',cid=request.env.http_web2py_component_element)}}



WELCOME/CONTROLLERS/DEFAULT.PY

def comp_out():
    from datetime import datetime
    return dict(msg="ciao from comp OUT at %s" %(datetime.now()))

def comp_in():
    from datetime import datetime
    return dict(msg="ciao from comp IN at %s" %(datetime.now()))


WELCOME/VIEWS/DEFAULT/INDEX.HTML

{{=LOAD('default','comp_out.load',ajax=False)}}

On Mon, Jul 18, 2011 at 11:58 PM, Anthony <abasta...@gmail.com> wrote:

> On Monday, July 18, 2011 3:18:44 PM UTC-4, sebastian wrote:
>>
>> H All,
>>
>> there is a component COMP_OUT which has a couple of A links with
>> cid=request.cid. So that the result of A will be loaded inside the component
>> itself.
>>
>> then there is another component COMP_IN which also has also some A links
>> with cid=request.cid....
>>
>> so far so good...
>>
>> now, I would like to use the component COMP_IN inside of the component
>> COMP_OUT.... at this point there are cid conflicts and responses of the
>> links (A) of the COMP_OUT are rendered in the wrong places (removing COMP_IN
>> the links work again)
>
>
> Where are the COMP_OUT links rendering? They should be replacing the entire
> contents of COMP_OUT. Are you saying instead they are only replacing the
> contents of COMP_IN, or is the content going somewhere else?
>
> Are both of the components set to ajax=True?
>
>
>>
>> Is it a A(cid=request.cid) limitation or it is a bug ?
>>
>> (actually in the code I'm using cid=request.env.http_web2py_**
>> component_elemen)
>
>
> Is this just a typo in your posting -- it should end with "element" (not
> "elemen")?
>
> Maybe try specifying specific targets for each component, and reference
> those target names in your A() links to see if that works. For example:
>
> LOAD(..., target='outer')
> A(..., cid='outer')
>
> and
>
> LOAD(..., target='inner')
> A(..., cid='inner'
>
>
> Anthony
>



-- 
Sebastian E. Ovide

Reply via email to