Hi Thiago,

Thanks for reviewing my long post and responding. I understand your concerns
about the database schema not being ideal, but creating separate Java
classes for each one of the "itemtypes" is not acceptable as we are planning
to create a site where end-users can define their own categories and
attributes and the associated UI controls. There could be hundreds of
thousands of these categories and millions of attributes.

Based on your post, I am thinking that this type of behavior is not
supported by T5. I am wondering whether the "if" component, and the
"AjaxFormLoop" could combine to simulate this same functionality. For the
Grids though, I am not sure whether I can achieve this result without
predefined classes.

This has to be a common requirement for many sites. I know some of the
largest sites on the Internet use this type of a system. I would appreciate
if you can point me to any other alternatives without "predefined" classes
for "Book", "DVD" etc in T5.



Thiago H. de Paula Figueiredo wrote:
> 
> Em Wed, 26 Aug 2009 21:14:01 -0300, sparqle <dsrika...@gmail.com>
> escreveu:
> 
>> Hi,
> 
> Hi!
> 
>> I would like to understand how to create dynamic forms and grids in T5.
> 
> T5 is all about static structure, dynamic behaviour.
> 
>> Now I would like to store all of item types (book, car, tv etc.) in 1  
>> database
>> table called "itemtypes", and all the attributes in one database table
>> called "attributes". Both these tables are linked by a many-to-many
>> relationship. I will create another table called "items", where the
>> individual items are stored ("Gone with the wind", "Lord of the Rings"
>> etc.). I will create another table called "itemAttributeValues" where the
>> values for the attributes for each item will be stored ("Gone with the  
>> wind" - 900 pages, "Margaret Mitchell", 1937).
> 
> I'm sorry to be so sincere, but this kind of database approach is  
> absolutely awful. Something awful enough to appear in TheDailyWTF.com (if  
> it wasn't featured there already). Tapestry 5 has BeanEditForm,  
> BeanEditor, Grid and BeanDisplay, all them time-savers when writing a form  
> or grid or object view, but they only work if you provide them  
> decently-modelled entity classes (a Book class with title and author  
> properties, a DVD class with title and director properties).
> 
>> Can anybody help me here?? I assume this must be a common requirement in
>> many systems!!
> 
> This is already implemented in Tapestry 5, as long as you have  
> decently-modelled classes.
> Take a look at the documentation of the components cited above and the  
> BeanEditor or BeanEditForm examples in  
> http://jumpstart.doublenegative.com.au:8080/jumpstart/.
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/t5-Dynamic-Forms-Grids-tp3520407p3527617.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to