Mail archive

[Acf] Calling for another model/controller

From: Mika Havela <>
Date: Wed, 5 Mar 2008 11:16:49 +0100

I'm having problems with calling another model/controller to get some
I have tried to call for hostname information, and that works just fine!

This works:
        local m, w_loaded, m_loaded = self:new("alpine-baselayout/hostname")
        local output =
        return { output=output, }
I get the hostname in return.
When doing this... it doesn't work (which it probably shouldn't):
        local m, w_loaded, m_loaded = APP:new("alpine-baselayout/hostname")

Now I would like to have a list of interfaces (provided by the
So I try to:
        local m, w_loaded, m_loaded = APP:new("alpine-baselayout/interfaces")
        local output =
        return { output=output, }

        local m, w_loaded, m_loaded = self:new("alpine-baselayout/interfaces")
        local output =
        return { output=output, }

But when I do this... my page is automatically redirected to the
'default page' for my app (in my case im redirected to 'status'-page).
So I don't get any information from the model (or maybe I do, but my
view is changed so I don't se the result).

I have tried to call the interfaces-model instead... but it acts the same way.

Any suggestions on how I can get information from the
alpine-baselayout/interfaces and use this information in another
controller (or even another model).

Received on Wed Mar 05 2008 - 11:16:49 UTC