Return-Path: Delivered-To: apmail-tiles-users-archive@locus.apache.org Received: (qmail 68932 invoked from network); 28 Feb 2008 14:42:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Feb 2008 14:42:50 -0000 Received: (qmail 17881 invoked by uid 500); 28 Feb 2008 14:42:45 -0000 Delivered-To: apmail-tiles-users-archive@tiles.apache.org Received: (qmail 17861 invoked by uid 500); 28 Feb 2008 14:42:45 -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 17852 invoked by uid 99); 28 Feb 2008 14:42:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Feb 2008 06:42:45 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of savolainen.pauli@gmail.com designates 64.233.166.176 as permitted sender) Received: from [64.233.166.176] (HELO py-out-1112.google.com) (64.233.166.176) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Feb 2008 14:42:11 +0000 Received: by py-out-1112.google.com with SMTP id a25so4308271pyi.11 for ; Thu, 28 Feb 2008 06:42:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=Gpmf0FAH1aFsaC8FJOU+y0tZ0IpjUokMoSTrhizl4Wk=; b=hi51odSivEEW8Nt3M78eQ57ygAMssEQyT8ENSudh9JJu8oOeMrbwbaBhUsXjL5NLWQGUbDVeWwGNfye0suSLt22/c4c5cfbP/Y3qK896xRJ7E+fsQt8jGYpO8qd9Be50yu25EwXHEicN3YXWm7zJzAW0dfTMeZNvGKwZy2hh/p0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=G7LrBEl4ZTU2godV1Zg6Ad7cDNllIqwZAzyewsbDrvYjuPKdFYjY8oL4NtQnQlVUsG2EQWxTgPIpqVWb4JRbDnRxRywiPbiWNp4FhDP2LDuaLUX1YHrq7Cwp4jVW7WvE8eWycqtSiKbXUqBsqkrJwncvtqyRSsAK1jOStnlaozs= Received: by 10.35.67.18 with SMTP id u18mr10127233pyk.64.1204209739446; Thu, 28 Feb 2008 06:42:19 -0800 (PST) Received: by 10.35.109.18 with HTTP; Thu, 28 Feb 2008 06:42:19 -0800 (PST) Message-ID: Date: Thu, 28 Feb 2008 15:42:19 +0100 From: "Pauli Savolainen" To: users@tiles.apache.org Subject: Struts 2 Tiles 2 Runtime composition MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Checked: Checked by ClamAV on apache.org Hi, I am attempting to change an existing tiles definition during an execution of a Struts action. Example tiles definition: In the action I want to choose a correct body value based on some application specific rules. For example if I call: /user/1, the User action's show method is executed and the body attribute's value would turn into /user/show.jsp. This would prevent me from writing definitions for each possible case. Tile tutorial says I can get my hands on an attribute context (The class TilesAttributeContext does not exist in my tiles plugin build). In the action I do: TilesAttributeContext attributeContext = container.startContext(request, response); attributeContext.setAttribute("body", "/user/show.jsp"); container.render("layout", request, response); container.endContext(request, response); I bet this is not the correct way to do it, because it seems that the tiles definition overrides the value I insert here. Even if I do this in an interceptor after the action result, the value is not changed. I suppose there is no option in tiles to define definition with wildcards. At least I did not find this option. I could point my action results dynamically to a definition with wildcards. So my question is how would I achieve what am I try to do? Am I on the right tracks and just missing something, or is this even possible? I am using 2.1.1-SNAPSHOT builds struts-core and struts tiles-plugin. Thank you Pauli