Do you currently handle null/empty params, so that if a user types in manually:
http://localhost:8080/eventscalendar/event/
it would redirect somewhere instead of showing a bad exception page?

-warner

On Oct 19, 2006, at 9:58 PM, D&J Gredler wrote:

I ended up hacking together a custom ServiceEncoder that knew which pages took a single String param, which took a single Long param, which took two Long params, etc. It strips the first character off of the parameters as needed in the encode( ) method and adds them back in the decode( ) method. Ugly, but it was quick and it works. Hopefully this will be done via the new
type coercion framework in Tap5 so that the type identifiers aren't
needed...

http://tapestry.apache.org/tapestry5/guide/coercion.html


On 10/20/06, Warner Onstine <[EMAIL PROTECTED]> wrote:

So far I have everything working the way that I want but I ran into
something odd while implementing this:
http://tapestry.apache.org/tapestry4/UsersGuide/friendly-urls.html

specifically I am implementing the REST-like part of the friendly
urls the custom encoder. I created my own encoder/decoder pair but
when I call it for an external link I get this as my url:
http://localhost:8080/eventscalendar/event/l1

After looking at this again I finally realized what that extra
character is, it is telling Tapestry that the value I'm passing is a
Long (which it is when it gets set on the wire), is there a way
(short of changing the actual value passed to an int) to get this to
remove the extra param, or am I stuck with it if I want to change it?

Also, I am curious if anyone has developed a full-blown REST plugin
for Tapestry so that all the urls are easily mappable (ala Rails). So
that something like this
http://localhost:8080/eventscalendar/events/
would go to a default page like EventsHome.html and
http://localhost:8080/eventscalendar/events/new
would go to NewEvent.html
etc.

It would be nice if we could easily do routes like Rails does in a
default Tapestry app, rather than having to jump through two files
(web.xml and hivemodule.xml).

-warner

---------------------------------------------------------------------
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]

Reply via email to