Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 85227 invoked from network); 8 Nov 2007 17:08:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Nov 2007 17:08:47 -0000 Received: (qmail 83912 invoked by uid 500); 8 Nov 2007 17:08:33 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 83567 invoked by uid 500); 8 Nov 2007 17:08:33 -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 83556 invoked by uid 99); 8 Nov 2007 17:08:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Nov 2007 09:08:33 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [213.46.255.22] (HELO viefep24-int.chello.at) (213.46.255.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Nov 2007 17:08:35 +0000 Received: from felixknecht.ch ([217.162.149.243]) by viefep24-int.chello.at (InterMail vM.7.08.02.00 201-2186-121-20061213) with ESMTP id <20071108170813.NUUY11550.viefep24-int.chello.at@felixknecht.ch> for ; Thu, 8 Nov 2007 18:08:13 +0100 Received: (qmail 17712 invoked by uid 210); 8 Nov 2007 17:08:12 -0000 Received: from 192.168.1.97 by odin (envelope-from , uid 201) with qmail-scanner-2.01st (clamdscan: 0.91.2/4694. perlscan: 2.01st. Clear:RC:1(192.168.1.97):. Processed in 0.031225 secs); 08 Nov 2007 17:08:12 -0000 Received: from unknown (HELO ?192.168.1.97?) (192.168.1.97) by 192.168.1.11 with SMTP; 8 Nov 2007 17:08:12 -0000 Message-ID: <4733427B.7010003@apache.org> Date: Thu, 08 Nov 2007 18:08:11 +0100 From: Felix Knecht Organization: apache.org User-Agent: Thunderbird 2.0.0.6 (X11/20070802) MIME-Version: 1.0 To: users@cocoon.apache.org Subject: Re: AW: own widget References: <4730131E.6080507@uib.es> <4732E065.9090104@weitling.net> <001601c8220d$aa472e50$306fa8c0@philosophy.pchl.co.uk> <8A9A3F0EF79C4FB2B7EF3D6460DF7908@corix.local> <9CC0ABC6641F48FABF150615D34F122D@corix.local> <4733278B.2070201@apache.org> In-Reply-To: <4733278B.2070201@apache.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org @Grzegorz I thought Giacomo migrated the forms block to spring (cocoon-forms-1.1.0).Wouldn't it make more sense to use already the new forms block instead of the legacy one (probably it makes configuration also easier)? Felix > Michel Erard pisze: >> Hi Grzegorz, >> >> yes, I think for this example your right, perhabs it's enough when I add a new xslt. But when this is not enough, how I add a widget? > > Let's assume you want to create widget named MyOwnWidget, then you will need to: > 1. Implement MyOwnWidget class extending o.a.c.forms.formmodel.AbstractWidgetAbstractWidget > 2. Implement complementary classes to the first one responsible for handling definition of widget: > MyOwnWidgetDefinition (extending AbstractWidgetDefinition or similar) and > MyOwnWidgetDefinitionBuilder (extending AbstractWidgetDefinitionBuilder). > 3. Register your own widget (see [1]). > 4. Write your own JX macros for your widget similar to standard macros (see [2]). > 5. Write your own XSLT file for styling your own widget. > 6. Integrate everything together. (consists of adding few imports so your macros and xsls are visible). > > May seem like a lot of work but in a fact most of this steps are really simple. For example, for the > most of widgets classes implementing them are really straightforward as they inherit everything from > abstract classes. > > Before you start to implement anything new I think it would be a good idea to evaluate all existing > widgets and their varations (different styling) so you are not going to waste your time if simpler > solution exists. > > I hope that helps a little. > > [1] > http://svn.apache.org/repos/asf/cocoon/branches/cocoon-forms-1.0.0/cocoon-forms-impl/src/main/resources/META-INF/cocoon/avalon/cocoon-forms.xconf > [2] > http://svn.apache.org/repos/asf/cocoon/branches/cocoon-forms-1.0.0/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/generation/jx-macros.xml > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org