T 5.2.6 EventLink and confirm box

2012-04-20 Thread resign
hi,
i have a problem

i have an EventLink to delete user, on this link a created an onClick
listener which ask the user if he want to delete something. but Event
will fired in each case.

example:

.
t:eventLink t:id=deleteLink t:event=REMOVE_ME onClick=return
confirm('Realy?'); delete/t:eventLink

.

How can i do this?

thanks,
resign

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T-5-2-6-EventLink-and-confirm-box-tp5653459p5653459.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: T 5.2.6 EventLink and confirm box

2012-04-20 Thread pieter
I think you better create a mixin !

http://wiki.apache.org/tapestry/Tapestry5AndJavaScriptExplained

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T-5-2-6-EventLink-and-confirm-box-tp5653459p5653489.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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

2012-04-20 Thread Lance Java
Mutable static data is the root of all evil ;)

Statics are (almost) impossible to mock and make testing and clustering
very difficult. Is there any way you could refactor your code to use a
singleton service instead of the static?

You could then @EagerLoad the singleton service or initialize it in a
@Startup method and leave the other services to lazy load.


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 @EagerLoads come
before @Startup? Maybe to prevent people from using static services? ;-)

Thanks a lot!
On Apr 20, 2012 9:27 AM, Lance Java [via Tapestry] 
ml-node+s1045711n565355...@n5.nabble.com wrote:

 Mutable static data is the root of all evil ;)

 Statics are (almost) impossible to mock and make testing and clustering
 very difficult. Is there any way you could refactor your code to use a
 singleton service instead of the static?

 You could then @EagerLoad the singleton service or initialize it in a
 @Startup method and leave the other services to lazy load.


 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://tapestry.1045711.n5.nabble.com/Why-EagerLoad-services-come-before-Startup-methods-tp5651302p5653558.html
  To unsubscribe from Why @EagerLoad services come before @Startup
 methods?, click 
 herehttp://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=5651302code=ZmVycmFubWF5bGluY2hAZ21haWwuY29tfDU2NTEzMDJ8LTIwNzk2MDg1MzA=
 .
 NAMLhttp://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Why-EagerLoad-services-come-before-Startup-methods-tp5651302p5653577.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

Re: T 5.2.6 EventLink and confirm box

2012-04-20 Thread Geoff Callender
Does this help? 
http://jumpstart.doublenegative.com.au/jumpstart/together/easycrud/persons

On 20/04/2012, at 4:25 PM, resign wrote:

 hi,
 i have a problem
 
 i have an EventLink to delete user, on this link a created an onClick
 listener which ask the user if he want to delete something. but Event
 will fired in each case.
 
 example:
 
 .
 t:eventLink t:id=deleteLink t:event=REMOVE_ME onClick=return
 confirm('Realy?'); delete/t:eventLink
 
 .
 
 How can i do this?
 
 thanks,
 resign
 
 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/T-5-2-6-EventLink-and-confirm-box-tp5653459p5653459.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Tree leaf not selectable

2012-04-20 Thread Geoff Callender
Lodged as TAP5-1911.

Thanks for the workaround.

On 20/04/2012, at 2:20 AM, George Christman wrote:

 I essentially had to do the same thing Lance suggested. This bug exist in the
 Tapestry-Jquery implementation too. 
 
 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/Tree-leaf-not-selectable-tp5651521p5652216.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 



Re: Handling component's actionlink on the enclosing page?

2012-04-20 Thread Dmitriy Vsekhvalnov
Thanks guys, works like a charm.

