-
1. Re: RequestParameter in Wicket
cpopetz Sep 24, 2009 1:43 PM (in response to robshep)Nope, not implemented. Feel free to file a jira issue feature request.
-
2. Re: RequestParameter in Wicket
robshep Sep 25, 2009 8:34 PM (in response to robshep)Thanks Clint, will do a jira item.
How difficult is this likely to be? I'd be willing to have a crack at this.
I'd need pointing in the right direction first....
Cheers and regards
Rob
-
3. Re: RequestParameter in Wicket
cpopetz Sep 25, 2009 10:06 PM (in response to robshep)I presume you mean injecting request parameters into fields of wicket components, not into other seam components. The latter should already work, even under wicket, as long as the types of the injected fields is
String
because otherwise you won't have access to the JSF converters, and that code (org.jboss.seam.web.Parameters) is tied to jsf.For making injection of request parameters work for wicket components, you'd need to do the following in org.jboss.seam.wicket.WicketComponent:
add a list of BijectedAttributes for fields that are annotated with RequestParameter, similar to inAttributes
in add(Field), add to that list if a field is annotated
in initInterceptors(), add a new RequestParameterInterceptor if that list is non-empty
code that interceptor to do something similar to what BijectionInterceptor and WicketComponent.inject does for request parameters.For what it's worth, I'd accept a patch on all that, but I'm not going to code it all, because all of this changes under Seam3, which uses JSR-299, and which will support wicket OOTB because it's less tied to JSF and better implemented.
-
4. Re: RequestParameter in Wicket
robshep Sep 26, 2009 1:38 PM (in response to robshep)Clint,
Your second sentence has been the most useful thing I've read in the last few days!
I just wish I'd read it sooner, and saved a day and a half of fruitless hacking :)Is this documented somewhere? Maybe this is a truth nugget for an KnowledgeBase somewhere.
I'll look forward to Seam3, instead of coding the above...
Thanks for the tip!
Rob
-
5. Re: RequestParameter in Wicket
cpopetz Sep 29, 2009 2:49 AM (in response to robshep)FWIW, I don't think that the restriction in question (i.e. that @RequestParameter should work in seam components when running with wicket, but not for types other than String) is documented anywhere.