Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 40876 invoked from network); 8 Nov 2007 15:13:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Nov 2007 15:13:52 -0000 Received: (qmail 36436 invoked by uid 500); 8 Nov 2007 15:13:37 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 36220 invoked by uid 500); 8 Nov 2007 15:13:37 -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 36209 invoked by uid 99); 8 Nov 2007 15:13:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Nov 2007 07:13:36 -0800 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=RCVD_IN_BL_SPAMCOP_NET,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [216.86.168.178] (HELO mxout-03.mxes.net) (216.86.168.178) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Nov 2007 15:14:13 +0000 Received: from [192.168.0.127] (unknown [212.76.37.214]) by smtp.mxes.net (Postfix) with ESMTP id 1115823E4B7 for ; Thu, 8 Nov 2007 10:13:16 -0500 (EST) Message-ID: <4733278B.2070201@apache.org> Date: Thu, 08 Nov 2007 16:13:15 +0100 From: Grzegorz Kossakowski User-Agent: Thunderbird 2.0.0.5 (X11/20070719) 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> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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 -- Grzegorz Kossakowski Committer and PMC Member of Apache Cocoon http://reflectingonthevicissitudes.wordpress.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org