Re: IOC Problem

2009-08-09 Thread Kristian Marinkovic
The problem here is that you need services that are only defined by TapestryModule (tapestry-core) therefore you always have a dependency to the web framework. One way to deal with this is to create a MockModule that contains all services that usually reside within TapestryModule (tapestry-core)

Using a checkbox in a grid component

2009-08-09 Thread Scot Mcphee
Hello Does any one have a short recipe how to use a checkbox in a grid component? What I need to do is fairly simple - let the use select (for example) three of five available options presented in a grid component, and submit their selections, which are then processed. A good example wo

Re: [T5] Log in directly to requested page (not just home page)

2009-08-09 Thread Vjeran Marcinko
Thanx, This is satisfying solution, though I don't know if Link implementation not being Serializable makes any problem when persisting in HttpSession in some cases. -Vjeran - Original Message - From: "Josh Canfield" To: "Tapestry users" Sent: Sunday, August 09, 2009 7:48 PM Subj

Re: redirect from ajax request

2009-08-09 Thread Thiago H. de Paula Figueiredo
Em Sat, 08 Aug 2009 15:26:45 -0300, Mario Rabe escreveu: Hi, Hi! how can I do a redirect from a XHR-request? Here an example to make clear what I want to do: If it was a Tapestry-provided event, you could just return a page instance, a page class, an URL or a page name in an event han

Re: [T5] Log in directly to requested page (not just home page)

2009-08-09 Thread Josh Canfield
I've found that the easiest thing to do is just remember the url that your user was trying to load in the first place. In my base page I have this: @InjectPage private Login _loginPage; public Object onActivate(Object[] context) { // Only let the request through if the user ha

Re: t5: URLWriting, is this correct?

2009-08-09 Thread Thiago H. de Paula Figueiredo
On Sun, Aug 9, 2009 at 4:59 AM, Angelo Chen wrote: > > but this hard coded the activation context, any idea with rewriting urls > with context? what i mean here is the incoming request, thanks, Just use string manipulation on the path. -- Thiago -

Re: [T5] Log in directly to requested page (not just home page)

2009-08-09 Thread Vjeran Marcinko
I know that onActivate can have EventContext argument, but it's less explicit compared to some specific onActivate for given page, such as public void onActivate(Long id) {...} and I don't want every page to have : public void onActivate(EventContext ec) {...} just because I want each of those

Re: [T5] Log in directly to requested page (not just home page)

2009-08-09 Thread Felix Gonschorek
Hi, there are two hints that may help you: You have two additional options for the parameters of you onActivate() method: a) One parameter of type Object[] b) One parameter of type EventContext (http://tapestry.apache.org/tapestry5/apidocs//org/apache/tapestry5/EventContext.html) i use b) ve

[T5] Log in directly to requested page (not just home page)

2009-08-09 Thread Vjeran Marcinko
Hello, Is there any way to genericaly extract activation context (array or EventContext) from some page instance? I'm asking this because I want my page authorization to work in a way to remember what page and activation context has been requested by unauthorized user, so that after he logs

Re: t5: URLWriting, is this correct?

2009-08-09 Thread Sven Homburg
you were faster ;-) with regards Sven Homburg Founder of the Chenille Kit Project http://www.chenillekit.org 2009/8/9 Sven Homburg > i cant see, that you add the URLRewriterRule object to the configuration > object > > with regards > Sven Homburg > Founder of the Chenille Kit Project > http

Re: t5: URLWriting, is this correct?

2009-08-09 Thread Sven Homburg
i cant see, that you add the URLRewriterRule object to the configuration object with regards Sven Homburg Founder of the Chenille Kit Project http://www.chenillekit.org 2009/8/9 Angelo Chen > > Hi, > > in a 5.1.0.5 app, i want to rewrite the url: > > http://127.0.0.1:8080/items/123 > > to >

Re: t5: URLWriting, is this correct?

2009-08-09 Thread Angelo Chen
adding configuration.add("rule1",rule) at end of method fixes the problem, I follow the first example in the doc and it has no add("rule1", rule)(http://tapestry.apache.org/tapestry5.1/guide/url-rewriting.html) it seems to me: /itemlist/123 can not be simply changed to /items/123 with following