On Tue, Sep 8, 2009 at 11:10 AM, Carlos Aboim <abo...@gmail.com> wrote:

>
> Hi everyone,
> Hoping everything all wright with you all.
>
> How do I call a controller function from one link in another
> controller.
>
> I have 2 controllers: obras and clientes.
>
> I need call a function of clientes, from a link in obras controller.
>
> {{=A('Arquivar cliente', _href=URL(r=request, f='clientes/insert'))}}
> #link from where I want call the onther controller function. When I
> 'click it' returns me a invalid function error.
>

   Right - this would try to call the function   "clientes/insert()"   which
probably is not a valid function...

   You probably want an argument "insert", in which case you want something
like:

{{=A('Arquivar cliente', _href=URL(r=request, f='clientes',
args='insert'))}}

Take a look at section 4.10 (p.113) in the manual.


> Made sense?! If any trouble to understand I'll try explain other way!!
>
>
> thank you
> Carlos Aboim
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to