Great stuff, thanks! That fixed my problem!

(And all I had to change was varStat to varStatus :)

/Roland

Levi Hoogenberg wrote:
> Well, that's to be expected, I guess :) Had you passed 'customer' as 
> value, it'd have worked.
> 
> In EL, bean['property'] is the same as bean.property. It won't nest 
> though - if you want to access a subproperty, you need to use 
> bean['property']['subproperty']. So you'd have to go with something like:
> 
> <c:forEach var="propertyName" items="${fn:split(value, '.')}" 
> varStat="loop">
>     <c:set var="property" value="${loop.first ? actionBean[propertyName] 
> : property[propertyName]}"/>
> </c:forEach>
> 
> <%-- here, ${property} contains your value --%>
> 
> I'm typing this off the top of my head, so it's bound to fail :)
> 
> On Sat, Jun 14, 2008 at 11:59 AM, Roland Bali 
> <[EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>> wrote:
> 
>     Thanks for your reply Levi, almost there. :)
> 
>     When using your example I get a PropertyNotFoundException:
>     'customer.description' not found on type... which is weird, if I write
>     actionBean.customer.description it works fine.
> 
>     Any clues?
> 
>     /Roland
> 
>     Levi Hoogenberg wrote:
>      > Wouldn't actionBean[value] work?
>      >
>      > On Fri, Jun 13, 2008 at 6:03 PM, Roland Bali
>      > <[EMAIL PROTECTED]
>     <mailto:[EMAIL PROTECTED]>
>      > <mailto:[EMAIL PROTECTED]
>     <mailto:[EMAIL PROTECTED]>>> wrote:
>      >
>      >     Hi Chris,
>      >
>      >     Thank for your reply, but this doesn't solve my problem. The
>     parameters
>      >     to my layout is the name of the field like,
>     <stripes:layout-render
>      >     name="mylayout.jsp" value="customer.description"
>     readonly="true" />
>      >
>      >     The layout need to work for any text field I send as a
>     parameter, not
>      >     just customer.description. Is this possible?
>      >
>      >     /Roland
>      >
>      >     Chris Herron wrote:
>      >      > Roland,
>      >      >
>      >      > The ActionBean is available to you as a regular request
>      >     attribute. In a
>      >      > plain EL reference, you can use "actionBean" to access it:
>      >      >
>      >      > <c:when test="${readonly == true}">
>      >      > ${actionBean.customer.description}
>      >      > </c:when>
>      >      > <c:otherwise>
>      >      > <stripes:text name="${customer.description}" />
>      >      > </c:otherwise>
>      >      >
>      >      > On Jun 13, 2008, at 8:59 AM, Roland Bali wrote:
>      >      >
>      >      >> <c:when test="${readonly == true}">
>      >      >> ${value}
>      >      >> </c:when>
>      >      >> <c:otherwise>
>      >      >> <stripes:text name="${value}" />
>      >      >> </c:otherwise>
>      >      >
>      >      >
>      >      >
>      >    
>     ------------------------------------------------------------------------
>      >      >
>      >      >
>      >    
>     -------------------------------------------------------------------------
>      >      > Check out the new SourceForge.net Marketplace.
>      >      > It's the best place to buy or sell services for
>      >      > just about anything Open Source.
>      >      > http://sourceforge.net/services/buy/index.php
>      >      >
>      >      >
>      >      >
>      >    
>     ------------------------------------------------------------------------
>      >      >
>      >      > _______________________________________________
>      >      > Stripes-users mailing list
>      >      >
>     [email protected]
>     <mailto:[email protected]>
>      >    
>     <mailto:[email protected]
>     <mailto:[email protected]>>
>      >      > https://lists.sourceforge.net/lists/listinfo/stripes-users
>      >
>      >
>      >    
>     -------------------------------------------------------------------------
>      >     Check out the new SourceForge.net Marketplace.
>      >     It's the best place to buy or sell services for
>      >     just about anything Open Source.
>      >     http://sourceforge.net/services/buy/index.php
>      >     _______________________________________________
>      >     Stripes-users mailing list
>      >    
>     [email protected]
>     <mailto:[email protected]>
>      >    
>     <mailto:[email protected]
>     <mailto:[email protected]>>
>      >     https://lists.sourceforge.net/lists/listinfo/stripes-users
>      >
>      >
>      >
>      >
>     ------------------------------------------------------------------------
>      >
>      >
>     -------------------------------------------------------------------------
>      > Check out the new SourceForge.net Marketplace.
>      > It's the best place to buy or sell services for
>      > just about anything Open Source.
>      > http://sourceforge.net/services/buy/index.php
>      >
>      >
>      >
>     ------------------------------------------------------------------------
>      >
>      > _______________________________________________
>      > Stripes-users mailing list
>      > [email protected]
>     <mailto:[email protected]>
>      > https://lists.sourceforge.net/lists/listinfo/stripes-users
> 
> 
>     -------------------------------------------------------------------------
>     Check out the new SourceForge.net Marketplace.
>     It's the best place to buy or sell services for
>     just about anything Open Source.
>     http://sourceforge.net/services/buy/index.php
>     _______________________________________________
>     Stripes-users mailing list
>     [email protected]
>     <mailto:[email protected]>
>     https://lists.sourceforge.net/lists/listinfo/stripes-users
> 
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Stripes-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/stripes-users


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to