Return-Path: X-Original-To: apmail-tiles-users-archive@minotaur.apache.org Delivered-To: apmail-tiles-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3CBF097CE for ; Sun, 8 Apr 2012 02:19:42 +0000 (UTC) Received: (qmail 87230 invoked by uid 500); 8 Apr 2012 02:19:42 -0000 Delivered-To: apmail-tiles-users-archive@tiles.apache.org Received: (qmail 87198 invoked by uid 500); 8 Apr 2012 02:19:42 -0000 Mailing-List: contact users-help@tiles.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@tiles.apache.org Delivered-To: mailing list users@tiles.apache.org Received: (qmail 87190 invoked by uid 99); 8 Apr 2012 02:19:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Apr 2012 02:19:42 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ken.mcwilliams@gmail.com designates 209.85.210.173 as permitted sender) Received: from [209.85.210.173] (HELO mail-iy0-f173.google.com) (209.85.210.173) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Apr 2012 02:19:35 +0000 Received: by iafj26 with SMTP id j26so5901726iaf.32 for ; Sat, 07 Apr 2012 19:19:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=bYCckxam5Ghb9Q2mmet52RjNdAVWt7DtNaZbkulhN8s=; b=Lu1jLUvlFbiAYsBIzhaJAMChp8dH5P33KtyIwDrYUWkh4Y9t1hqEvLi7hmwZSjcGX7 y0KdUKJpBfnX3rQ8UreKH/BYGzh1OpODDY6OLZRi4ltwIo4GtGvAeOjz8seyhIGMJFW1 kJV5DAQGBujyus2Uga17krpw/jYVlwXjpnAP8vWIiPdx2Vd5gX2X6h+aIvSRvS+WXQL/ /PfjrWZnfayE6LVOcK3sZGRCe2+8cJfMiR43CIA5FYjAlB5kuG9oejpZcdUBnLWP5j3R MJ8xEATpXSWZivXO6JmBs91pzbdpKWA+46qVjC5+xjLq6hciU7WyjYCRogySEM5s2fwV stMA== MIME-Version: 1.0 Received: by 10.50.153.163 with SMTP id vh3mr1886909igb.43.1333851553572; Sat, 07 Apr 2012 19:19:13 -0700 (PDT) Received: by 10.42.139.74 with HTTP; Sat, 7 Apr 2012 19:19:13 -0700 (PDT) In-Reply-To: <4F804EEB.4060601@nlebas.net> References: <4F804EEB.4060601@nlebas.net> Date: Sat, 7 Apr 2012 20:19:13 -0600 Message-ID: Subject: Re: Tiles decoration/run time composition/interaction between tiles From: Ken McWilliams To: users@tiles.apache.org Content-Type: multipart/alternative; boundary=e89a8f2347f508a82504bd218496 --e89a8f2347f508a82504bd218496 Content-Type: text/plain; charset=ISO-8859-1 On Sat, Apr 7, 2012 at 8:27 AM, Nicolas LE BAS wrote: > Hi! > > I don't really understand your use case. Has it something to do with > including javascript/css in the section to support your code in the > section? Can you provide an example? > That is exactly it. An example... JSP fragment follows later to show the idea, this was only typed in the message so it should be interpreted as pseudo JSP. I'm not sure what is possible in regular EL so if what I've done is not legal you should note the expression language is ONGL for which something of the sort is legal (and my expressions should be unless I made a typo). Here is my intended purpose (and I'm just doing this for fun): I'm not there yet exactly but simply I want the user to select "widgets" (in the basic case a div with a certain class or id ) then I need to include the relevant javascript/css in the head so it will do its magic. Lets say I have some entity classes (or in any case models which are java beans for which a sent to the view) and I would like the user to be able to edit the content of these models but I don't know what they will contain... I want the view to figure out how to render the model. This naturally isn't going to produce pretty forms by default (although an editor could be built do correct this after the fact). To help with this I created a tag that works with struts2 called "properties" The following tags currently push all the getters of model into a collection called "getters", all setters into "setters", and both setters and getters into "all"... this is a simplified expression, the default assumes getters for the action (only returning the getters declared in the action, need to still implement include/exclude types which can filter out methods from subclasses after a certain point and specific interfaces, or for the reverse and include them) Now using a tag that looks something like: So the definition will be made up of views (JSPs in my case), although I favouring unobtrusive JS... there is in most cases just going to need to be a single div inserted into the body and a JS source inserted in the head. I'm not sure how tiles works exactly... each jsp renders its view and then is composed into a single document? If so, is it possible to alter the template while the JSPs are rendering? That way the definitions for how a polyview would render would be defined by tiles it self. I don't think you need a mutable container for that, anyway. > That would be great. The less I need to do the better (or look into). > > But concerning the struts2 setup: as long as you don't use freemarker, I > believe you can just ignore StrutsTilesListener and use your own instead > (or one that is provided by Tiles). > > > On 12-04-06 09:40 PM, Ken McWilliams wrote: > >> I'll just explain the use case: I want to create custom tags which require >> source tags be included in the header. I would like these tags to work >> with >> tiles somehow to achieve this. My component tags will just push strings >> (paths to js files). >> >> I am using tiles 2.2.2 in my project currently. >> >> To complicate matters I am using the struts2-tiles-plugin (which sets >> things up for me and I don't know how to set tiles parameters from there). >> For instance I want to investigate using a mutable container but am >> uncertain as how to get alter the setup struts2 provides. >> >> > --e89a8f2347f508a82504bd218496--