On Fri, Apr 20, 2012 at 3:17 AM, Chris Mylonas ch...@opencsta.org wrote:

 that is an awesome one or two line explanation of an event bubble!

 this was a little too hard to take in whilst i mucked around with custom
 components and totally missed the point (
 https://tapestry.apache.org/component-events.html)
 the jumpstart example looks good too
 http://jumpstart.doublenegative.com.au/jumpstart/examples/component/eventbubbling

 cheers
 chris

 On 20/04/2012, at 6:05 AM, Thiago H. de Paula Figueiredo wrote:

  On Thu, 19 Apr 2012 16:59:33 -0300, Thiago H. de Paula Figueiredo 
 thiag...@gmail.com wrote:
 
  Yes, if you change from ActionLink to EventLink.
 
  Ooops, it missed the explanation: Tapestry component ids are local to
 the component or page in which they were declared, so, outside it, you
 cannot use the id in the event handler method name of the @OnEvent
 annotation. On the other hand, event names don't have this limitation.
 Events bubble up (from the component that triggers it to its parent until
 it reaches the containing page).
 
  Summary: use EventLink with a different event name for each link.
 
  --
  Thiago H. de Paula Figueiredo
  Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
 and instructor
  Owner, Ars Machina Tecnologia da Informação Ltda.
  http://www.arsmachina.com.br
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
  For additional commands, e-mail: users-h...@tapestry.apache.org
 


 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org




Zone and Jquery issue in Tapestry5.2.6

2012-04-20 Thread Athneria, Mahendra
Hi All,

I am migrating my web application from tapestry version 5.1.0 to 5.2.6. I am 
using jquery dialog to handle popped out display (instead of a pop-up window).
While using tapestry v5.1.0, I used jquery js (version 1.6.2) library with 
tapestry standard js library (prototype n other js) with no discrepancy.
But now, when I have migrated to tapestry v5.2.6, there are conflicts in the 
javascripts. If I comment out jquery js import in a page, zone works i.e. gets 
updated but dialog doesn't work and if  I include jquery js in the page, the 
dialog works perfectly, but it shows error for zone updation event  saying 
Element 'selectZone' does not have an associated Tapestry.ZoneManager object.
So basically, I need to use both jQuery and prototype js together in the page 
for tapestry v5.2.6. Please suggest a way for the same.

Regards,
Mahendra


This e-mail and the documents attached are confidential and intended solely for 
the addressee; it may also be privileged. If you receive this e-mail in error, 
please notify the sender immediately and destroy it. As its integrity cannot be 
secured on the Internet, the Atos group liability cannot be triggered for the 
message content. Although the sender endeavors to maintain a computer 
virus-free network, the sender does not warrant that this transmission is 
virus-free and will not be liable for any damages resulting from any virus 
transmitted.


Re: Zone and Jquery issue in Tapestry5.2.6

2012-04-20 Thread François Facon
Hi Mahendra,

Tapestry5-jquery project allows you to choose whether to include or
not Prototype (and original tapestry components). jQuery will be added
to the javascript stack in every case. In your AppModule,
contributeApplicationDefaults method, you can add
configuration.add(JQuerySymbolConstants.SUPPRESS_PROTOTYPE, false);

Regards
François

Le 20 avril 2012 14:52, Athneria, Mahendra
mahendra.athne...@atos.net a écrit :
 Hi All,

 I am migrating my web application from tapestry version 5.1.0 to 5.2.6. I am 
 using jquery dialog to handle popped out display (instead of a pop-up window).
 While using tapestry v5.1.0, I used jquery js (version 1.6.2) library with 
 tapestry standard js library (prototype n other js) with no discrepancy.
 But now, when I have migrated to tapestry v5.2.6, there are conflicts in the 
 javascripts. If I comment out jquery js import in a page, zone works i.e. 
 gets updated but dialog doesn't work and if  I include jquery js in the page, 
 the dialog works perfectly, but it shows error for zone updation event  
 saying Element 'selectZone' does not have an associated Tapestry.ZoneManager 
 object.
 So basically, I need to use both jQuery and prototype js together in the page 
 for tapestry v5.2.6. Please suggest a way for the same.

 Regards,
 Mahendra


 This e-mail and the documents attached are confidential and intended solely 
 for the addressee; it may also be privileged. If you receive this e-mail in 
 error, please notify the sender immediately and destroy it. As its integrity 
 cannot be secured on the Internet, the Atos group liability cannot be 
 triggered for the message content. Although the sender endeavors to maintain 
 a computer virus-free network, the sender does not warrant that this 
 transmission is virus-free and will not be liable for any damages resulting 
 from any virus transmitted.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Tree leaf not selectable

2012-04-20 Thread Lance Java
Are you sure that you are returning consistent values for hasChildren() and
getChildren(). It sounds like you might be returning true for hasChildren()
but getChildren() is returning an empty list.


T5: Link form elements to enclosing form after zone update?

2012-04-20 Thread Dmitriy Vsekhvalnov
Hi all,

  How can i return form elements as part of zone update?

E.g:

t:form
  t:zone t:id=zone_1 /
  t:zone t:id=zone_2 /
  
/t:form

So i'm returning zone_1, which contains some form fields (text fields), and
i'm getting client-side exception: 'Client exception processing response:
TypeError: Cannot read property '_tapestry' of null'

How to link them to enclosing form correctly?


Re: T5: ValidationException from validate event leads to ERROR level logger statement

2012-04-20 Thread raulmt
Thanks, Thiago. Yes, the wiki page should explain other ways of recording
errors instead of this one that, as you said, it is known as bad idea.

By the way, I have I doubt about this: one thing useful of this
onValidateFromComponentId methods that throw Exceptions is that you can
validate specific fields and record errors on them without the need to
inject the component just to pass it to Form#recordError… is there another
way to record an error on a Field without the need to inject the Field just
for this? (just like you can return return a link to a page with just
returning the page class or page name as String, without injecting the page
on the component).

Thanks.

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-ValidationException-from-validate-event-leads-to-ERROR-level-logger-statement-tp4860047p5654429.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



PlasticClass.getMethods() doesn't include introduced methods.

2012-04-20 Thread Luke Wilson
Hi,

The behaviour of the now deprecated ClassTransformation.matchMethods() and 
related methods has changed to not include introduced Methods.  I believe this 
problem also applies to fields.

On top of this, the built in ClassTransformationWorker2s use 
PlasticClass.getMethods() directly to find fields.

The sum total of this is that it is impossible to create a method or field in a 
ClassTransformationWorker/ClassTransformationWorker2 and have it taken into 
account by subsequent workers. Is this deliberate, or is it a bug? It's causing 
us headaches in our upgrade to Tapestry 5.3.

More is described here: 
http://stackoverflow.com/questions/10249254/tapestry-5-3-plasticclass-getmethods-doesnt-include-introduced-methods.

Kind regards,

Luke



-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: PlasticClass.getMethods() doesn't include introduced methods.

2012-04-20 Thread Howard Lewis Ship
On Fri, Apr 20, 2012 at 9:39 AM, Luke Wilson l...@viscri.co.uk wrote:
 Hi,

 The behaviour of the now deprecated ClassTransformation.matchMethods() and 
 related methods has changed to not include introduced Methods.  I believe 
 this problem also applies to fields.

 On top of this, the built in ClassTransformationWorker2s use 
 PlasticClass.getMethods() directly to find fields.

 The sum total of this is that it is impossible to create a method or field in 
 a ClassTransformationWorker/ClassTransformationWorker2 and have it taken into 
 account by subsequent workers. Is this deliberate, or is it a bug? It's 
 causing us headaches in our upgrade to Tapestry 5.3.

I think that's a use case that isn't accounted for. The other APIs on
ClassTransformationWorker2,  particularly TransformationSupport, are
intended to fill the gap.

My observation was that you would introduce a method to either add an
event handler method, which can be done using TransformationSupport,
or to introduce rendering behavior, which can be accomplished by
advising one of the render phase methods.

However, I'm interested in other use cases, and will certainly address
them if they are valid.

Sorry for your upgrade trouble; I'd have to say you are likely in the
minority, using the most advanced features of Tapestry (and,
unfortunately, paying the cost).

That being said, I hope you are enjoying the Plastic API more than its
various predecessors.


 More is described here: 
 http://stackoverflow.com/questions/10249254/tapestry-5-3-plasticclass-getmethods-doesnt-include-introduced-methods.


Ah, yes, I can see what you are going there.

I think, perhaps, PlasticField and PlasticMethod may need a
makeVisible() method that makes the introduced members visible inside
PlasticClass.getMethods() and PlasticClass.getFields().  I don't think
there's a way to extricate things so that member access within the
introduced method is not transformed, but that's probably fine ... in
your case, you want to make sure that the ParameterWorker sees your
defaultValidate() method, and that method will be a stub with advice.


 Kind regards,

 Luke



 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org




-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Thoughts on a Tapestry Class

2012-04-20 Thread Howard Lewis Ship
It is something to think about; setting up my own public enrollment
training, and having people come to me.  This might be done in
Portland, OR (my home town, but also a great and easy place to visit)
or a more central hub city such as Denver , Cincinnati, or Atlanta.

My current materials are about 4 days worth; I can easily add a bit
more, but I also like keeping a big chunk of time open for
exploration.

They say If you build it, they will come but I'd prefer to have an
idea of how many people would be interested before committing.
Charging people something in the $2k range for the week (which would
include snacks, lunches, and printed materials) would work, as long as
we get sufficient attendance, which I'd think would need to be at
least 8 students.

The other issue is that the training I have is organized towards true
newbies ... people with little or no exposure to Tapestry, and just a
general knowledge of HTML, Java, and JavaScript. Are the people on
this list, looking for training, interested in that level, or
something higher?

On Thu, Apr 19, 2012 at 4:02 PM, George Christman
gchrist...@cardaddy.com wrote:
 Hi Howard, if your unable to prepare the materials for an online course, do
 you think there's a chance a class could be organized at a selected
 location? I'm pretty sure you'll find smaller organizations wouldn't mind
 getting training without having to layout the full expense of bringing you
 on site.

 The online training I just received was very good, 9-5 for 5 days straight.
 The class grossed just shy of 30k which obviously was split over the 15
 students attending. That being said, it might be worth someones time to
 offer it a couple times a year, or as needed.

 I really think it's going to be needed in order to continue to help this
 project/community prosper. Especially if new organization's with smaller
 teams decide to start using it.

 Any thoughts?



 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/Is-there-such-thing-as-a-Tapestry-class-tp5652475p5652998.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org




-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



tapestry-security 0.4.4 custom login form question

2012-04-20 Thread Norman Franke
I'm in the process of upgrading from tapestry-security 0.3.1 to 0.4.4.  
Other than the two extra dependencies, I'm having problems with my  
custom login form.


Comments on the mailing list said to use this to redirect to the  
original page before the redirect to the login page:


SavedRequest savedRequest =  
WebUtils 
.getAndClearSavedRequest(requestGlobals.getHTTPServletRequest());

response.sendRedirect(savedRequest.getRequestUrl());

This no longer works now that it's storing the URL in a cookie.  
Looking at LoginForm.java, I see this code that sort of works:


String requestUri = pageService.getSuccessPage();
if (!requestUri.startsWith(/)) requestUri = / + requestUri;
pageService.redirectToSavedRequest(requestUri);

However, the entire PageService interface is deprecated and the  
comments note an indent to remove it. What's the proper way to do  
this? It would be nice to have a single call to redirect on success,  
or at least have getSuccessPage return a proper URL.


I'll do what LoginForm does for now, but I hate using deprecated APIs.

Norman Franke
Answering Service for Directors, Inc.
www.myasd.com





-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: tapestry-security 0.4.4 custom login form question

2012-04-20 Thread Kalle Korhonen
On Fri, Apr 20, 2012 at 11:44 AM, Norman Franke nor...@myasd.com wrote:
 I'm in the process of upgrading from tapestry-security 0.3.1 to 0.4.4. Other
 than the two extra dependencies, I'm having problems with my custom login
 form.
 This no longer works now that it's storing the URL in a cookie. Looking at
 LoginForm.java, I see this code that sort of works:
 However, the entire PageService interface is deprecated and the comments
 note an indent to remove it. What's the proper way to do this? It would be
 nice to have a single call to redirect on success, or at least have
 getSuccessPage return a proper URL.
 I'll do what LoginForm does for now, but I hate using deprecated APIs.

Yes, sorry about that, but that's the way to do it. There's no great
way of indicating reasons for deprecation in javadoc. However, I
wanted to include a warning for the current users of PageService that
it's going to change in the future. First of all, I hate the name,
it's too generic (and I should have deprecated it right away back when
I started working on this codebase) and I'm not entirely convinced
there's a need for a separate service in addition to the
SecurityService. Also, I've found out that forward-looking
deprecations is a great way of extorting comments from otherwise happy
but quiet users of the module :P I didn't want to make drastic changes
in 0.4.x until I've experimented with a cleaner api in 0.5.

