Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 61508 invoked from network); 26 May 2004 19:33:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 26 May 2004 19:33:57 -0000 Received: (qmail 23119 invoked by uid 500); 26 May 2004 19:34:18 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 23020 invoked by uid 500); 26 May 2004 19:34:17 -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 22908 invoked by uid 98); 26 May 2004 19:34:16 -0000 Received: from romayev@yahoo.com by hermes.apache.org by uid 82 with qmail-scanner-1.20 (clamuko: 0.70. Clear:RC:0(66.218.94.74):. Processed in 0.102632 secs); 26 May 2004 19:34:16 -0000 X-Qmail-Scanner-Mail-From: romayev@yahoo.com via hermes.apache.org X-Qmail-Scanner: 1.20 (Clear:RC:0(66.218.94.74):. Processed in 0.102632 secs) Received: from unknown (HELO web90103.mail.scd.yahoo.com) (66.218.94.74) by hermes.apache.org with SMTP; 26 May 2004 19:34:15 -0000 Message-ID: <20040526193342.61398.qmail@web90103.mail.scd.yahoo.com> Received: from [64.242.240.2] by web90103.mail.scd.yahoo.com via HTTP; Wed, 26 May 2004 12:33:42 PDT Date: Wed, 26 May 2004 12:33:42 -0700 (PDT) From: Alex Romayev Subject: RE: [portal] Implementing Login coplet with CForms To: dev@cocoon.apache.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: hermes.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N --- Carsten Ziegeler wrote: > Alex Romayev wrote: > > > > Ok, I'm a bit confused and not sure where to > start. > > > > This is what I'm trying to achieve. I'd like to > replace > > portal login form with CForm (using actions, not > flow), to > > use its validation. So the most interesting use > case is: > > > > 1. User does not enter username/password 2. The > form is > > re-displayed with error messages 3. User enters > correct > > username/password 4. The form calls do-login url, > which then > > redirects to "portal" using authentication-fw. > > > > Questions. > > > > 1. Initially I assumed that if I just configured > the coplet > > with handleParameters = true, CForms would have > access to > > request parameters. Not true. Does this mean > that > > handleParameters only works in conjunction with > > html-event-link transformer? > > > Yes (unfortunately I think). :-( I actually find that having request parameters directly available to coplets would simplify things quite a bit in general. However, come to think of it, it probably wouldn't have helped my case, since I would still need to do the redirect to do-login inside my portlet pipeline. > > > 2. I switched to using html-even-link trasformer > > configuration. Now could get through steps 1-3. > > However, in step 4, calling do-login results in > portal being > > displayed *inside* my login coplet. I've looked > at > > HTMLEventLinkTransformer code, and it makes > external = > > true/false distinction only for links, not for > forms. At the > > same time, event if it did, I don't see how it > would work in > > my case anyway, since in step > > 2 I would need to have external=true and in step > 4, external= > > false for the same form? Am I making sense here > at all? > > > Yes, makes sense to me :) > > > Seems like I'm just missing some basic > information, but ATM > > completely lost :-) > > > Hmm, no the problem is that your call to do-login > happens inside > the coplet. So it's the content of your coplet that > you change > with the call - not the whole portal itself. > I'm not sure if this is possible at all - at least I > don't see > a solution right now (which doesn't mean that there > isn't). I've been thinking about this for a while, let me see if I can collect my thoughts and make a separate post on this topic. Thanks, -Alex > For the current login coplet in the demo portal we > used a "hack". > The form is not processed by the coplet itself but > directly in > the sitemap *before* the portal is rendered. This > allows us > to do what you need. You could do the evaluation > before the > portal is rendered and put some error messages in > the session > and retrieve it later on when your coplet is > rendered. > > HTH > Carsten >