Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 10672 invoked from network); 22 Jan 2005 18:22:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 22 Jan 2005 18:22:34 -0000 Received: (qmail 28663 invoked by uid 500); 22 Jan 2005 18:22:31 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 28507 invoked by uid 500); 22 Jan 2005 18:22:30 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 28255 invoked by uid 99); 22 Jan 2005 18:22:28 -0000 X-ASF-Spam-Status: No, hits=-10.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Sat, 22 Jan 2005 10:22:27 -0800 Received: (qmail 10564 invoked from network); 22 Jan 2005 18:22:25 -0000 Received: from unknown (HELO ?127.0.0.1?) (127.0.0.1) by 127.0.0.1 with SMTP; 22 Jan 2005 18:22:25 -0000 Message-ID: <41F29958.9010805@apache.org> Date: Sat, 22 Jan 2005 19:20:08 +0100 From: Carsten Ziegeler User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: WishFull thinking JX and SessionContext Authentication References: <41F14560.9080100@apache.org> <41F17A62.4060600@mobilebox.pl> <41F237E3.9050708@apache.org> <41F2428C.9090804@mobilebox.pl> In-Reply-To: <41F2428C.9090804@mobilebox.pl> X-Enigmail-Version: 0.89.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: 127.0.0.1 1.6.2 0/1000/N X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Leszek Gawron wrote: > don't we have a pluggable object model ? :)) > > function doIt() { > var objectModel = {}; > > objectModel.pluggedIn1 = entityFromDatabase(); > objectModel.pluggedIn2 = request.getParameter( "skin" ); > > cocoon.sendPage( "view/myview.jx", objectModel ); > } > > Other data that is not directly available from flow (like authentication > context can be accessed with input modules that are already available). > And this is exactly my problem :) With this approach you have to get all the data for each cocoon.sendPage() and store it somewhere. If you use a lot of flow this creates a maintenance nightmare. Of course you could provide your own sendPage() function that does all the work, but it's not a nice way of doing it. So why not defining plugins for the object model somewhere and as soon as you use them in your template they are queried to provide information. Carsten