Hi,
The scenarios you describe are definitely possible to achieve with XWiki.
The way to realize what you want is to have a several objects per item
type (and not several fields of the same object).
For example, for a shopping cart you would have for each page with a cart :
- An object of class MyApp.Cart
- N number of objects of class MyApp.CartItem
Then adding/removing items in the cart is simply a matter of
adding/removing cart item objects from the page.
And yes, users list is the right place for this kind of question. The
dev list concerns the development of the XWiki software itself.
Hope this helps,
Jerome
On 10/12/2012 10:15 PM, poppakap wrote:
This post has NOT been accepted by the mailing list
yet.
Hello all, if this has already been answered, please let me know where, I
have searched all over the place!!
I want to have a class that contains a dynamic number of multiple fields.
Think of it like say a shopping cart. You have one ShoppingCart class that
can contain x number of items. When you edit the shopping cart, you can
click add to add another item, or delete to delete an item from the list.
Or maybe another example would be a RecipeClass, in which you would add in
ingredients and stuff. So you would have a SesameChickenRecipe, and it would
contain maybe 1 chicken, 2 tablespoons of salt, 4 bat wings, and so on.
Is it possible, and if so is there any documentation you can point me to, or
a tutorial, or example??
Also, is it appropriate to post this question in the Xwiki-Users forum or
the Xwiki-Dev forum?
Thanks so much in advance!
--
View this message in context:
http://xwiki.475771.n2.nabble.com/Dynamic-number-of-fields-in-Class-tp75817…
Sent from the XWiki- Users mailing list archive at
Nabble.com.
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
--
Peace,
—Jerome