Kalle

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Tapestry Jquery AjaxUpload Template

2012-04-20 Thread George Christman
Hello, does anybody know how to provide a custom template for the
ajaxuploader? I'd like to restyle the button and remove the file upload list
below without having to fully depend on css. Thanks

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-Jquery-AjaxUpload-Template-tp5655109p5655109.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Thoughts on a Tapestry Class

2012-04-20 Thread George Christman
I would be interested. 

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Thoughts-on-a-Tapestry-Class-tp5654982p5655111.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Thoughts on a Tapestry Class

2012-04-20 Thread Russell John-Baptistr
+1

Sent from my iPhone

On Apr 20, 2012, at 3:18 PM, George Christman gchrist...@cardaddy.com wrote:

 I would be interested. 
 
 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/Thoughts-on-a-Tapestry-Class-tp5654982p5655111.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: tapestry-security 0.4.4 custom login form question

2012-04-20 Thread Norman Franke

On Apr 20, 2012, at 3:01 PM, Kalle Korhonen wrote:

On Fri, Apr 20, 2012 at 11:44 AM, Norman Franke nor...@myasd.com  
wrote:
I'm in the process of upgrading from tapestry-security 0.3.1 to  
0.4.4. Other
than the two extra dependencies, I'm having problems with my custom  
login

