Re: Tapestry-jquery ajax validation

2013-01-09 Thread fmaylinch
Hello, I couldn't make it work. Does anyone use this? There's something wrong with the javascript function "one". I had to comment it and call "tapestryFieldEventManager" directly. Also, when I submit the form, these ajax-validated fields are not validated. Tapestry only validates the built in v

Re: Access "this" page object from the template

2012-12-31 Thread fmaylinch
bobharner wrote > By the way, just in case it helps someone. We have many pages passing "this" page to the components. Now I know it can be retrieved using ComponentResources. But, in order to avoid changing everything at once, I figured out a way to let my component receive the page parameter (s

Re: Access "this" page object from the template

2012-12-31 Thread fmaylinch
fmaylinch wrote > It's strange because ComponentResources doesn't seem to have that > property: Oh yes it does; it comes from ComponentResourcesCommon. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Access-this-page-object-from-the-template-tp5719073p5

Re: Access "this" page object from the template

2012-12-31 Thread fmaylinch
bobharner wrote > Per http://tapestry.apache.org/link-components-faq.html it's pretty > easy to generate a link to the current page: > > refresh page > > Similarly, you should be able to do this: > Thanks! It's strange because ComponentResources doesn't seem to have that property: http://tape

Re: Access "this" page object from the template

2012-12-31 Thread fmaylinch
Chris Poulsen wrote > Would it not be easier to simply inject ComponentResources in your > component class and use it for current page? Thanks! I didn't thought of that... -- View this message in context: http://tapestry.1045711.n5.nabble.com/Access-this-page-object-from-the-template-tp5719073

Access "this" page object from the template

2012-12-31 Thread fmaylinch
Hello, This might be a stupid question but... can we access the page object from the template (to pass it to a component, for example). Now we define a getPage method: // MyPage.java class MyPage { public MyPage getPage() { return this; } } // MyPage.tml Can we do something like this t

Bean editor model does not contain a property named 'device.id'.

2012-05-11 Thread fmaylinch
Hello, We get this exception when using a t:grid. ApplicationDevice has a 'Device device' property, which in turn has a 'String id' property. I suppose t:reorder and t:exclude don't support property navigation. Is this right? Should we use a custom t:model then? Any tips/suggestions on that w

Re: Why @EagerLoad services come before @Startup methods?

2012-04-21 Thread fmaylinch
Thanks for the information, Howard. It's a shame that @Startup wasn't added /at the top/ of RegistryImpl.performRegistryStartup(). :) -- View this message in context: http://tapestry.1045711.n5.nabble.com/Why-EagerLoad-services-come-before-Startup-methods-tp5651302p5656756.html Sent from the Tap

Re: Why @EagerLoad services come before @Startup methods?

2012-04-20 Thread fmaylinch
I know, Lance. :-) Yes, we already made a service that initializes the "static class" and exposes that functionality as a normal "non-static" service. Thanks for your help. So, we don't have any problem with this now. Anyway, I asked my first question just out of curiosity: is there a reason why

Re: Why @EagerLoad services come before @Startup methods?

2012-04-19 Thread fmaylinch
Thanks Thiago, The order in which the @EagerLoad services are instantiated is not important (I mean, the order between them); they just need to be instantiated after a @Startup method that initializes something for them, because those services use a utility class with static methods that requires

Why @EagerLoad services come before @Startup methods?

2012-04-19 Thread fmaylinch
Hello, We've seen that @EagerLoad services are instantiated before @Startup methods are executed? Why that? Wouldn't make more sense the other way? What should we do if an @EagerLoad service needs initialization provided by a @Startup method? Thanks! -- View this message in context: http://ta

Re: How to define a "private" service (a service only for another service)

2012-04-01 Thread fmaylinch
Howard Lewis Ship wrote > > In fact, in functional programming (such as Clojure) all data is > "public" (but immutable) and most functions are also public. > (Do you mean (making everything public) is the way to go) ? ;) -- View this message in context: http://tapestry.1045711.n5.nabble.com

Re: Tutorial issue- changing code and refresh not working

2012-03-29 Thread fmaylinch
fredramsey wrote > > That is not on by default in Eclipse, and it isn't mentioned in the > tutorial. > > > Thiago H de Paula Figueiredo wrote >> >> Hi are you running the webapp? Are you sure Eclipse is compiling your >> Java >> classes automatically and to a folder which is in the servlet c

Re: How to define a "private" service (a service only for another service)

