Tapestry 5: @Property object is null when using in onActivate

2011-04-24 Thread cablepuff
Hi I have a situation where I have a @property object. @Property private Command cmd. My onActivate would take an id and load it from db and set the obj onActivate(Integer databaseId) { DBRecord dbRecord = myDao.getById(databaseId); if (dbRecord != null) {

Re: Tapestry 5: @Property object is null when using in onActivate

2011-04-24 Thread Taha Hafeez
Hi Where do you initialize 'cmd' ? The variable has to be initialized somewhere. @Property only creates public setter/getter for you, you have to create an instance yourself. Do something like cmd = new Command() somewhere in onActivate() before using cmd regards Taha On Sun, Apr 24, 2011 at

Re: Tapestry 5: @Property object is null when using in onActivate

2011-04-24 Thread cablepuff
Hi I tried it. End up getting this. Firefox has detected that the server is redirecting the request for this address in a way that will never complete. It seems like their is a endless loop going from onActivate and object annotated with @property -- View this message in context:

Re: Latest tapx 1.1 snapshot depends on T5.3

2011-04-24 Thread Howard Lewis Ship
My mistake, will fix shortly. On Apr 23, 2011 4:24 PM, Luca Menegus lu...@dbmsrl.com wrote: Hi, I've noticed that the latest tapx 1.1 snapshot [1] deployed into http://howardlewisship.com/snapshot-repository/ repository depends on T5.3.0-SNAPSHOT and not on T5.2.x. In facts it is no more

Re: Tapestry 5: @Property object is null when using in onActivate

2011-04-24 Thread Taha Hafeez
Are you returning something from onActivate() method ? It will help if you share the code causing the problem. regards Taha On Sun, Apr 24, 2011 at 9:28 PM, cablepuff cablep...@gmail.com wrote: Hi I tried it. End up getting this. Firefox has detected that the server is redirecting the

[ANN] tapestry-breadcrumbs

2011-04-24 Thread Joakim Olsson
Hi, Just wanted to mention that I just released my little bread crumb trail library tapestry-breadcrumbs over at Github (https://github.com/argoyle/tapestry-breadcrumbs). It should be available at Maven Central soonish I hope. It's not much but I hope it can be of use. Regards, Joakim

Plastic: nondeterministic PlasticManager behavior

2011-04-24 Thread kristian marinkovic
Hi, i'm taking a deep dive into plastic and came across a behavior i cannot explain. If i create a ClassInstantiator from a PlasticManager that was created with the transformers and packages in the constructor, i get the PlasticClass in my transformer where i can e.g. assert that the class under

Re: IOC Setter injection

2011-04-24 Thread Thiago H. de Paula Figueiredo
On Fri, 22 Apr 2011 08:18:24 -0300, Denis Stepanov denis.stepa...@gmail.com wrote: Is there any way to use setter injection in Tapestry IOC? Yes, but not using autobuilding. Use a builder method instead: public static YourService buildYourService(DependencyType1 type1, ...) {

Link to root

2011-04-24 Thread Mark
What is the best way to get the url of the root of a web application? In other words, If I'm on a page like: http://server:8080/appname/mypage?showAll=true I want to get: http://server:8080/appname I tried using: pageRenderLinkSource.createPageRenderLink(Index).toAbsoluteURI(); But that seems

Re: IOC Setter injection

2011-04-24 Thread Igor Drobiazko
Actually setter injection is supposed to work when autobuilding services. Отправлено с iPhone 25.04.2011, в 00:00, Thiago H. de Paula Figueiredo thiag...@gmail.com написал(а): On Fri, 22 Apr 2011 08:18:24 -0300, Denis Stepanov denis.stepa...@gmail.com wrote: Is there any way to use

Re: Link to root

2011-04-24 Thread Bryan Lewis
One way to do it: @Inject private Request request; ... int port = request.getServerPort(); String serverName = request.getServerName(); On Sun, Apr 24, 2011 at 7:28 PM, Mark mark-li...@xeric.net wrote: What is the best way to get the url of the root of a web

Re: Link to root

2011-04-24 Thread Taha Hafeez
Try @Inject private RequestGlobals requestGlobals; requestGlobals.getHttpServletRequest().getContextPath() regards Taha On Mon, Apr 25, 2011 at 6:37 AM, Bryan Lewis jbryanle...@gmail.com wrote: One way to do it: @Inject private Request request; ... int port =

Re: Link to root

2011-04-24 Thread Mark
Thanks Brian and Taha. I know I can build what I need by combining both of your suggestions. I wanted to make sure there wasn't a simple way to get what I wanted without needing to build it manually, but it doesn't sound like there is another way to get this directly from Tapestry. Thanks for

Re: Tapestry 5: @Property object is null when using in onActivate

2011-04-24 Thread cablepuff
public Object onActivate(final Integer databaseId) { Validate.notNull(this.myCommand, command should be injected); this.dbRecord = this.myDao.getRecordById(databaseId); final User user = this.securityService.getCurrentUser();

Event Handler Method

2011-04-24 Thread Moritz Gmelin
Hi, If I have an event link for a request. I can find the target component (with its proper class) with the ComponentSourceService. Is there a more elegant way to find the event handler method that will be invoked on the component than to search through matching method names in the component