Return-Path: Delivered-To: apmail-jakarta-struts-user-archive@apache.org Received: (qmail 39671 invoked from network); 3 Mar 2003 16:39:30 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 3 Mar 2003 16:39:30 -0000 Received: (qmail 11671 invoked by uid 97); 3 Mar 2003 16:41:10 -0000 Delivered-To: qmlist-jakarta-archive-struts-user@nagoya.betaversion.org Received: (qmail 11663 invoked from network); 3 Mar 2003 16:41:09 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 3 Mar 2003 16:41:09 -0000 Received: (qmail 36607 invoked by uid 500); 3 Mar 2003 16:38:49 -0000 Mailing-List: contact struts-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list struts-user@jakarta.apache.org Received: (qmail 36550 invoked from network); 3 Mar 2003 16:38:47 -0000 Received: from reserv1.univ-lille1.fr (193.49.225.15) by daedalus.apache.org with SMTP; 3 Mar 2003 16:38:47 -0000 Received: from malonne.lifl.fr (malonne.lifl.fr [134.206.10.29]) by reserv1.univ-lille1.fr (8.12.6/jtpda-5.3.1) with ESMTP id h23Gcm8X022802 for ; Mon, 3 Mar 2003 17:38:48 +0100 Received: from apache.org (grimbergen.lifl.fr [134.206.10.232]) by malonne.lifl.fr with ESMTP id h23GajO11799 for ; Mon, 3 Mar 2003 17:36:46 +0100 (MET) Message-ID: <3E63844E.10600@apache.org> Date: Mon, 03 Mar 2003 17:35:26 +0100 From: Cedric Dumoulin User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: fr,en MIME-Version: 1.0 To: Struts Users Mailing List Subject: Re: Setting tiles attributes from a bean in different scopes References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-MailScanner: Found to be clean X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi, BaTien Duong wrote: >Hello Cedric and the group: > >Issue: need to retrieve properties of *myBean* in user session scope as >values for tiles attributes in request scope. > You can't set the scope of a tiles attribute: a tiles attribute is defined with nested in an . A tile attribute is always in the tiles scope (the tiles context). However, you can import () a tile attribute in any jsp scope, or use it () as java variable. So, I don't clearly see what you are trying to do ;-). > >Solution from a scratch of my head: > > className="java.lang.String" /> > /> > > This code is not valid because the tag should be nested inside an tag. >Questions: > 1) The bean and attribute are in different scopes. Can one set tile >attributes from session scope? > You can set an attribute from a bean stored in any scope: This declare and set an attribute for the tile to be inserted. The attribute is called "myAttribute", its value is taken from the bean "myBean" which is in the "session" scope. > 2) Is there a faster way to assign an attribute at the time of >initialization in tag so we do not need and > tags? > tag is used to declare a java variable inside the jsp page. This variable is initialized from an attribute of the current tiles. This attribute has been passed to the current tiles. A side effect of this tag is to declare also a bean in one of the jsp scope. > 3) Assuming myAttribute is a nested level of myBean ( i.e. >getMyBean().getMyLevel2().getMyAttribute() ), is there an EL way similar to >JSTL? > Remind that you can use the dot separator in the bean property name: beanProperty="myLevel2.myAttribute" Cedric > >Thanks? > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org >For additional commands, e-mail: struts-user-help@jakarta.apache.org > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: struts-user-help@jakarta.apache.org