Hello, > > <jsp:setProperty name='c' property="aCode" param="a" /> > <jsp:setProperty name='c' property="bCode" param="b" /> >
try using value="a" instead of param="a". Also ensure that the beans 'a' and 'b' are still in scope on the page where you are setting the property. the default scope is page. if you are using the above setProperty on another page, you may have to use scope="request" or better still scope ="session" in the definition of the beans. Regards, Najeem Lawal Borislav Iordanov <borislav@KOBRIX. To: [EMAIL PROTECTED] COM> cc: Sent by: A Subject: Re: Use of beans mailing list about Java Server Pages specification and reference <JSP-INTEREST@JAV A.SUN.COM> 05-02-03 11:32 PM Please respond to A mailing list about Java Server Pages specification and reference Hi, Try TICL - it lets you map any form field to any type of bean property. Whenever type mappings are not predefined, you can define your own. Visit http://www.kobrix.com Best Regards, Boris ____________________________________________ Borislav Iordanov Chief Architect TICL - a RAD toolkit for server-side Java http://www.kobrix.com > -----Original Message----- > From: A mailing list about Java Server Pages specification > and reference [mailto:[EMAIL PROTECTED]] On Behalf Of > Luis Javier Beltrán > Sent: Wednesday, February 05, 2003 5:22 PM > To: [EMAIL PROTECTED] > Subject: Use of beans > > > Hi everybody, > > I have 3 different forms that should save information in 3 > different tables in a database. For that task, I've created 3 > beans to hold the info. These beans, reflect the structure of > each table. Assuming the tables are similar to this: > > Table A Table B Table C > > a_code b_code a_code > a_name b_name b_code > c_status > > > I created a bean A and a bean B with two fields (code and > name) and the proper getter/setter methods, and I used the > <jsp:setProperty name="a" property="*"/> tag to load the > information from the forms. > > The problem was bean C. I created it with 3 fields (A a, B b, > String status) and the setA(A), setB(B), setStatus(String) > setter methods, and that doesn't work with the > <jsp:setProperty> tag, which is expecting at least > setA(String) and setB(String) methods. > Then I tried creating a setACode(String) and a > setBCode(String) methods, and renaming the form elements to > aCode and bCode, but that didn't work either... > > I also tried using: > > <jsp:setProperty name='c' property="aCode" param="a" /> > <jsp:setProperty name='c' property="bCode" param="b" /> > > and it didn't work... what else should I try??? Do you have > any suggestions or a different approach? > > Thanks a lot! > > Luis Javier > > ============================================================== > ============= > To unsubscribe: mailto [EMAIL PROTECTED] with body: > "signoff JSP-INTEREST". For digest: mailto > [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > > Some relevant archives, FAQs and Forums on JSPs can be found at: > http://java.sun.com/products/jsp http://archives.java.sun.com/jsp-interest.html http://forums.java.sun.com http://www.jspinsider.com ==========================================================================To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant archives, FAQs and Forums on JSPs can be found at: http://java.sun.com/products/jsp http://archives.java.sun.com/jsp-interest.html http://forums.java.sun.com http://www.jspinsider.com This mail is confidential and may contain legally privileged information. If you are not the intended recipient, you should not copy, distribute, disclose or use the information it contains. Please e-mail the sender immediately and delete this message from your system. E-mails are susceptible to corruption, interception and authorised amendment; we do not accept liability for any such changes or for their consequences. You should be aware that Telnet may monitor your e-mails and their content. ==========================================================================To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant archives, FAQs and Forums on JSPs can be found at: http://java.sun.com/products/jsp http://archives.java.sun.com/jsp-interest.html http://forums.java.sun.com http://www.jspinsider.com