Hi John,
what you're trying to do here currently doesn't fall within the scope
of RIFE/Crud. We did plan however to support several interface styles
with this parent-child version as one of the possibilities. This has
however not been included yet. Instead of trying to modify RIFE/Crud
to do what you describe here, I would just create a RIFE element with
this functionality and plug that in through the site structure.
Best regards,
Geert
PS.: I will be adding many-to-many support in November
On 25 Sep 2006, at 08:00, John Lukar 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
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users
--
Geert Bevin
Uwyn "Use what you need" - http://uwyn.com
RIFE Java application framework - http://rifers.org
Music and words - http://gbevin.com
_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users