• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Question about sturs form bean

 
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic