struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Graham" <dgraham1...@hotmail.com>
Subject Re: about tiles context
Date Wed, 19 Feb 2003 14:48:09 GMT
I don't use TilesAction so I can't really help you there.  Why are you using 
that instead of subclassing the normal Struts Action?  Have you looked into 
using Tiles Controllers to setup data for the tile?

http://blogs.browsermedia.com/patrick/index.do?date=20030211#130200

David





>From: "Ferran Parra" <ferran_p@mubimedia.com>
>Reply-To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
>To: struts-user@jakarta.apache.org
>Subject: Re: about tiles context
>Date: Wed, 19 Feb 2003 14:44:55 +0100
>
>Hello David. You are absolutely correct, I have as the application base
>Artimus from the Struts in Action book by Ted Husted which was made with
>Struts 1.1b2. I grabbed the application struts-blank from struts 1.1b3 and
>substituted the directory WEB-INF/lib, and now it works!
>
>But I had another question -- I have an Action associated with a Tile. The
>Action executes correctly and extends the TilesAction but the parameters
>don't appear in the context of the Tile ... Any suggestions? The code for
>the execute method is as follows:
>
>   public ActionForward execute(
>   ComponentContext context,
>   ActionMapping mapping,
>   ActionForm form,
>   HttpServletRequest request,
>   HttpServletResponse response)
>   throws Exception {
>
>   DateFormat df = DateFormat.getDateInstance (DateFormat.SHORT,
>getLocale(request));
>
>   context.putAttribute("date", df.format(new Date()));
>   //request.setAttribute("date", df.format(new Date()));
>   context.putAttribute("try", "tryContext");
>   if (log.isInfoEnabled()) {
>    log.info("ferran date:" + df.format(new Date()));
>    log.info("ferran prova:" + (String)context.getAttribute("prova"));
>   }
>   return null;
>  }
>Thanks again for your help,
>Ferran
>
>"David Graham" <dgraham1980@hotmail.com> escribió en el mensaje
>news:F85jtCBNGXMwQAOFsV40001b8d6@hotmail.com...
> > What version are you using?  Tiles used to store it under "CompContext"
>but
> > now stores it under "org.apache.struts.taglib.CompContext".
> >
> > You're most likely using an earlier version and looking at the recent
> > source.
> >
> > David
> >
> >
> >
> > >From: "Ferran Parra" <ferran_p@mubimedia.com>
> > >Reply-To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
> > >To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
> > >Subject: about tiles context
> > >Date: Tue, 18 Feb 2003 18:17:00 +0100
> > >
> > >I have a question -- why is the context, which is different for every
>Tile,
> > >in the Request under the key "CompContext" instead of the key
> > >"org.apache.struts.taglib.CompContext", as it is in the source files,
> > >according to the constants file "ComponentConstants.java"?
> > >
> > >Thanks in advance for any help,
> > >Ferran Parra
> > >
> > >Departament de Noves Tecnologies
> > >MUBIMEDIA S.L.
> > >----------------------
> > >ferran_p@mubimedia.com
> > >Mallorca, 275, 1r 2a
> > >08008 BARCELONA
> > >T. (+34) 93 215 21 91
> > >F. (+34) 93 215 41 21
> > >
> >
> >
> > _________________________________________________________________
> > Add photos to your messages with MSN 8. Get 2 months FREE*.
> > http://join.msn.com/?page=features/featuredemail
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org


_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message