Re: T5: Multiple onActivate?
In some ways I'd agree, in others I wouldn't. I'm finding cases where T5 really made some simple well-defined aspects from previous generations much more difficult than they need be. These will be getting added to JIRA though. All in all though, I do like a lot of the improvements. I'll have to check out Alexander's book I suppose as well, since the documentation is a bit lacking at the moment. -- Kevin On 10/30/07 9:05 PM, in article [EMAIL PROTECTED], "Marcus" <[EMAIL PROTECTED]> wrote: > Kevin, > > On this process, T3 ->T4 ->T5, just keep in mind that Tapestry 5 is much > more simple. > > Marcus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: Multiple onActivate?
Kevin, On this process, T3 ->T4 ->T5, just keep in mind that Tapestry 5 is much more simple. Marcus
Re: T5: Multiple onActivate?
On the surface, I'd like to preserve the bookmarks. Like I said though, I could do that with URLRewrite -- not ideal, but guaranteed to work. Digging further, I'm trying to wrap my head around how Tapestry resolves page names in T5, having been a T3 then a T4 user. The problems I'm running into seem like they really shouldn't be problems and should be a common case that Tapestry should make easy to handle. So, I'm willing to give the framework the benefit of the doubt and correct my understanding. If not, that's fine, too. I'll make a mental note not to try to do these things or reevaluate if it's to be my new framework of choice. For what it's worth, I'm working on migrating an application from django to T5. There are a variety of reasons for this, both technical and political. Ultimately, I'd like to see Java and Tapestry be a suitable replacement for the flexibility of Python and Django. -- Kevin On 10/30/07 7:51 PM, in article [EMAIL PROTECTED], "Jonathan Barker" <[EMAIL PROTECTED]> wrote: > I don't know. > > There have been some threads and I think JIRA issues over the months on > similar topics. They revolve around making Tapestry URL's friendly, and the > logic involved in having something like Order/EditOrder reduced down to > order/edit, and dealing with cases when the package name is the same as the > page name, or even worse, if a parameter looks like a page name. > > A search for those threads and issues might give you some ideas. > > Are you just trying to preserve bookmarks? Is this something where you > really need to code the logic to cope with the old URL's while migrating to > a new URL scheme? > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: T5: Multiple onActivate?
I don't know. There have been some threads and I think JIRA issues over the months on similar topics. They revolve around making Tapestry URL's friendly, and the logic involved in having something like Order/EditOrder reduced down to order/edit, and dealing with cases when the package name is the same as the page name, or even worse, if a parameter looks like a page name. A search for those threads and issues might give you some ideas. Are you just trying to preserve bookmarks? Is this something where you really need to code the logic to cope with the old URL's while migrating to a new URL scheme? Jon > -Original Message- > From: news [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Menard > Sent: Tuesday, October 30, 2007 3:58 PM > To: users@tapestry.apache.org > Subject: Re: T5: Multiple onActivate? > > Hmm . . . Okay, that's what I was afraid of. Unfortunately, it's a port > of > an existing app, so I'd like to preserve URL structure if possible. I > supposed URLRewrite could do the trick. > > As a follow-up question, is there anyway to do the following: > > "orders/43" (DB ID, caught through onActivate()) > "orders/latest" (specified in com.example.www.pages.orders.Latest) > > It looks like Tapestry will still try to pass "latest" through to > com.example.www.pages.Orders. I also couldn't figure out how to have a > "Start" class for each package, so that the first URL would actually map > to > com.example.www.pages.orders.Start. > > Is that doable, or do I have to work around it as well? > > Thanks, > Kevin > > > On 10/30/07 3:54 PM, in article [EMAIL PROTECTED], > "Jonathan Barker" <[EMAIL PROTECTED]> wrote: > > > > > > > For this use-case, I would suggest taking a string. If it matches a > regex > > (like a number pattern), then cast and do a db-lookup. Otherwise, do > > whatever else you want to do. > > > > Or you can use something like news/lookup/43 and > > news/breaking/breaking-story to be more explicit. > > > > > > > >> -Original Message- > >> From: news [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Menard > >> Sent: Tuesday, October 30, 2007 3:26 PM > >> To: users@tapestry.apache.org > >> Subject: T5: Multiple onActivate? > >> > >> Hi all, > >> > >> It appears that onActivate() cannot be overloaded in a single page > class. > >> I'm hoping I just missed something and that conclusion is wrong. If > not, > >> how are others handling URLs like: > >> > >> "news/43" (43 = DB ID) > >> "new/breaking-story" (breaking-story=slug) > >> > >> I'd like to avoid a single onActivate() that takes an Object. So, any > >> help > >> would be much appreciated. > >> > >> Thanks, > >> Kevin > >> > >> > >> > >> - > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: Multiple onActivate?
That did help a bit. At least I know how multiple onActivate can work if I need a variable number of context values. Unfortunately, it doesn't address when you have the same number, but different type. Likewise, I still haven't seen how to render to "index" pages inside subpackages. -- Kevin On 10/30/07 4:12 PM, in article [EMAIL PROTECTED], "Marcus" <[EMAIL PROTECTED]> wrote: > Hi Kevin, > > Maybe this help > > http://tapestryjava.blogspot.com/2007/08/handling-direct-urls-in-tapestry-5.ht > ml > > Marcus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: Multiple onActivate?
Hi Kevin, Maybe this help http://tapestryjava.blogspot.com/2007/08/handling-direct-urls-in-tapestry-5.html Marcus
Re: T5: Multiple onActivate?
Hmm . . . Okay, that's what I was afraid of. Unfortunately, it's a port of an existing app, so I'd like to preserve URL structure if possible. I supposed URLRewrite could do the trick. As a follow-up question, is there anyway to do the following: "orders/43" (DB ID, caught through onActivate()) "orders/latest" (specified in com.example.www.pages.orders.Latest) It looks like Tapestry will still try to pass "latest" through to com.example.www.pages.Orders. I also couldn't figure out how to have a "Start" class for each package, so that the first URL would actually map to com.example.www.pages.orders.Start. Is that doable, or do I have to work around it as well? Thanks, Kevin On 10/30/07 3:54 PM, in article [EMAIL PROTECTED], "Jonathan Barker" <[EMAIL PROTECTED]> wrote: > > > For this use-case, I would suggest taking a string. If it matches a regex > (like a number pattern), then cast and do a db-lookup. Otherwise, do > whatever else you want to do. > > Or you can use something like news/lookup/43 and > news/breaking/breaking-story to be more explicit. > > > >> -Original Message- >> From: news [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Menard >> Sent: Tuesday, October 30, 2007 3:26 PM >> To: users@tapestry.apache.org >> Subject: T5: Multiple onActivate? >> >> Hi all, >> >> It appears that onActivate() cannot be overloaded in a single page class. >> I'm hoping I just missed something and that conclusion is wrong. If not, >> how are others handling URLs like: >> >> "news/43" (43 = DB ID) >> "new/breaking-story" (breaking-story=slug) >> >> I'd like to avoid a single onActivate() that takes an Object. So, any >> help >> would be much appreciated. >> >> Thanks, >> Kevin >> >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: T5: Multiple onActivate?
For this use-case, I would suggest taking a string. If it matches a regex (like a number pattern), then cast and do a db-lookup. Otherwise, do whatever else you want to do. Or you can use something like news/lookup/43 and news/breaking/breaking-story to be more explicit. > -Original Message- > From: news [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Menard > Sent: Tuesday, October 30, 2007 3:26 PM > To: users@tapestry.apache.org > Subject: T5: Multiple onActivate? > > Hi all, > > It appears that onActivate() cannot be overloaded in a single page class. > I'm hoping I just missed something and that conclusion is wrong. If not, > how are others handling URLs like: > > "news/43" (43 = DB ID) > "new/breaking-story" (breaking-story=slug) > > I'd like to avoid a single onActivate() that takes an Object. So, any > help > would be much appreciated. > > Thanks, > Kevin > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]