Yes... I'm using a tiles-defs.xml. Let me rephrase the question...
Here's my tiles-defs.xml:
<definition name=".site.mainLayout" path="/jsp/tiles/layout.jsp">
<put name="body" value="" type="string" />
</definition>
My action uses a DynaActionForm and one of the form properties will
return a string like "<center><h1>This is a test</h1></center>". This
string needs to be inserted into the "body" attribute of the tile and
rendered as html code.
I was thinking that using the following in my JSP would take care of
this, but it doesn't. Here's the JSP line:
<tiles:insert attribute="body" beanName="showForm"
beanProperty="target" flush="true" />
Any clues what I'm doing wrong?
Thanks, ajTreece
On Apr 17, 2006, at 4:50 AM, Adam Hardy wrote:
Alan Treece on 17/04/06 07:11, wrote:
I'm working on the layout with Tiles and having a difficult time
getting past this one issue. The Perl code has various header and
footer pieces of code based on whether a use id logged on or not
and whether the user is accessing what is termed an external or
internal facing web site. The Perl code determines which header
and footer to use and then reads in the data from various
fragmented files... massages it a little then writes it out to the
display.
I'm thinking I could to the same thing initially with an action
for the header and footer that will make the determination, read
in the data, massage it as required and then pass it back out as a
bean property. I can't seem to find the correct syntax and Tiles
tag to insert/put the bean property into a Tiles definition. I've
tired <tiles:insert ... /> and <tiles:put ... /> with no success.
Hi Alan,
one of the best ways of getting tiles to work is literally just to
copy from the example application that you should be able to find
on the struts website.
however it seems you've got quite far already, but the technique
you're using isn't quite crystal clear to me - if you are putting
data into an attribute on the request in your action and you want
to read it in your tile JSP, you don't need any tiles tag for that,
you just pull it out of the request.attributes collection.
Perhaps we're talking at cross-purposes though - are you using a
tiles-defs.xml to define your tiles?
Adam
---------------------------------------------------------------------
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]