• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Question about sturs form bean

 
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am working on sturts project. I have a question using form beans. We have POJO's and DAO's to get the data from the database.

I am using a <html:link> to navigate to the target page. This action class is executed to display the target page on which i have to display radio btns

Collection questionFlows = section.getQuestionFlows();
request.setAttribute("questionFlows", questionFlows );
return mapping.findForward("displayQuestionFlow");

section is a DAO class and section.getQuestionFlows(); returns questionFlows and fills in QuestionFlow POJO using Hibernate. so form beans dont come to picture. Do i need to set QuestionFlow POJO values to QuestionFlowFormBean class???

In JSP i have
<logic resent name="questionFlows">
<logic:iterate id="questionFlow" name="questionFlows" >
<bean:write name = "questionFlow" property = "positionNumber" />
<bean:write name = "question" property = "questionText"/>
<bean efine id="qvalues" name="question" property="questionValues"/>
.............
<logic resent name = "qvalues" >
<logic:iterate id = "qvalue" name = "qvalues" >
<html:radio property="???" value="questionValues" />
<bean:write name = "qvalue" property = "value" />
</logic:iterate>
</logic resent>

The lables for radio button come from DB and POJO's
What do i need to give for the property in <html:radio property= ?? />
Thanks,
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out the example given in this thread. Hopefully it will give you some ideas about how to handle this.
 
Danger, 10,000 volts, very electic .... tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic