• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Displaying Data From Different Tables in .jsp

 
Robert Wiscup
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I'm having a little trouble (for some reason) understanding how to do something in my Struts 1.3 application.

Specifically, I have a .jsp that looks (in part) like below:




The action in struts-config looks like this:





The question I have is how do I display data from different classes (beans) in my drop down lists on my .jsp. My action points to a specific actionForm (in this case "ProblemForm") but I want to display data from another bean (in this case UseCases) in my drop down list on the same .jsp page. Also, I'm using hibernate 3 and there is a "many-to-many" relationship between "Problem" bean and "UseCase" bean. The relevant section of the "ProblemActionForm" is shown below as well:




I guess what I'm asking is given the above what should the code be in my .jsp to show the various "use case" values? Apparently this code above:



is incorrect.


Any help is appreciated,

Thanks,

Rob
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

 
Robert Wiscup
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi David,

Thanks for the response . . . sorry for not responding sooner . . . I've been out of the office . . .

I did exactly as you suggested and now I get the following error:

"javax.servlet.jsp.JspException: No getter method available for property useCaseId for bean under name org.apache.struts.taglib.html.BEAN"

Do you know why I'm getting this error?

Thanks,

Rob


 
Robert Wiscup
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi David,

I was able to solve this problem . . . thanks for your assistance . . .

Rob
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please follow up in case someone else encounters the same issue. Thanks! Glad you got it working.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic