struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mick Knutson" <mick.knuts...@safeway.com>
Subject Re: unable to print nested values with bean:write, or c:out
Date Tue, 28 Jun 2005 19:02:51 GMT
If ConsumerValidatorForm:
   public IConsumerActivity getConsumerActivity() {
        return consumerActivity;
    }

from ConsumerActivity (not an Action Form though):
    public String getLastPinChangeDate() {
        return lastPinChangeDate;
    }

Could it be that consumer activity is just a pojo, and not an action form?



Wendy Smoak wrote:

> From: "Mick Knutson" ?mick.knutson1@safeway.com>
> >I modified what I was trying with this:
> >
> >    ?bean:define id="lastPinChangeDate" name="consumerValidatorForm"
> > property="consumerActivity.lastPinChangeDate"/>
> >
> >        [?c:out value="${lastPinChangeDate}"/>]
> >
> > And this is the error message I get:
> > 19:02:50,908 ERROR [[jsp]] Servlet.service() for servlet jsp threw
> > exception
> > javax.servlet.jsp.JspException: Invalid argument looking up property
> > consumerActivity.lastPinChangeDate of bean consumerValidatorForm
>
> And you're sure that your form has a getConsumerActivity() method, and
> whatever it returns has a getLastPinChangeDate() method?
>
> Can you try it with all JSTL instead of mixing ?bean> and ?c> tags?  It
> doesn't look like ?bean:define> is doing what you want-- it looks like it
> thinks "consumerActivity.lastPinChangeDate" is the property name.  So use
> ?c:set> for the first part.  If you need it... what does just
> ?c:out value="${consumerValidatorForm.consumerActivity.lastPinChangeDate}"/>
> print?
>
> Unless you're on a JSP 2.0 container (probably not if you're using ?c:out>
> the best combination is JSTL and Struts-EL.  Use JSTL as much as possible,
> and the Struts-EL taglib only has the things that can't be done in JSTL.
>
> --
> Wendy Smoak
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org

--

Thanks
Mick Knutson
(925) 951-4126
HP Consulting Services
Safeway (Blackhawk Fastword Project)
J2EE Architect
---



"MMS <safeway.com>" made the following annotations.
------------------------------------------------------------------------------
Warning: 
All e-mail sent to this address will be received by the Safeway corporate e-mail system, and
is subject to archival and review by someone other than the recipient.  This e-mail may contain
information proprietary to Safeway and is intended only for the use of the intended recipient(s).
 If the reader of this message is not the intended recipient(s), you are notified that you
have received this message in error and that any review, dissemination, distribution or copying
of this message is strictly prohibited.  If you have received this message in error, please
notify the sender immediately. 
  
==============================================================================


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


Mime
View raw message