It seems you are looking for a tool like Seam but for Struts2. I don't know about any such tool but it should be possible to do the same.
Cimballi On Thu, Jun 10, 2010 at 1:47 PM, Ken <ken.mcwilli...@aerose.com> wrote: > On Thu, 2010-06-10 at 17:38 +0100, Jan T. Kim wrote: > >> Dear List, >> >> is there any technique / package / whatever to set up some basic CRUD >> functionality for a group of persistent classes? >> >> The idea I have is similar to that of a web based facility similar to >> those GUI database browsers and editors. In principle this this could >> be realised using reflection and the persistence API's annotations. >> Ideally, only one action should be needed and the system would generate >> the web view and figure out the form data to support at runtime. >> >> Any hints / thoughts? > > I think what you ask for is very hard. > > You need to understand the database structure when setting up the > system, > because you need to know what to ask for... So you're either going to > need to use SQL and manually do this or use an OR modelling tool and > formalize these relationships. > > Then there is no way to know what to present on a form, you would need > to define this. > A nice solution I have not seen (although like all good ideas may exist > some place) is a hibernate/struts2 plug-in > which works with hibernate tools to provide web based modelling of > relationships and is able to generate both > java beans which model the table (tools though the IDE already exist to > do this) but also struts2 action beans. > > It's easy to say this last part but doing it would be hard... The > application might want the result set in certain data structures. > HQL can handle this to a degree as it will convert the DB types to Java > types in much the same way as OGNL, you can > even ask for the data to be returned in a Map or List if appropriate. > Or even a composite data structure of Maps and Lists. > > To do this visually with any degree of ease I think HQL and the criteria > API will need to to have full feature parity, > as I could partially imagine an awesome visual DB query tool built on > such a criteria API. > > Okay so up to here we've needed to address DB modelling, Data > Representation in the application, and address > what exactly is going to be on the report, then there would need to be > layout of the report it self. > > If such a plug-in could access an IDE then it could use the Hibernate > tools plug-ins... then it could generate beans for tables and > compile and re-deploy. This would be a good start and provide a very > attractive model... that being web based build tools > specific to their application domain (IDE's turned inside out, being > viewed as service providers). A web based build tool entirely dedicated > to struts2 aught to provide a more intuitive experience than a mere IDE > plug-in. Further I think that having to learn the UI elements, > in a particular environment to be a big pain, where such a project would > put the UI elements in the web domain making the whole project > more assessable. So for this project to make sense we'd need the major > IDE's to follow some sort of standardization effort... > > I think we all want a simple answer to Web-CRUD. For it to be easy > there are a lot of things that need to be addressed first. > Many of them neither technologically nor socially trivial but I for one > am very happy to see any progress in any of these areas. > > -- Cimballi JAVA J2EE Freelance http://javajeeleader.elance.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org