2012-03-29 Thread fmaylinch
Howard Lewis Ship wrote > > HiveMind, the predecessor to Tapestry IoC, had private services & > visibility. In my opinion, it caused more problems than it was worth. > > What I'm hearing is a basic lack of trust between one developer and > another within your team. One possible solution there is

Re: How to define a "private" service (a service only for another service)

2012-03-28 Thread fmaylinch
Nikla wrote > > I guess the suggested @ModulePrivate would be similar [to @Local] but > controlling > service exposure scope instead of lookup scope. > Good idea! -- View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-define-a-private-service-a-service-only-for-another-

Re: How to define a "private" service (a service only for another service)

2012-03-28 Thread fmaylinch
Tapestry doc says that @SubModule specifies... > [...] a list of additional classes to be treated as module classes, > exactly as if they were identified in the manifest. Despite the name, > there is no hierarchy of modules in Tapestry IoC. > So services added to submodules would be visible as

Re: How to define a "private" service (a service only for another service)

2012-03-28 Thread fmaylinch
Lance Java wrote > > Nice idea, so I guess in this case you include a submodule with a public > and a private service including the private advice but only the public > service is added to the top level module > Do you mean using the @SubModule annotation? And you think services included in sub

Re: How to define a "private" service (a service only for another service)

2012-03-28 Thread fmaylinch
Denis Stepanov-2 wrote > > It makes sense to have "private" services, would be nice to have services > which will be only exposed to the services in the current module. > That's a very good and concise way to describe the idea. Thanks for your support! :) -- View this message in context: http

Re: How to define a "private" service (a service only for another service)

2012-03-28 Thread fmaylinch
Lance Java wrote > > Perhaps a solution is to setup a second, private Tapestry IOC registry for > defining your private services. Your public service then looks up the > private service from the private registry instead of from the public > registry. > Interesting solution... any help on how to

Re: How to define a "private" service (a service only for another service)

2012-03-28 Thread fmaylinch
Kalle Korhonen-2 wrote > > Well, you have multiple instances of the object that you are using a > "private service". If you needed to, the instances could use private > static variables to hold the state. It's typically not a good idea to > make a service stateful, but since you were asking about

Re: How to define a "private" service (a service only for another service)

2012-03-27 Thread fmaylinch
Kalle Korhonen-2 wrote > > Could you just inject an object with @Autobuild to your service? You'd > get one per service it's used in but the object itself wouldn't be > available as a service. > Thank you! Maybe we could use that. Kalle Korhonen-2 wrote > > If you really needed, you could use

How to define a "private" service (a service only for another service)

2012-03-27 Thread fmaylinch
Hello, We've found that some times we would like to define a service that will only be used from some specific services (for example, services inside the same package). Is there any way to do this in Tapestry? This way, the developer won't use that "private" service from places where it is not su

Re: Why not setter injection or thread-safe field @Inject?

2012-03-20 Thread fmaylinch
Denis Stepanov-2 wrote > > Where did you read about fields injection not being thread safe? It's > definitely not true. Some developers like to use constructor injection > because of better testing etc. personally I'm using mostly field > injection. > Here: http://tapestry.apache.org/defining-

Re: Service creation listener?

2012-03-19 Thread fmaylinch
Thank you Thiago. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Service-creation-listener-tp5577764p5578450.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail

Re: Dependencies in a parent service, repeated in children constructors

2012-03-19 Thread fmaylinch
Thank you Thiago, I think I can also wrap those 3 services inside a "facade" service so there is only one injected service in each child and not 3. But I wonder whether there is a solution with less code repetition and where I can add more child services without them having to know about those de

Service creation listener?

2012-03-19 Thread fmaylinch
Hello, We would like to add a service creation observer so this "master" service is be notified every time a service is created. We would like to do it together with an annotation (let's say @Metric) so every time a @Metric service is created, the master service calls its methods from time to time

Re: Reusing tapestry hibernate session in a thread

2012-02-28 Thread fmaylinch
Sorry, it was a newbie mistake... I simplified my test and found that even a simple call to a service (no extra threads involved) was not being persisted, and the cause was the lack of adviseTransactions() method in the module. @Match("MyService") public static void adviseTransact

Re: Reusing tapestry hibernate session in a thread

2012-02-28 Thread fmaylinch
Howard, I tried the ptm.run(...) idiom you posted and I found that the changes are not committed. How can I commit the changes I perform inside that thread? I suppose I can't add @CommitAfter to the method that starts the thread because that method will probably end before the thread. But I tried