form.
This no longer works now that it's storing the URL in a cookie.  
Looking at

LoginForm.java, I see this code that sort of works:
However, the entire PageService interface is deprecated and the  
comments
note an indent to remove it. What's the proper way to do this? It  
would be

nice to have a single call to redirect on success, or at least have
getSuccessPage return a proper URL.
I'll do what LoginForm does for now, but I hate using deprecated  
APIs.


Yes, sorry about that, but that's the way to do it. There's no great
way of indicating reasons for deprecation in javadoc. However, I
wanted to include a warning for the current users of PageService that
it's going to change in the future. First of all, I hate the name,
it's too generic (and I should have deprecated it right away back when
I started working on this codebase) and I'm not entirely convinced
there's a need for a separate service in addition to the
SecurityService. Also, I've found out that forward-looking
deprecations is a great way of extorting comments from otherwise happy
but quiet users of the module :P I didn't want to make drastic changes
in 0.4.x until I've experimented with a cleaner api in 0.5.



OK, I'll keep using it for now. I'd definitely vote for moving that  
functionality into SecurityService. I actually checked it to see if  
things moved there, but no.


I'd also like to be able to save an arbitrary URL for redirection  
after login. I did that before with the WebUtils.saveRequest, but that  
doesn't work in the cookie world. As a result, I now have to support  
both methods after login.


