|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
Working example/archetype of trails 2.0.1-SNAPSHOT (trunk)?I am currently evaluating trails. The problem is that I don't see any
working examples in the trunk. Here are the issues that I encountered: 1) examples/simple and examples/security are written for an older version of trails and don't work anymore. 2) examples/recipe has at least two issues: - Going from the category list to the category detail page fails with "Provided id of the wrong type for class org.trailsframework.examples.recipe.model.Category. Expected: class java.lang.Long, got class java.lang.String". This seems to be related to the fact that Tapestry detects the type of the "id" property as Serializable (as defined in the Identifiable interface) and doesn't convert the id from the request to the right type. - "New recipe" fails with "Unable to locate a block to edit property 'ingredients' (with data type 'editComposition') of object org.trailsframework.examples.recipe.model.Recipe@5bfd2d". 3) The application created by trails-archetype has the same issue as examples/recipe (String -> Long conversion). Is there any way to fix these issues? Regards, Andreas --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Working example/archetype of trails 2.0.1-SNAPSHOT (trunk)?Hi Andreas
The only example I expect to be working is "recipe" and I know it's not working I'm in the middle of removing Identifiable for good (http://jira.codehaus.org/browse/TRAILS-186, http://www.nabble.com/is-there-a-PropertyUtils-in-T5--to25526259.html) I hope to have it working for tomorrow. In the meantime one quick and dirty workaround is not to call "id" to the Entity's pk. For instance try this: private Long pk; @Transient public Serializable getId() { return getId(); } @Id @GeneratedValue(strategy = GenerationType.AUTO) public Long getPk() { return pk; } public void setPk(Long pk) { this.pk = pk; } If you are considering Trails2 I must warn you that the trunk is _very_ unstable. The APIs are still changing and _will_ keep changing as we figure how to best implement the remaining functionalities usaing Tapestry5. Saludos. Alejandro. On Sun, Sep 20, 2009 at 5:03 PM, Andreas Veithen <andreas.veithen@...> wrote: > I am currently evaluating trails. The problem is that I don't see any > working examples in the trunk. Here are the issues that I encountered: > > 1) examples/simple and examples/security are written for an older > version of trails and don't work anymore. > > 2) examples/recipe has at least two issues: > > - Going from the category list to the category detail page fails with > "Provided id of the wrong type for class > org.trailsframework.examples.recipe.model.Category. Expected: class > java.lang.Long, got class java.lang.String". This seems to be related > to the fact that Tapestry detects the type of the "id" property as > Serializable (as defined in the Identifiable interface) and doesn't > convert the id from the request to the right type. > - "New recipe" fails with "Unable to locate a block to edit property > 'ingredients' (with data type 'editComposition') of object > org.trailsframework.examples.recipe.model.Recipe@5bfd2d". > > 3) The application created by trails-archetype has the same issue as > examples/recipe (String -> Long conversion). > > Is there any way to fix these issues? > > Regards, > > Andreas > > --------------------------------------------------------------------- > 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: Working example/archetype of trails 2.0.1-SNAPSHOT (trunk)?On Sun, Sep 20, 2009 at 17:29, Alejandro Scandroli
<ascandroli@...> wrote: > Hi Andreas > > The only example I expect to be working is "recipe" and I know it's > not working I'm in the middle of removing Identifiable for good > (http://jira.codehaus.org/browse/TRAILS-186, > http://www.nabble.com/is-there-a-PropertyUtils-in-T5--to25526259.html) > I hope to have it working for tomorrow. Removing Identifiable is indeed a good idea. Since I was going to test Trails with an existing JPA model (and I would like to avoid adding the Identifiable interface to all entities), I will wait for completion of TRAILS-186. > In the meantime one quick and dirty workaround is not to call "id" to > the Entity's pk. > For instance try this: > > private Long pk; > > @Transient > public Serializable getId() > { > return getId(); > } > > @Id > @GeneratedValue(strategy = GenerationType.AUTO) > public Long getPk() > { > return pk; > } > > public void setPk(Long pk) > { > this.pk = pk; > } > > > If you are considering Trails2 I must warn you that the trunk is > _very_ unstable. The APIs are still changing and _will_ keep changing > as we figure how to best implement the remaining functionalities > usaing Tapestry5. I'm aware of these risks, but since Trails is metadata driven, I think the impact of these changes on my code will not be very high. Anyway it is not for a critical project, so I don't mind having to readjust my code from time to time. Andreas > Saludos. > Alejandro. > > > On Sun, Sep 20, 2009 at 5:03 PM, Andreas Veithen > <andreas.veithen@...> wrote: >> I am currently evaluating trails. The problem is that I don't see any >> working examples in the trunk. Here are the issues that I encountered: >> >> 1) examples/simple and examples/security are written for an older >> version of trails and don't work anymore. >> >> 2) examples/recipe has at least two issues: >> >> - Going from the category list to the category detail page fails with >> "Provided id of the wrong type for class >> org.trailsframework.examples.recipe.model.Category. Expected: class >> java.lang.Long, got class java.lang.String". This seems to be related >> to the fact that Tapestry detects the type of the "id" property as >> Serializable (as defined in the Identifiable interface) and doesn't >> convert the id from the request to the right type. >> - "New recipe" fails with "Unable to locate a block to edit property >> 'ingredients' (with data type 'editComposition') of object >> org.trailsframework.examples.recipe.model.Recipe@5bfd2d". >> >> 3) The application created by trails-archetype has the same issue as >> examples/recipe (String -> Long conversion). >> >> Is there any way to fix these issues? >> >> Regards, >> >> Andreas >> >> --------------------------------------------------------------------- >> 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: Working example/archetype of trails 2.0.1-SNAPSHOT (trunk)?It's done, let me know how it works for you.
I'll have the "simple" example working by the end of the week. Saludos. Alejandro. On Sun, Sep 20, 2009 at 6:02 PM, Andreas Veithen <andreas.veithen@...> wrote: > On Sun, Sep 20, 2009 at 17:29, Alejandro Scandroli > <ascandroli@...> wrote: >> Hi Andreas >> >> The only example I expect to be working is "recipe" and I know it's >> not working I'm in the middle of removing Identifiable for good >> (http://jira.codehaus.org/browse/TRAILS-186, >> http://www.nabble.com/is-there-a-PropertyUtils-in-T5--to25526259.html) >> I hope to have it working for tomorrow. > > Removing Identifiable is indeed a good idea. Since I was going to test > Trails with an existing JPA model (and I would like to avoid adding > the Identifiable interface to all entities), I will wait for > completion of TRAILS-186. > >> In the meantime one quick and dirty workaround is not to call "id" to >> the Entity's pk. >> For instance try this: >> >> private Long pk; >> >> @Transient >> public Serializable getId() >> { >> return getId(); >> } >> >> @Id >> @GeneratedValue(strategy = GenerationType.AUTO) >> public Long getPk() >> { >> return pk; >> } >> >> public void setPk(Long pk) >> { >> this.pk = pk; >> } >> >> >> If you are considering Trails2 I must warn you that the trunk is >> _very_ unstable. The APIs are still changing and _will_ keep changing >> as we figure how to best implement the remaining functionalities >> usaing Tapestry5. > > I'm aware of these risks, but since Trails is metadata driven, I think > the impact of these changes on my code will not be very high. Anyway > it is not for a critical project, so I don't mind having to readjust > my code from time to time. > > Andreas > >> Saludos. >> Alejandro. >> >> >> On Sun, Sep 20, 2009 at 5:03 PM, Andreas Veithen >> <andreas.veithen@...> wrote: >>> I am currently evaluating trails. The problem is that I don't see any >>> working examples in the trunk. Here are the issues that I encountered: >>> >>> 1) examples/simple and examples/security are written for an older >>> version of trails and don't work anymore. >>> >>> 2) examples/recipe has at least two issues: >>> >>> - Going from the category list to the category detail page fails with >>> "Provided id of the wrong type for class >>> org.trailsframework.examples.recipe.model.Category. Expected: class >>> java.lang.Long, got class java.lang.String". This seems to be related >>> to the fact that Tapestry detects the type of the "id" property as >>> Serializable (as defined in the Identifiable interface) and doesn't >>> convert the id from the request to the right type. >>> - "New recipe" fails with "Unable to locate a block to edit property >>> 'ingredients' (with data type 'editComposition') of object >>> org.trailsframework.examples.recipe.model.Recipe@5bfd2d". >>> >>> 3) The application created by trails-archetype has the same issue as >>> examples/recipe (String -> Long conversion). >>> >>> Is there any way to fix these issues? >>> >>> Regards, >>> >>> Andreas >>> >>> --------------------------------------------------------------------- >>> 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 |
|
|
Re: Working example/archetype of trails 2.0.1-SNAPSHOT (trunk)?On Mon, Sep 21, 2009 at 00:18, Alejandro Scandroli
<ascandroli@...> wrote: > It's done, let me know how it works for you. Works perfectly. Many thanks! Andreas > I'll have the "simple" example working by the end of the week. > > Saludos. > Alejandro. > > On Sun, Sep 20, 2009 at 6:02 PM, Andreas Veithen > <andreas.veithen@...> wrote: >> On Sun, Sep 20, 2009 at 17:29, Alejandro Scandroli >> <ascandroli@...> wrote: >>> Hi Andreas >>> >>> The only example I expect to be working is "recipe" and I know it's >>> not working I'm in the middle of removing Identifiable for good >>> (http://jira.codehaus.org/browse/TRAILS-186, >>> http://www.nabble.com/is-there-a-PropertyUtils-in-T5--to25526259.html) >>> I hope to have it working for tomorrow. >> >> Removing Identifiable is indeed a good idea. Since I was going to test >> Trails with an existing JPA model (and I would like to avoid adding >> the Identifiable interface to all entities), I will wait for >> completion of TRAILS-186. >> >>> In the meantime one quick and dirty workaround is not to call "id" to >>> the Entity's pk. >>> For instance try this: >>> >>> private Long pk; >>> >>> @Transient >>> public Serializable getId() >>> { >>> return getId(); >>> } >>> >>> @Id >>> @GeneratedValue(strategy = GenerationType.AUTO) >>> public Long getPk() >>> { >>> return pk; >>> } >>> >>> public void setPk(Long pk) >>> { >>> this.pk = pk; >>> } >>> >>> >>> If you are considering Trails2 I must warn you that the trunk is >>> _very_ unstable. The APIs are still changing and _will_ keep changing >>> as we figure how to best implement the remaining functionalities >>> usaing Tapestry5. >> >> I'm aware of these risks, but since Trails is metadata driven, I think >> the impact of these changes on my code will not be very high. Anyway >> it is not for a critical project, so I don't mind having to readjust >> my code from time to time. >> >> Andreas >> >>> Saludos. >>> Alejandro. >>> >>> >>> On Sun, Sep 20, 2009 at 5:03 PM, Andreas Veithen >>> <andreas.veithen@...> wrote: >>>> I am currently evaluating trails. The problem is that I don't see any >>>> working examples in the trunk. Here are the issues that I encountered: >>>> >>>> 1) examples/simple and examples/security are written for an older >>>> version of trails and don't work anymore. >>>> >>>> 2) examples/recipe has at least two issues: >>>> >>>> - Going from the category list to the category detail page fails with >>>> "Provided id of the wrong type for class >>>> org.trailsframework.examples.recipe.model.Category. Expected: class >>>> java.lang.Long, got class java.lang.String". This seems to be related >>>> to the fact that Tapestry detects the type of the "id" property as >>>> Serializable (as defined in the Identifiable interface) and doesn't >>>> convert the id from the request to the right type. >>>> - "New recipe" fails with "Unable to locate a block to edit property >>>> 'ingredients' (with data type 'editComposition') of object >>>> org.trailsframework.examples.recipe.model.Recipe@5bfd2d". >>>> >>>> 3) The application created by trails-archetype has the same issue as >>>> examples/recipe (String -> Long conversion). >>>> >>>> Is there any way to fix these issues? >>>> >>>> Regards, >>>> >>>> Andreas >>>> >>>> --------------------------------------------------------------------- >>>> 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 > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Free embeddable forum powered by Nabble | Forum Help |