Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 64561 invoked from network); 2 Jul 2007 11:47:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Jul 2007 11:47:07 -0000 Received: (qmail 58408 invoked by uid 500); 2 Jul 2007 11:47:06 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 58367 invoked by uid 500); 2 Jul 2007 11:47:06 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: users@cocoon.apache.org List-Id: Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 58355 invoked by uid 99); 2 Jul 2007 11:47:06 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jul 2007 04:47:06 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [158.38.62.9] (HELO tyholt.uninett.no) (158.38.62.9) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jul 2007 04:47:02 -0700 Received: from localhost (localhost.localdomain [127.0.0.1]) by tyholt.uninett.no (Postfix) with ESMTP id C931DB5B0E for ; Mon, 2 Jul 2007 13:46:39 +0200 (CEST) Received: from tyholt.uninett.no ([127.0.0.1]) by localhost (tyholt.uninett.no [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 18378-01-5 for ; Mon, 2 Jul 2007 13:46:39 +0200 (CEST) Received: from [158.38.60.33] (tehran.uninett.no [158.38.60.33]) by tyholt.uninett.no (Postfix) with ESMTP id 97956B5A7A for ; Mon, 2 Jul 2007 13:46:39 +0200 (CEST) Message-ID: <4688E59F.20809@uninett.no> Date: Mon, 02 Jul 2007 13:46:39 +0200 From: Armaz Mellati User-Agent: Thunderbird 2.0.0.4 (Windows/20070604) MIME-Version: 1.0 To: users@cocoon.apache.org Subject: Re: How to get objectModel from Flow ? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at uninett.no X-Virus-Checked: Checked by ClamAV on apache.org Thanks Ard. I am pretty amazed that no body else has come with any simpler way to do it. The javadoc for ApplicationUtil states actually this : Utility class that can be used from flow to access the different application functions of Cocoon Authentication. But at least now I have away of doing it. Thanks again. Regards, Armaz Ard Schrijvers wrote: > Hello, > > var objectModel = org.apache.cocoon.components.ContextHelper.getObjectModel(avalonContext) > > should do the trick. Now, all you need it to know how to get the avalonContext :-) > > A probably incredible dirty way is something like > > cocoon.getComponent(Packages.org.apache.cocoon.forms.FormManager.ROLE).getAvalonContext() > > but hopefully somebody knows a more solid solution, > > Regards Ard > > >> Hi >> >> How do I get the objectModel when in flow ? >> I need it to do something like this, as I can in an action : >> org.apache.cocoon.auth.ApplicationUtil.getUser(objectModel); >> >> Regards, >> Armaz Mellati >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org >> For additional commands, e-mail: users-help@cocoon.apache.org >> >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org > For additional commands, e-mail: users-help@cocoon.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org