PLEASE IGNORE THIS PROBLEM. NOW RESOLVED.
The optionsCollection tag does work properly. I was using it properly. Just had a build issue that caused the strange behaviour. Thanks and sorry James From: "James JKE95 Kerridge" <[EMAIL PROTECTED]> on 22/09/2003 14:38 Please respond to "Struts Users Mailing List" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] cc: Subject: Problems using the optionsCollection tag All, I am having a problem using the optionsCollection tag. I get this error: javax.servlet.jsp.JspException: No getter method for property reasonsForTicketIssueOptions of bean org.apache.struts.taglib.html.BEAN at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:968) at org.apache.struts.taglib.html.OptionsCollectionTag.doStartTag(OptionsCollectionTag.java:219) at org.apache.strutsel.taglib.html.ELOptionsCollectionTag.doStartTag(ELOptionsCollectionTag.java:220) at jsp_servlet._jsp._qf._ticketissuerequest.__ticketissuerequestformstep1._jspService(__ticketissuerequestformstep1.java:1140) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2546) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2260) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120) My JSP has this in it: ... <html-el:select property="reasonsForTicketIssue" multiple="true"> <html-el:optionsCollection property="reasonsForTicketIssueOptions"/> </html-el:select> ... My form extends ValidatorForm and has these code fragments in it: ... /** * holds the multiple selections of 'reason for ticket issue' from the form. */ private String[] reasonsForTicketIssue; /** * Getter for property reasonsForTicketIssue. * @return Value of property reasonsForTicketIssue. */ public String[] getReasonsForTicketIssue() { return this.reasonsForTicketIssue; } /** Setter for property reasonsForTicketIssue. * @param reasonsForTicketIssue New value of property reasonsForTicketIssue. * */ public void setReasonsForTicketIssue(String[] reasonsForTicketIssue) { this.reasonsForTicketIssue = reasonsForTicketIssue; } /** * gets the collection of values to support the 'reasons for ticket issue' property. */ public List getReasonsForTicketIssueOptions() { return ReasonForTicketRequestOptionsProvider.getOptionsCollection(); } ... Having traced through the code I find that the correct bean is looked up successfully (i.e. the form bean) but that there is no property for the 'reasonsForTicketIssueOptions' property in the property descriptors that are used by PropertyUtils. Am I correctly using the optionsCollection tag? Is my 'public List getReasonsForTicketIssueOptions()' method correct? Does any one have an example of using this tag where the form bean returns the collection of LabelValueBeans? Surely what I am doing is standard hence the existence of the optionsCollection tag. Thanks for any help. James *******************Confidentiality and Privilege Notice******************* This email is intended only to be read or used by the addressee. It is confidential and may contain legally privileged information. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone, and you should destroy this message and kindly notify the sender by reply email. Confidentiality and legal privilege are not waived or lost by reason of mistaken delivery to you. Qantas Airways Limited ABN 16 009 661 901 Visit Qantas online at http://www.qantas.com.au *******************Confidentiality and Privilege Notice******************* This email is intended only to be read or used by the addressee. It is confidential and may contain legally privileged information. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone, and you should destroy this message and kindly notify the sender by reply email. Confidentiality and legal privilege are not waived or lost by reason of mistaken delivery to you. Qantas Airways Limited ABN 16 009 661 901 Visit Qantas online at http://www.qantas.com.au