Norman Franke
Answering Service for Directors, Inc.
www.myasd.com



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

2012-04-20 Thread Howard Lewis Ship
@EagerLoad support predates @Startup support, so it's probably just a
case of adding new logic at the bottom of a method somewhere.

Even though the relationship is not documented, it is also not likely
to change, in case some other group of developers have written code in
expectation of the current order.

BTW, it's not a problem if an @EagerLoad-ed service injects and
invokes methods on some other service; the other service will simply
be created as needed.  Thus you can use @EagerLoad pretty sparingly.

The intention of @EagerLoad as to support services whose lifecycle was
driven by factors outside of the IoC container: i.e., the service
implementation listens on a port (like a web server), or recieves
messages via JMS, or something similar.

On Fri, Apr 20, 2012 at 12:42 AM, fmaylinch ferranmayli...@gmail.com wrote:
 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 @EagerLoads come
 before @Startup? Maybe to prevent people from using static services? ;-)

 Thanks a lot!
 On Apr 20, 2012 9:27 AM, Lance Java [via Tapestry] 
 ml-node+s1045711n565355...@n5.nabble.com wrote:

 Mutable static data is the root of all evil ;)

 Statics are (almost) impossible to mock and make testing and clustering
 very difficult. Is there any way you could refactor your code to use a
 singleton service instead of the static?

 You could then @EagerLoad the singleton service or initialize it in a
 @Startup method and leave the other services to lazy load.


 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://tapestry.1045711.n5.nabble.com/Why-EagerLoad-services-come-before-Startup-methods-tp5651302p5653558.html
  To unsubscribe from Why @EagerLoad services come before @Startup
 methods?, click 
 herehttp://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=5651302code=ZmVycmFubWF5bGluY2hAZ21haWwuY29tfDU2NTEzMDJ8LTIwNzk2MDg1MzA=
 .
 NAMLhttp://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml



 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/Why-EagerLoad-services-come-before-Startup-methods-tp5651302p5653577.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org