Is anyone familiar with this that can help? ----- Original Message ----- From: "Chris Cranford" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Friday, June 18, 2004 3:47 PM Subject: Re: bean defines
> And it may be important that I point out if I use: > <bean:write name="<%=formBean%>" property="pageNumber"/> > > The value does get outputted. So it has to do with what Paul pointed out, > but I dont know how to solve it. > ----- Original Message ----- > From: "Chris Cranford" <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > Sent: Friday, June 18, 2004 3:45 PM > Subject: Re: bean defines > > > > It is as if the c-taglib is seeing the bean as a "string" and not as an > > ActionForm. I can write: > > <c:out value="${cfb}"/> > > > > And the output is value in formid. What I'm trying to do is create a > > reference to an ActionForm in this JSP which has it's name passed in by > this > > page's container as a tiles attribute. > > > > ----- Original Message ----- > > From: "Chris Cranford" <[EMAIL PROTECTED]> > > To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > > Sent: Friday, June 18, 2004 3:39 PM > > Subject: Re: bean defines > > > > > > > This is my class: > > > > > > public class PagedCheckboxForm extends ActionForm > > > { > > > private long pageNumber; > > > public long getPageNumber() { return this.pageNumber; } > > > public void setPageNumber(long value) { this.pageNumber = value; } > > > } > > > > > > In the JSP > > > <bean:define id="formBean"><tiles:getAsString > > name="formid"/></bean:define> > > > <set var="cfb" scope="page"><%=formBean%></c:set> > > > The Page Number: <c:out value="${cfb.pageNumber}" /> > > > > > > [ServletException in: /pages/cctest-body.jsp] > > > An error occured while evaluating custom action attribute "value" with > > value > > > "${cfb.pageNumber}": > > > Unable to find a value for "pageNumber" in object of class > > > "java.lang.String" using operator "." (null) > > > > > > HTH > > > Chris > > > > > > ----- Original Message ----- > > > From: "Slattery, Tim - BLS" <[EMAIL PROTECTED]> > > > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> > > > Sent: Friday, June 18, 2004 3:33 PM > > > Subject: RE: bean defines > > > > > > > > > > > Ok, well if I do the following: > > > > > <c:set var="cfb" value="${formBean}"/> > > > > > <c:out value="${cfb}"/> > > > > > > > > > > The name of the form object is written out. But if I want to > > > > > access a property on my form cfb, how would I output that > > > > > value? If I write <c:out value="${cfb.pageNumber}"/>, I get > > > > > a servlet exception saying that it is unable to find > > > > > "pageNumber" in object of class "java.lang.String" > > > > > > > > Do you have a getter function for the pageNumber property? A method > > within > > > > the cfb object that looks like this: > > > > > > > > public String getPageNumber() > > > > { > > > > return <somethingor0ther>; > > > > } > > > > > > > > > > > > -- > > > > Tim Slattery > > > > [EMAIL PROTECTED] > > > > > > > > > > > > --------------------------------------------------------------------- > > > > 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] > > > > > > > > > > > > > > --------------------------------------------------------------------- > > 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] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]