|
View:
New views
20 Messages
—
Rating Filter:
Alert me
|
| < Prev | 1 - 2 - 3 | Next > |
|
|
ObjectTable question & AnnotationsHello everyone!
I give Trails a go and I have some questions: 1. Is it possible to mark getter Methode using Annotations in order to definde which columns should be displayed inside on an ObjectsTable or does it mean writing a ITableColumn implementation for every single entity? 2. How do you link from a row "cell" inside an ObjectsTable row to another page? 3. How do you replace a status column id with an image? Cheers! Toby --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email |
|
|
RE: ObjectTable question & Annotations
I can offer insight to #3
Support is already built into ObjectTable to display images. I am doing this now successfully. It has been air tight for some time now. But... not all the support for this KIND of rendering in the table lives in trails-core... you need to go into the examples and track down the usage of UploadableMedia.JAVA and assemble yourself how-to. Roster models everything for collections many-to-one, one-to-many and one-to-one using imagery. I tried to get this KIND of e-frastructure part of trails-core but was prevented in order to keep the framework trim. Take a look at the hibernate classic roster example. It uses Uploadablemedia as a type for POJO properties that are characterized as docs, images, clips or anything that is a BLOB. Example in ROSTER... Person.JAVA (every person has a photo) private UploadableMedia photo = new UploadableMedia(); @BlobDescriptor(renderType = RenderType.IMAGE, contentDisposition = ContentDisposition.ATTACHMENT) @PropertyDescriptor(summary = true, index = 1) @OneToOne(cascade = CascadeType.ALL) public UploadableMedia getPhoto() { return photo; } ObjectTable is already geared to detect this KIND of property in this pojo and render it on the table as-is (in the form of a clickable/downloadable image). Happy trails... Best regards Ken in nashua > Date: Thu, 11 Oct 2007 16:45:53 +0200 > From: superoverdrive@... > To: users@... > Subject: [trails-users] ObjectTable question & Annotations > > Hello everyone! > > I give Trails a go and I have some questions: > > 1. Is it possible to mark getter Methode using Annotations in order to > definde which columns should be displayed inside on an ObjectsTable or does it mean writing a ITableColumn implementation for every single entity? > > > 2. How do you link from a row "cell" inside an ObjectsTable row to another page? > > 3. How do you replace a status column id with an image? > > Cheers! > > Toby > > --------------------------------------------------------------------- > To unsubscribe from this list please visit: > > http://xircles.codehaus.org/manage_email > Peek-a-boo FREE Tricks & Treats for You! Get 'em! Best regards
Ken in nashua |
|
|
RE: ObjectTable question & Annotations
More insight to #3
ObjectTable.HTML ... <div jwcid="blobColumnValue@Block"> <!-- render if the descriptor supports and actually has a blob --> <span jwcid="@If" condition="ognl:column.propertyDescriptor.supportsExtension(@org.trails.descriptor.BlobDescriptorExtension@class)"> <span jwcid="@TrailsDownload" propertyDescriptor="ognl:column.propertyDescriptor" model="ognl:object" bytes="ognl:object[#this.column.propertyDescriptor.name]" /> </span> </div> blobColumnValue is a column override... If the column is a BLOB, reach into the database and pull out the blob (UploadableMedia) use the TrailsDownload component to render it. Done... Best regards Ken in nashua
Boo! Scare away worms, viruses and so much more! Try Windows Live OneCare! Try now! Best regards
Ken in nashua |
|
|
Re: RE: ObjectTable question & AnnotationsThanks!
I have found a solution to #1: @PropertyDescriptor(hidden=true) BUT: Imagine you re-use the objects in several contexts, i.e. you have a user, an admin and different roles and need to define the visibility as well as editability dynamically - PropertyDescriptior would not work. If I may utter a wish for the Trails Wiki or examples page, what about: - CRUD application for 3 different roles that is localized in 2 languages! - Admin: sees everything, can edit everything - User: sees everything apart from 2 or 3 columns, can edit only 1 or 2 columns - SomeOtherRole: sees all colunns but may only edit some other columns It would be cool if there was a standard way of doing that easily in Trails, without having to write lots of code or without having to use lots of conditions and different templates. -------- Original-Nachricht -------- > Datum: Thu, 11 Oct 2007 11:05:23 -0400 > Von: Ken nashua <nhhockeyplayer@...> > An: users@... > Betreff: RE: [trails-users] ObjectTable question & Annotations > > I can offer insight to #3 > > Support is already built into ObjectTable to display images. I am doing > this now successfully. It has been air tight for some time now. But... not > all the support for this KIND of rendering in the table lives in > trails-core... you need to go into the examples and track down the usage of > UploadableMedia.JAVA and assemble yourself how-to. Roster models everything for > collections many-to-one, one-to-many and one-to-one using imagery. > > I tried to get this KIND of e-frastructure part of trails-core but was > prevented in order to keep the framework trim. > > Take a look at the hibernate classic roster example. It uses > Uploadablemedia as a type for POJO properties that are characterized as docs, images, > clips or anything that is a BLOB. > > Example in ROSTER... > > Person.JAVA (every person has a photo) > private UploadableMedia photo = new UploadableMedia(); > > @BlobDescriptor(renderType = RenderType.IMAGE, contentDisposition = > ContentDisposition.ATTACHMENT) > @PropertyDescriptor(summary = true, index = 1) > @OneToOne(cascade = CascadeType.ALL) > public UploadableMedia getPhoto() > { > return photo; > } > > ObjectTable is already geared to detect this KIND of property in this pojo > and render it on the table as-is (in the form of a clickable/downloadable > image). > > Happy trails... > Best regards > Ken in nashua > > > Date: Thu, 11 Oct 2007 16:45:53 +0200 > > From: superoverdrive@... > > To: users@... > > Subject: [trails-users] ObjectTable question & Annotations > > > > Hello everyone! > > > > I give Trails a go and I have some questions: > > > > 1. Is it possible to mark getter Methode using Annotations in order to > > definde which columns should be displayed inside on an ObjectsTable or > does it mean writing a ITableColumn implementation for every single entity? > > > > > > 2. How do you link from a row "cell" inside an ObjectsTable row to > another page? > > > > 3. How do you replace a status column id with an image? > > > > Cheers! > > > > Toby > > > > --------------------------------------------------------------------- > > To unsubscribe from this list please visit: > > > > http://xircles.codehaus.org/manage_email > > > > _________________________________________________________________ > Peek-a-boo FREE Tricks & Treats for You! > http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: RE: ObjectTable question & AnnotationsRegarding #1:
What about overriding the object in order to have different Annotations for the visibility? e.g. MyAdminObject extends MyObject @PropertyDescriptor(hidden=false) public String emailAddress() { return this.emailAddress; } MyUserObject extends MyObject @PropertyDescriptor(hidden=true) public String emailAddress() { return this.emailAddress; } But how do you make sure, that Trails does not create Tables for MyAdminObject and MyUserObject ? Tobias -------- Original-Nachricht -------- > Datum: Thu, 11 Oct 2007 17:16:02 +0200 > Von: "Tobias Marx" <superoverdrive@...> > An: users@... > Betreff: Re: RE: [trails-users] ObjectTable question & Annotations > Thanks! > > I have found a solution to #1: > > @PropertyDescriptor(hidden=true) > > BUT: Imagine you re-use the objects in several contexts, i.e. > you have a user, an admin and different roles and need to define the > visibility as well as editability dynamically - PropertyDescriptior would > not work. > > If I may utter a wish for the Trails Wiki or examples page, what about: > > - CRUD application for 3 different roles that is localized in 2 languages! > > - Admin: sees everything, can edit everything > - User: sees everything apart from 2 or 3 columns, > can edit only 1 or 2 columns > - SomeOtherRole: sees all colunns but may only edit some other columns > > It would be cool if there was a standard way of doing that easily in > Trails, without having to write lots of code or without having to use lots of > conditions and different templates. > > > > -------- Original-Nachricht -------- > > Datum: Thu, 11 Oct 2007 11:05:23 -0400 > > Von: Ken nashua <nhhockeyplayer@...> > > An: users@... > > Betreff: RE: [trails-users] ObjectTable question & Annotations > > > > > I can offer insight to #3 > > > > Support is already built into ObjectTable to display images. I am doing > > this now successfully. It has been air tight for some time now. But... > not > > all the support for this KIND of rendering in the table lives in > > trails-core... you need to go into the examples and track down the usage > of > > UploadableMedia.JAVA and assemble yourself how-to. Roster models > everything for > > collections many-to-one, one-to-many and one-to-one using imagery. > > > > I tried to get this KIND of e-frastructure part of trails-core but was > > prevented in order to keep the framework trim. > > > > Take a look at the hibernate classic roster example. It uses > > Uploadablemedia as a type for POJO properties that are characterized as > docs, images, > > clips or anything that is a BLOB. > > > > Example in ROSTER... > > > > Person.JAVA (every person has a photo) > > private UploadableMedia photo = new UploadableMedia(); > > > > @BlobDescriptor(renderType = RenderType.IMAGE, contentDisposition = > > ContentDisposition.ATTACHMENT) > > @PropertyDescriptor(summary = true, index = 1) > > @OneToOne(cascade = CascadeType.ALL) > > public UploadableMedia getPhoto() > > { > > return photo; > > } > > > > ObjectTable is already geared to detect this KIND of property in this > pojo > > and render it on the table as-is (in the form of a > clickable/downloadable > > image). > > > > Happy trails... > > Best regards > > Ken in nashua > > > > > Date: Thu, 11 Oct 2007 16:45:53 +0200 > > > From: superoverdrive@... > > > To: users@... > > > Subject: [trails-users] ObjectTable question & Annotations > > > > > > Hello everyone! > > > > > > I give Trails a go and I have some questions: > > > > > > 1. Is it possible to mark getter Methode using Annotations in order to > > > definde which columns should be displayed inside on an ObjectsTable or > > does it mean writing a ITableColumn implementation for every single > entity? > > > > > > > > > 2. How do you link from a row "cell" inside an ObjectsTable row to > > another page? > > > > > > 3. How do you replace a status column id with an image? > > > > > > Cheers! > > > > > > Toby > > > > > > --------------------------------------------------------------------- > > > To unsubscribe from this list please visit: > > > > > > http://xircles.codehaus.org/manage_email > > > > > > > _________________________________________________________________ > > Peek-a-boo FREE Tricks & Treats for You! > > http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us > > --------------------------------------------------------------------- > To unsubscribe from this list please visit: > > http://xircles.codehaus.org/manage_email --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: RE: ObjectTable question & AnnotationsHi, I think that this is not a good OO Approach, just because we are changing out model because a presentation issue. I think that the Object it´s the same and the Role or permission to edit it must be handled in another place or tier.
It's just my opinion, I just start trying Trails and I haven't a lot of knowledge of them. On 10/11/07, superoverdrive@... <superoverdrive@...> wrote: Regarding #1: |
|
|
Re: RE: ObjectTable question & AnnotationsIt would not be "real" objects, just pseudo-objects similiar to database views that are not real tables.
-------- Original-Nachricht -------- > Datum: Thu, 11 Oct 2007 12:58:00 -0300 > Von: "Pablo Francavilla" <pfrancav@...> > An: users@... > Betreff: Re: RE: [trails-users] ObjectTable question & Annotations > Hi, I think that this is not a good OO Approach, just because we are > changing out model because a presentation issue. I think that the Object > it´s the same and the Role or permission to edit it must be handled in > another place or tier. > > It's just my opinion, I just start trying Trails and I haven't a lot of > knowledge of them. > > On 10/11/07, superoverdrive@... <superoverdrive@...> wrote: > > > > Regarding #1: > > > > What about overriding the object in order to have different Annotations > > for > > the visibility? > > > > e.g. > > > > MyAdminObject extends MyObject > > > > @PropertyDescriptor(hidden=false) > > > > public String emailAddress() { > > return this.emailAddress; > > } > > > > > > MyUserObject extends MyObject > > > > @PropertyDescriptor(hidden=true) > > > > public String emailAddress() { > > return this.emailAddress; > > } > > > > > > But how do you make sure, that Trails does not create Tables for > > MyAdminObject and MyUserObject ? > > > > Tobias > > > > -------- Original-Nachricht -------- > > > Datum: Thu, 11 Oct 2007 17:16:02 +0200 > > > Von: "Tobias Marx" <superoverdrive@...> > > > An: users@... > > > Betreff: Re: RE: [trails-users] ObjectTable question & Annotations > > > > > Thanks! > > > > > > I have found a solution to #1: > > > > > > @PropertyDescriptor(hidden=true) > > > > > > BUT: Imagine you re-use the objects in several contexts, i.e. > > > you have a user, an admin and different roles and need to define the > > > visibility as well as editability dynamically - PropertyDescriptior > > would > > > not work. > > > > > > If I may utter a wish for the Trails Wiki or examples page, what > about: > > > > > > - CRUD application for 3 different roles that is localized in 2 > > languages! > > > > > > - Admin: sees everything, can edit everything > > > - User: sees everything apart from 2 or 3 columns, > > > can edit only 1 or 2 columns > > > - SomeOtherRole: sees all colunns but may only edit some other columns > > > > > > It would be cool if there was a standard way of doing that easily in > > > Trails, without having to write lots of code or without having to use > > lots of > > > conditions and different templates. > > > > > > > > > > > > -------- Original-Nachricht -------- > > > > Datum: Thu, 11 Oct 2007 11:05:23 -0400 > > > > Von: Ken nashua <nhhockeyplayer@...> > > > > An: users@... > > > > Betreff: RE: [trails-users] ObjectTable question & Annotations > > > > > > > > > > > I can offer insight to #3 > > > > > > > > Support is already built into ObjectTable to display images. I am > > doing > > > > this now successfully. It has been air tight for some time now. > But... > > > not > > > > all the support for this KIND of rendering in the table lives in > > > > trails-core... you need to go into the examples and track down the > > usage > > > of > > > > UploadableMedia.JAVA and assemble yourself how-to. Roster models > > > everything for > > > > collections many-to-one, one-to-many and one-to-one using imagery. > > > > > > > > I tried to get this KIND of e-frastructure part of trails-core but > was > > > > prevented in order to keep the framework trim. > > > > > > > > Take a look at the hibernate classic roster example. It uses > > > > Uploadablemedia as a type for POJO properties that are characterized > > as > > > docs, images, > > > > clips or anything that is a BLOB. > > > > > > > > Example in ROSTER... > > > > > > > > Person.JAVA (every person has a photo) > > > > private UploadableMedia photo = new UploadableMedia(); > > > > > > > > @BlobDescriptor(renderType = RenderType.IMAGE, > contentDisposition > > = > > > > ContentDisposition.ATTACHMENT) > > > > @PropertyDescriptor(summary = true, index = 1) > > > > @OneToOne(cascade = CascadeType.ALL) > > > > public UploadableMedia getPhoto() > > > > { > > > > return photo; > > > > } > > > > > > > > ObjectTable is already geared to detect this KIND of property in > this > > > pojo > > > > and render it on the table as-is (in the form of a > > > clickable/downloadable > > > > image). > > > > > > > > Happy trails... > > > > Best regards > > > > Ken in nashua > > > > > > > > > Date: Thu, 11 Oct 2007 16:45:53 +0200 > > > > > From: superoverdrive@... > > > > > To: users@... > > > > > Subject: [trails-users] ObjectTable question & Annotations > > > > > > > > > > Hello everyone! > > > > > > > > > > I give Trails a go and I have some questions: > > > > > > > > > > 1. Is it possible to mark getter Methode using Annotations in > order > > to > > > > > definde which columns should be displayed inside on an > ObjectsTable > > or > > > > does it mean writing a ITableColumn implementation for every single > > > entity? > > > > > > > > > > > > > > > 2. How do you link from a row "cell" inside an ObjectsTable row to > > > > another page? > > > > > > > > > > 3. How do you replace a status column id with an image? > > > > > > > > > > Cheers! > > > > > > > > > > Toby > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > To unsubscribe from this list please visit: > > > > > > > > > > http://xircles.codehaus.org/manage_email > > > > > > > > > > > > > _________________________________________________________________ > > > > Peek-a-boo FREE Tricks & Treats for You! > > > > http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us > > > > > > --------------------------------------------------------------------- > > > To unsubscribe from this list please visit: > > > > > > http://xircles.codehaus.org/manage_email > > > > > > --------------------------------------------------------------------- > > To unsubscribe from this list please visit: > > > > http://xircles.codehaus.org/manage_email > > > > --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email |
|
|
RE: ObjectTable question & Annotations
> - Admin: sees everything, can edit everything
> - User: sees everything apart from 2 or 3 columns, > can edit only 1 or 2 columns > - SomeOtherRole: sees all colunns but may only edit some other columns I believe Kalle implemented support for all of the above. I use it and it is sweet. Read up on property based and role based security. And always, check out the classic hibernate roster example... it already does all of this using ACEGI. Best regards Ken in nashua > Date: Thu, 11 Oct 2007 17:16:02 +0200 > From: superoverdrive@... > To: users@... > Subject: Re: RE: [trails-users] ObjectTable question & Annotations > > Thanks! > > I have found a solution to #1: > > @PropertyDescriptor(hidden=true) > > BUT: Imagine you re-use the objects in several contexts, i.e. > you have a user, an admin and different roles and need to define the visibility as well as editability dynamically - PropertyDescriptior would > not work. > > If I may utter a wish for the Trails Wiki or examples page, what about: > > - CRUD application for 3 different roles that is localized in 2 languages! > > - Admin: sees everything, can edit everything > - User: sees everything apart from 2 or 3 columns, > can edit only 1 or 2 columns > - SomeOtherRole: sees all colunns but may only edit some other columns > > It would be cool if there was a standard way of doing that easily in Trails, without having to write lots of code or without having to use lots of conditions and different templates. > > > > -------- Original-Nachricht -------- > > Datum: Thu, 11 Oct 2007 11:05:23 -0400 > > Von: Ken nashua <nhhockeyplayer@...> > > An: users@... > > Betreff: RE: [trails-users] ObjectTable question & Annotations > > > > > I can offer insight to #3 > > > > Support is already built into ObjectTable to display images. I am doing > > this now successfully. It has been air tight for some time now. But... not > > all the support for this KIND of rendering in the table lives in > > trails-core... you need to go into the examples and track down the usage of > > UploadableMedia.JAVA and assemble yourself how-to. Roster models everything for > > collections many-to-one, one-to-many and one-to-one using imagery. > > > > I tried to get this KIND of e-frastructure part of trails-core but was > > prevented in order to keep the framework trim. > > > > Take a look at the hibernate classic roster example. It uses > > Uploadablemedia as a type for POJO properties that are characterized as docs, images, > > clips or anything that is a BLOB. > > > > Example in ROSTER... > > > > Person.JAVA (every person has a photo) > > private UploadableMedia photo = new UploadableMedia(); > > > > @BlobDescriptor(renderType = RenderType.IMAGE, contentDisposition = > > ContentDisposition.ATTACHMENT) > > @PropertyDescriptor(summary = true, index = 1) > > @OneToOne(cascade = CascadeType.ALL) > > public UploadableMedia getPhoto() > > { > > return photo; > > } > > > > ObjectTable is already geared to detect this KIND of property in this pojo > > and render it on the table as-is (in the form of a clickable/downloadable > > image). > > > > Happy trails... > > Best regards > > Ken in nashua > > > > > Date: Thu, 11 Oct 2007 16:45:53 +0200 > > > From: superoverdrive@... > > > To: users@... > > > Subject: [trails-users] ObjectTable question & Annotations > > > > > > Hello everyone! > > > > > > I give Trails a go and I have some questions: > > > > > > 1. Is it possible to mark getter Methode using Annotations in order to > > > definde which columns should be displayed inside on an ObjectsTable or > > does it mean writing a ITableColumn implementation for every single entity? > > > > > > > > > 2. How do you link from a row "cell" inside an ObjectsTable row to > > another page? > > > > > > 3. How do you replace a status column id with an image? > > > > > > Cheers! > > > > > > Toby > > > > > > --------------------------------------------------------------------- > > > To unsubscribe from this list please visit: > > > > > > http://xircles.codehaus.org/manage_email > > > > > > > _________________________________________________________________ > > Peek-a-boo FREE Tricks & Treats for You! > > http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us > > --------------------------------------------------------------------- > To unsubscribe from this list please visit: > > http://xircles.codehaus.org/manage_email > Climb to the top of the charts! Play Star Shuffle: the word scramble challenge with star power. Play Now! Best regards
Ken in nashua |
|
|
Re: RE: ObjectTable question & AnnotationsHi Tobias
Lets tackle these questions at a time. > 1. Is it possible to mark getter Methode using Annotations in order to > definde which columns should be displayed inside on an ObjectsTable or does it mean writing a ITableColumn implementation for every single entity? > You have many option here: Without security: @PropertyDescriptor(hidden = true), will hide the property in both the ObjectTable and the ObjectForm @PropertyDescriptor(summary = false), will hide the property in the ObjectTable but it will be available in the ObjectForm You can also specify which properties you want to use in the ObjectTable using the "propertyNames" parameter Using security @ViewRequiresRole("ROLE_MANAGER") will hide the property to users that don't have the ROLE_MANAGER role. (I think this is what you are looking for) Check Recipe.description in the "security" example. http://svn.codehaus.org/trails/trunk/trails/examples/security/src/main/java/org/trails/demo/Recipe.java > 2. How do you link from a row "cell" inside an ObjectsTable row to another page? It depends. what do you want to do? to which page do you want to go? If you just want to override the way Trails handles links by default you have to provide "linkColumnValue" Block inside the ObjectTable. We discussed this in this thread: http://archive.trails.codehaus.org/users/e1cf626e0709040402t32e448bfx918f651e65471055@... If you want to provide a new link in adition the one in the "id", provide a Block for a given property and create the link in it. <div jwcid="youPropertyColumnValue@Block"> <a href="http://www.trailsframework.org/">Trails</a> </div> > 3. How do you replace a status column id with an image? Use a Block for the "status" property. Then you have many options. Ken has proposed one using BLOBs. Here you have another option using URLs for the images: http://www.trailsframework.org/Customizing+pages#Customizingpages-CustomizingObjectTablecomponent. Another option using assets: <div jwcid="statusColumnValue@Block"> <span jwcid="@If" condition="ognl:model.status == 'UP'"> <img jwcid="@Image" image="asset:imageUP"/> </span> <span jwcid="@If" condition="ognl:model.status == 'DOWN'"> <img jwcid="@Image" image="asset:imageDOWN"/> </span> </div> Check Tapestry's documentation for more info about the Image component. > It would be cool if there was a standard way of doing that easily in Trails, without >having to write lots of code or without having to use lots of conditions and different templates. Trails will do that for you, for sure. ;-) Welcome to Trails. Saludos. Alejandro. On 10/11/07, superoverdrive@... <superoverdrive@...> wrote: > It would not be "real" objects, just pseudo-objects similiar to database views that are not real tables. > > -------- Original-Nachricht -------- > > Datum: Thu, 11 Oct 2007 12:58:00 -0300 > > Von: "Pablo Francavilla" <pfrancav@...> > > An: users@... > > Betreff: Re: RE: [trails-users] ObjectTable question & Annotations > > > Hi, I think that this is not a good OO Approach, just because we are > > changing out model because a presentation issue. I think that the Object > > it´s the same and the Role or permission to edit it must be handled in > > another place or tier. > > > > It's just my opinion, I just start trying Trails and I haven't a lot of > > knowledge of them. > > > > On 10/11/07, superoverdrive@... <superoverdrive@...> wrote: > > > > > > Regarding #1: > > > > > > What about overriding the object in order to have different Annotations > > > for > > > the visibility? > > > > > > e.g. > > > > > > MyAdminObject extends MyObject > > > > > > @PropertyDescriptor(hidden=false) > > > > > > public String emailAddress() { > > > return this.emailAddress; > > > } > > > > > > > > > MyUserObject extends MyObject > > > > > > @PropertyDescriptor(hidden=true) > > > > > > public String emailAddress() { > > > return this.emailAddress; > > > } > > > > > > > > > But how do you make sure, that Trails does not create Tables for > > > MyAdminObject and MyUserObject ? > > > > > > Tobias > > > > > > -------- Original-Nachricht -------- > > > > Datum: Thu, 11 Oct 2007 17:16:02 +0200 > > > > Von: "Tobias Marx" <superoverdrive@...> > > > > An: users@... > > > > Betreff: Re: RE: [trails-users] ObjectTable question & Annotations > > > > > > > Thanks! > > > > > > > > I have found a solution to #1: > > > > > > > > @PropertyDescriptor(hidden=true) > > > > > > > > BUT: Imagine you re-use the objects in several contexts, i.e. > > > > you have a user, an admin and different roles and need to define the > > > > visibility as well as editability dynamically - PropertyDescriptior > > > would > > > > not work. > > > > > > > > If I may utter a wish for the Trails Wiki or examples page, what > > about: > > > > > > > > - CRUD application for 3 different roles that is localized in 2 > > > languages! > > > > > > > > - Admin: sees everything, can edit everything > > > > - User: sees everything apart from 2 or 3 columns, > > > > can edit only 1 or 2 columns > > > > - SomeOtherRole: sees all colunns but may only edit some other columns > > > > > > > > It would be cool if there was a standard way of doing that easily in > > > > Trails, without having to write lots of code or without having to use > > > lots of > > > > conditions and different templates. > > > > > > > > > > > > > > > > -------- Original-Nachricht -------- > > > > > Datum: Thu, 11 Oct 2007 11:05:23 -0400 > > > > > Von: Ken nashua <nhhockeyplayer@...> > > > > > An: users@... > > > > > Betreff: RE: [trails-users] ObjectTable question & Annotations > > > > > > > > > > > > > > I can offer insight to #3 > > > > > > > > > > Support is already built into ObjectTable to display images. I am > > > doing > > > > > this now successfully. It has been air tight for some time now. > > But... > > > > not > > > > > all the support for this KIND of rendering in the table lives in > > > > > trails-core... you need to go into the examples and track down the > > > usage > > > > of > > > > > UploadableMedia.JAVA and assemble yourself how-to. Roster models > > > > everything for > > > > > collections many-to-one, one-to-many and one-to-one using imagery. > > > > > > > > > > I tried to get this KIND of e-frastructure part of trails-core but > > was > > > > > prevented in order to keep the framework trim. > > > > > > > > > > Take a look at the hibernate classic roster example. It uses > > > > > Uploadablemedia as a type for POJO properties that are characterized > > > as > > > > docs, images, > > > > > clips or anything that is a BLOB. > > > > > > > > > > Example in ROSTER... > > > > > > > > > > Person.JAVA (every person has a photo) > > > > > private UploadableMedia photo = new UploadableMedia(); > > > > > > > > > > @BlobDescriptor(renderType = RenderType.IMAGE, > > contentDisposition > > > = > > > > > ContentDisposition.ATTACHMENT) > > > > > @PropertyDescriptor(summary = true, index = 1) > > > > > @OneToOne(cascade = CascadeType.ALL) > > > > > public UploadableMedia getPhoto() > > > > > { > > > > > return photo; > > > > > } > > > > > > > > > > ObjectTable is already geared to detect this KIND of property in > > this > > > > pojo > > > > > and render it on the table as-is (in the form of a > > > > clickable/downloadable > > > > > image). > > > > > > > > > > Happy trails... > > > > > Best regards > > > > > Ken in nashua > > > > > > > > > > > Date: Thu, 11 Oct 2007 16:45:53 +0200 > > > > > > From: superoverdrive@... > > > > > > To: users@... > > > > > > Subject: [trails-users] ObjectTable question & Annotations > > > > > > > > > > > > Hello everyone! > > > > > > > > > > > > I give Trails a go and I have some questions: > > > > > > > > > > > > 1. Is it possible to mark getter Methode using Annotations in > > order > > > to > > > > > > definde which columns should be displayed inside on an > > ObjectsTable > > > or > > > > > does it mean writing a ITableColumn implementation for every single > > > > entity? > > > > > > > > > > > > > > > > > > 2. How do you link from a row "cell" inside an ObjectsTable row to > > > > > another page? > > > > > > > > > > > > 3. How do you replace a status column id with an image? > > > > > > > > > > > > Cheers! > > > > > > > > > > > > Toby > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > > To unsubscribe from this list please visit: > > > > > > > > > > > > http://xircles.codehaus.org/manage_email > > > > > > > > > > > > > > > > _________________________________________________________________ > > > > > Peek-a-boo FREE Tricks & Treats for You! > > > > > http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe from this list please visit: > > > > > > > > http://xircles.codehaus.org/manage_email > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe from this list please visit: > > > > > > http://xircles.codehaus.org/manage_email > > > > > > > > --------------------------------------------------------------------- > To unsubscribe from this list please visit: > > http://xircles.codehaus.org/manage_email > > --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email |
|
|
Roster example download - where ?Thanks for your help! So where can I find this Roster download example?
The download on http://www.mvnrepository.com/artifact/org.trailsframework.examples/roster does not work :-( --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email |
|
|
HibernateViewPage?Is there something like a HibernateViewPage?
There is a HibernateEditPage, HibernateSearchPage, and HibernateListPage - is there also something like a HibernateViewPage - for simply viewing an object ? --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email |
|
|
PersistenceService for custom queries ?Can you use Trails also for custom database queries or is Trails
purely for "the same kind of" CRUD applications that do not need any additional features ? One example: I want to link from a row inside an ObjectTable to a custom "ViewObjectPage" that displays all corresponding data and additional stuff (the ObjectTable only has very few columns to keep the table small). So I have started doing a: public abstract class ViewMyObjectPage extends TrailsPage implements IExternalPage, PageBeginRenderListener { } within: activateExternalPage(Object args[], IRequestCycle cycle) I want to retrieve the unique name of the object (or id) and then fetch all data from the database in order to display it. Within getPersistenceService(), however, I could not find a way to create custom Queries.... Any help is highly appreciated! Cheers! Tobias --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: HibernateViewPage?I found an answer ;-)
http://archive.trails.codehaus.org/users/e1cf626e0709040402t32e448bfx918f651e65471055@... -------- Original-Nachricht -------- > Datum: Fri, 12 Oct 2007 10:53:14 +0200 > Von: superoverdrive@... > An: users@... > Betreff: [trails-users] HibernateViewPage? > Is there something like a HibernateViewPage? > > There is a HibernateEditPage, HibernateSearchPage, and HibernateListPage - > is there also something like a HibernateViewPage - for simply viewing an > object ? > > --------------------------------------------------------------------- > To unsubscribe from this list please visit: > > http://xircles.codehaus.org/manage_email --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email |
|
|
HibernatePersistenceServiceImp |
|
|
RE: Roster example download - where ?
Hey superdriver...
I do not manage the maven packaging online. If you checkout trails source code with SVN you will see the source. It is all checked into the build tree. happy trails... Best regards Ken in nashua > Date: Fri, 12 Oct 2007 10:47:37 +0200 > From: superoverdrive@... > To: users@... > Subject: [trails-users] Roster example download - where ? > > Thanks for your help! So where can I find this Roster download example? > The download on > http://www.mvnrepository.com/artifact/org.trailsframework.examples/roster does not work :-( > > --------------------------------------------------------------------- > To unsubscribe from this list please visit: > > http://xircles.codehaus.org/manage_email > Peek-a-boo FREE Tricks & Treats for You! Get 'em! Best regards
Ken in nashua |
|
|
RE: HibernatePersistenceServiceImp |
|
|
maven-idea-plugin:maven-plugin |
|
|
|
|
|
Re: RE: maven-idea-plugin:maven-plugin |
|
|
RE: maven-idea-plugin:maven-plugin |
| < Prev | 1 - 2 - 3 | Next > |
| Free embeddable forum powered by Nabble | Forum Help |