struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David G. Friedman" <hum...@ix.netcom.com>
Subject RE: Tiles scope headache assistance needed.
Date Fri, 18 Feb 2005 14:26:53 GMT
Jason,

In which scope are you saving the "quote" bean?  Is it listed in your
.table.holder definition or is it in application, request, page, tile, or
session scopes?

Regards,
David

-----Original Message-----
From: Jason Long [mailto:supernovasoftw2683@sbcglobal.net]
Sent: Friday, February 18, 2005 4:50 AM
To: 'Struts Users Mailing List'
Subject: RE: Tiles scope headache assistance needed.


I have tried just about everything and I wonder why this is so difficult.  I
must be missing something.  I tried putting in <tiles:importAttribute
name="quote"/> or <tiles:importAttribute/> in various combinations in all of
my files and even tried adding quote as a property in my tiles xml
definitions.  If is specify quote I get "Error - tag importAttribute :
property 'quote' not found in context. Check tag syntax".  Where should I
place <tiles:importAttribute name="quote"/> and is this all that is
required.  I just want to be able to make beans in my loop available to the
tiles I am calling inside the loop.  I am really starting to like tiles, but
I cannot seem to get over this problem.

<c:forEach var="quote" items="${quoteForm.quoteValues}">
   <!-- no tile used -->
   <table>
      <tr>
        <td>${quote.offerPriceLightValue.sizeValue.size}</td>
      </tr>
    </table>
    <!-- tile attempt to wrap with holder for delineation -->
    <tiles:insert definition=".quote.list.item" flush="false">
      <tiles:put name="quote" beanName="quote"/>
    </tiles:insert>
  </c:forEach>

I would like to define the following tile definition:

<definition extends=".table.holder" name=".quote">
  <put name="content" value="/quote.jsp"/>
 </definition>

And have quote.jsp as follows:

<table>
  <tr>
    <td>${quote.offerPriceLightValue.sizeValue.size}</td>
  </tr>
</table>


Thank you for your time,

Jason Long
CEO and Chief Software Engineer
BS Physics, MS Chemical Engineering
http://www.supernovasoftware.com

-----Original Message-----
From: Brian Moseley [mailto:bcm@maz.org]
Sent: Thursday, February 17, 2005 7:07 PM
To: Struts Users Mailing List
Subject: Re: Tiles scope headache assistance needed.

Jason Long wrote:
> I switched my code to the following jstl tags as suggested.  The first
part
> works with no problem, but I get no output from the tile attempt except
for
> the layout being applied with the word "testing".  Do I need to use
> <tile:importAttribute/> or some other tag to make the quote bean
accessible
> from the tile?

yes: <tiles:importAttribute name="quote"/>

>  <c:forEach var="quote" items="${quoteForm.quoteValues}">
>    <!-- no tile used -->
>    <table>
>       <tr>
>         <td>
>           <c:out value="${quote.offerPriceLightValue.sizeValue.size}"/>

note that in a servlet 2.4/jsp 2.0 webapp you don't even
have to use c:out. you can just do ${quote.offer...}.

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




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


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


Mime
View raw message