Return-Path: X-Original-To: apmail-struts-user-archive@www.apache.org Delivered-To: apmail-struts-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 021F810052 for ; Thu, 2 Jan 2014 16:04:08 +0000 (UTC) Received: (qmail 33592 invoked by uid 500); 2 Jan 2014 16:03:51 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 33563 invoked by uid 500); 2 Jan 2014 16:03:48 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 33498 invoked by uid 99); 2 Jan 2014 16:03:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Jan 2014 16:03:41 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [193.159.191.10] (HELO iron2.lex-com.net) (193.159.191.10) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Jan 2014 16:03:33 +0000 X-IronPort-AV: E=Sophos;i="4.95,591,1384297200"; d="scan'208";a="16160857" Received: from unknown (HELO mucle03.lex-com.net) ([10.89.20.108]) by iron2.lex-com.net with ESMTP/TLS/RC4-MD5; 02 Jan 2014 17:05:40 +0100 To: user@struts.apache.org MIME-Version: 1.0 Subject: Tiles with Annotations X-KeepSent: D62BE9D3:AB3DFDB7-C1257C54:00537FA2; type=4; name=$KeepSent X-Mailer: Lotus Notes Release 8.5.3 September 15, 2011 Message-ID: From: Christoph Nenning Date: Thu, 2 Jan 2014 17:02:49 +0100 X-MIMETrack: Serialize by Router on MUCLE03/Lexcom_Muenchen/LEXCOM(Release 8.5.2FP2|March 22, 2011) at 02.01.2014 17:03:09, Serialize complete at 02.01.2014 17:03:09 Content-Type: multipart/alternative; boundary="=_alternative 00582D86C1257C54_=" X-Virus-Checked: Checked by ClamAV on apache.org --=_alternative 00582D86C1257C54_= Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii" Dear List, in our applications we often use the convention-plugin together with tiles-plugin (tiles 2). convention-plugin has the advantage that it is not necessary to put an entry in struts.xml for each action. So struts.xml usually is very small. But we still have tiles.xml which needs an entry for each action. In big applications that file becomes huge and hard to maintain. To fix that I created a bunch of Annotations and a struts2 result to be able to create tile defs with annotations. It would take me some time to turn that into a proper framework patch. Now my question is: Do you like that stuff? Sample application code: -------------------------------------------- tiles.xml -------------------------------------------- -------------------------------------------- SampleAction -------------------------------------------- @Result(name=SampleAction.INPUT, type="tiles-annotation") @TileDef( extend=".default-layout", attributes={ @TileAttribute(name="titleMsgKey", value="text.key.test"), @TileAttribute(name="content", value= "/WEB-INF/tiles/test/test.jsp") } ) public class SampleAction extends ActionSupport { ... } -------------------------------------------- web.xml -------------------------------------------- org.apache.struts2.tiles.StrutsTilesAnnotationsListener org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG /WEB-INF/classes/tiles.xml regards, Christoph This Email was scanned by Sophos Anti Virus --=_alternative 00582D86C1257C54_=--