Tiles Insert tag using EL expression

2003-04-04 Thread Trevor Nightingale
The jsp page listed below fails with 

[ServletException in:/tiles/common/sasWizardDataSource.jsp] Error - Tag Insert : Can't 
get definition '${map["selectedConnection"]}'. Check if this name exist in definitions 
factory.' 

The expression '${map["selectedConnection"]}' is not being resolved prior to the 
insert tag being actioned. Why is this and does anyone have any suggestions on how to 
work around it ?

Thanks is advance,
Trevor

Here is the page source.


<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>

JSTL 
JSTL 
JSTL 










-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Using a Tile Definition from within a Servlet ?

2003-04-02 Thread Trevor Nightingale
Thank you for your response.

The way I worked around the problem was to set a session attribute to the value of the 
definition within the servlet. I then forwarded to a common jsp page that obtained 
that session attribute value and uses it in a tile insert tag.

Seems to work ok.

Thanks again,
Trevor

-Original Message-
From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 02, 2003 04:04
To: Struts Users Mailing List
Subject: Re: Using a Tile Definition from within a Servlet ?



  Yes, it is possible. There is no simple API to do that, but take a 
look at the TilesRequestProcessor.processTilesDefinition(...) method to 
know how it is done by the struts servlet.
  What you should do is:

* retrieve the definition from the factory
* create the new tile context from thedefinition
* save the current tile context
* store the new tile context in the jsp context
* include the new tile
* restore the current context


   Hope this help,

  Cedric

Trevor Nightingale wrote:

>Is it possible to "forward" to a tiles definition with a servlet ?
>
>Something like
>
>   RequestDispatcher dispatcher = 
> request.getRequestDispatcher("tile.def.goes.here");
>  dispatcher.forward(request,response);
>
>
>Thank you in advance,
>Trevor
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>  
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Using a Tile Definition from within a Servlet ?

2003-03-31 Thread Trevor Nightingale
Is it possible to "forward" to a tiles definition with a servlet ?

Something like

RequestDispatcher dispatcher = 
request.getRequestDispatcher("tile.def.goes.here");
  dispatcher.forward(request,response);


Thank you in advance,
Trevor

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]