Hi Ben,

I'm sorry for the late reply, but everything works fine now.
The problems I had before disappeared.
Thanks for your help!

Kind regards,

Jeroen


Ben Gunter-2 wrote:
> 
> Actually, because the event parameter is a special case, it does use the
> special $ prefix to indicate that. (Perhaps a poor choice on my part
> because
> it makes it look like JSP EL.) Whereas most embedded parameters work just
> like normal ones -- {foo} means a parameter named "foo" with the value in
> the request path -- the $event parameter works differently: {$event}
> exposes
> a parameter with the *name* specified by the value in the request path.
> 
> Jeroen, I have done a bunch of work for Stripes 1.5.1 to make clean URLs
> smarter. Please check out the trunk from SVN and see if it behaves more
> like
> you expect.
> 
> -Ben
> 
> On Mon, Nov 24, 2008 at 9:49 AM, Poitras Christian <
> [email protected]> wrote:
> 
>>  The correct syntax is {event}.
>>
>> Christian.
>>
>>  ------------------------------
>> *From:* Jeroen van Wilgenburg [mailto:[email protected]]
>> *Sent:* Saturday, November 22, 2008 11:11 AM
>> *To:* [email protected]
>> *Subject:* [Stripes-users] {$event} cannot be the first element in
>> UrlBinding
>>
>>   Hi,
>>
>> I'm trying some things with @UrlBinding and {$event} and ran into a small
>> problem.
>>
>> I started with:
>>
>> @UrlBinding("/welcome/{$event}.action")
>> public class WelcomeActionBean extends AbstractActionBean {
>>
>>   @DefaultHandler
>>   public Resolution normal(){
>>       return new ForwardResolution("/normal.jsp");
>>   }
>>
>>   public Resolution admin(){
>>       return new ForwardResolution("/admin.jsp");
>>   }
>>
>> }
>>
>> I access the application with the url
>> http://localhost:8080/app/welcome/.action
>> This works fine (although the url is a bit odd, but it's just a test)
>>
>> The following binding also works fine:
>> @UrlBinding("/hello/{$event}/welcome.action")
>> The access url is http://localhost:8080/app/hello/welcome.action.
>> Note that the event disappeared because of the @DefaultHandler
>>
>> But when I try the following annotation:
>> @UrlBinding("/{$event}/welcome.action")
>>
>> I get strange errors. The url's made with <stripes:link/> render
>> correctly,
>> but when I click on them I get this:
>>
>> net.sourceforge.stripes.exception.ActionBeanNotFoundException: Could
>> not locate an ActionBean that is bound to the URL
>> [/admin/welcome.action]. Commons reasons for this include mis-matched
>> URLs and forgetting to implement ActionBean in your class. Registered
>> ActionBeans are: {/controller/DefaultView.action=class
>> net.sourceforge.stripes.controller.DefaultViewActionBean, /=class
>> com.xebia.web.WelcomeActionBean, //welcome.action=class
>> com.xebia.web.WelcomeActionBean}
>>
>> The url to enter the application is
>> http://localhost:8080/app//welcome.action which is also a bit odd (note
>> the double slashes).
>>
>> Am I doing something wrong or isn't it allowed to use {$event} for
>> the first element?
>>
>> Thanks for your help,
>>
>> Jeroen van Wilgenburg
>>
>>
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>> challenge
>> Build the coolest Linux based applications with Moblin SDK & win great
>> prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the
>> world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> Stripes-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/stripes-users
>>
>>
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the
> world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Stripes-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/stripes-users
> 
> 

-- 
View this message in context: 
http://www.nabble.com/%7B%24event%7D-cannot-be-the-first-element-in-UrlBinding-tp20637798p20933996.html
Sent from the stripes-users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to