Re: Losing my mind: why can't my JSP use the getter on my form bean??

2004-03-29 Thread bOOyah
bOOyah wrote:


For crying out loud.  No sooner had I clicked the 'Send' button on my 
mailer when I spotted the bug.  For those few of you still wiping the 
tears from your eyes, the 'name' attribute above should, of course, have 
been 'property'.

I've been staring at that little time sink all day.

--
Sean.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Losing my mind: why can't my JSP use the getter on my form bean??

2004-03-29 Thread bOOyah
Hi guys

I've got a simple form bean and a simpler JSP.  I can get the JSP to 
pull some values from the form bean but not others, and I cannot figure 
out why.

I want to display Select menus in a variable number of rows.  I managed 
to figure out indexed properties (at loong last) and so the 
html:select tags are working.  It's just the html:optionsCollection tag 
that I can't figure out.

Here's the Form (trimmed for brevity; the two private members are 
populated okay by other methods):
8<-
public class MyForm extends ActionForm
{
  private Integer selectedIdTvSystem[];
  private List picklistTvSystem;

  // return the user's previously selected TV system
  public Integer getSelectedIdTvSystem(int loopIndex) {
...
  }
  // set the user's newly selected TV system
  public void setSelectedIdTvSystem(int loopIndex, Integer selectedId) {
...
  }
  // get the drop-down list of TV choices for the user
  public List getPicklistTvSystem() {
return this.picklistTvSystem;
  }
  // set the list of possible TV choices for the user
  public void setPicklistTvSystem(List picklistTvSystem) {
this.picklistTvSystem = picklistTvSystem;
  }
}
8<-
Here's the JSP tester.  It's a Mickey Mouse loop to display two 
drop-down picklists.  The indexed property referenced in the 
'html:select' seems to work fine.  But the 'html:optionsCollection' tag 
isn't finding the 'picklistTvSystem' property on the form.

8<-

  
  


  

8<-
Tomcat throws this exception:
javax.servlet.jsp.JspException: Cannot find bean picklistTvSystem in
any scope
at
org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:938)
Any help will be gratefully received.
--
Sean.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]