Thanks Steph. I look forward to seeing it. I realized the M-to-M was not yet supported out of the box. I was just scratching my head as how to best achieve the parent/child presentation. So I settled for simple blog way of doing it.
thanks j On 9/25/06, Steph Meslin-Weber <[EMAIL PROTECTED]> wrote:
Hi John, Just a quick heads up, I've recently implemented a survey site which at a glance looks like what you want to achieve. I'm currently cleaning up the code and should put it up on the web sometime this week. Some limitations are that M:N relationships between questions/answers are manual - as Geert has mentioned in another thread, RIFE doesn't cater to these automatically at the moment. Cheers, Steph On 25/09/06, John Lukar <[EMAIL PROTECTED]> wrote: > Hi all, > > I am having a hard time figuring out how to do the following: > > I have : > > Question { > id > text > } > > Answer { > id > questionId > text > } > > A question can have multiple answers. > > When editing a question, I'd like to show the list of possible answers > that has been added to the Question and allow the user to add more > answers on that same page. > > > I have been able to create a ViewQuestion element that shows the > question and possible answers using ContentQueryManager's for > Question and Answer and a primitive template that shows the Question > and the array of answers for it. > > I have two questions: > > 1) Is it possible to somehow "augment" the nice data form that is > generated by CRUD for the Question bean and add the Answer listing to > it ? Using CRUD, and the MetaData for Question generates a nice > data entry form for question. Looking at CustomMenu code of one of > the examples I see that one can get a handle to one of the CRUD > generated forms using something like: > mElement.getSite().resolveId(".Admin.question.EDIT") > > > If answer is no to above and I have to role my own data entry form for > Question+Answers then : > > When I use: > template.setBean(question); > template.appendBlock("thequestion","question"); > > I have to add individual FORM:INPUT fields for the Question bean to my > template. Is there a way to auto-generate a FORM for all the fields > in the Question bean ? > > also appreciate suggestions on how to create this sort of Parent/Child > relationship. So far I have been able to limp along by looking at the > simple-blog code on newsItem and newsComments that have sort of same > relationship. > > J. > _______________________________________________ > Rife-users mailing list > Rife-users@uwyn.com > http://lists.uwyn.com/mailman/listinfo/rife-users > -- ================================================================ Steph Meslin-Weber, [EMAIL PROTECTED] ================================================================ _______________________________________________ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users
_______________________________________________ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users