Re: Best practice for health check URL?

2021-12-07 Thread Thiago H. de Paula Figueiredo
On Mon, Dec 6, 2021 at 1:25 PM JumpStart < geoff.callender.jumpst...@gmail.com> wrote: > I think you’d want to make it a configuration option, so that development > can still come up quickly, but that sounds great for production. > Yes, my mental plan is to have it configurable, probably on by de

Re: Best practice for health check URL?

2021-12-06 Thread Dmitry Gusev
Hi Geoff, I extracted all the important bits from our implementation into this gist: https://gist.github.com/dmitrygusev/486ad56174450299b94cc364d3630b28 I'd start exploring it from here: https://gist.github.com/dmitrygusev/486ad56174450299b94cc364d3630b28#file-eagerloadresourceimpl-java-L94 I

Re: Best practice for health check URL?

2021-12-06 Thread JumpStart
I think you’d want to make it a configuration option, so that development can still come up quickly, but that sounds great for production. I’ve spent some time bouncing between Dmitry and Ben’s approaches. With the latter I simplified it with Jsoup, but there are considerable limitations to wha

Re: Best practice for health check URL?

2021-12-03 Thread Thiago H. de Paula Figueiredo
Hi! Today I started wondering about how we could get Tapestry to run under Quarkus.io, including generating a native executable. Of course, this won't include bytecode generated in runtime, something many libraries and frameworks do, Tapestry very much included. Then I researched a bit and found t

Re: Best practice for health check URL?

2021-11-30 Thread JumpStart
Hi Ben, This is all truly great to know. I think I may draw ideas from both yours and Dmitry’s response. Thank you, Geoff > On 30 Nov 2021, at 4:40 pm, Ben Weidig wrote: > > Hi Geoff, > > we have a multi-tenant/-domain multi-language site that required pre-heated > servers after deployment,

Re: Best practice for health check URL?

2021-11-30 Thread Dmitry Gusev
Hi Geoff, RESTEasy services are singletons, so we simply created an `AtomicReference` field and used `compareAndSet()`, something like this: private final AtomicReference warmUpStatus = new AtomicReference<>(WarmUpStatus.EMPTY); @Override public Response warmUp() { if (warmUpStatus.compareA

Re: Best practice for health check URL?

2021-11-30 Thread Ben Weidig
Hi Geoff, we have a multi-tenant/-domain multi-language site that required pre-heated servers after deployment, so we created a WarmupTaskRunner to run at startup, which gets contributed different kinds of tasks. They can either be blocking or just run in the background, depending on what they do

Re: Best practice for health check URL?

2021-11-29 Thread JumpStart
Hi Dmitry, That is spectacularly helpful! We’re about to write a headless smoke test anyway that will visit every page. Do you see any downside to using that to do the warmup? Where do you keep your shared “warmup in progress” flag so that it is rapidly accessible on every health check request

Re: Best practice for health check URL?

2021-11-29 Thread Dmitry Gusev
Hi Geoff, I don't think there's a simpler way, we're doing something similar. We created a REST endpoint with tynamo-resteasy which is effectively a load balancer health check. On the first hit it starts the warmup process on the same request, following requests return an error instantly if the i

Best practice for health check URL?

2021-11-29 Thread JumpStart
Any suggestions on best ways to write a “health check” page to be called by load balancers? My app is getting big, and the traffic is big. If the app fails (hopefully never, but it’s a JVM) and the traffic is heavy enough, startup never seems to complete - every request times out, the app log g

Re: Design / Best Practice on Multinational App

2015-03-23 Thread Geoff Callender
In your example you mention addresses, but they vary by country, not region. For that reason it's common, in address input, to select country first and adapt the rest of the fields below it to suit. I'd be much more inclined to make components that adapt to the user/request than to have multiple

Re: Design / Best Practice on Multinational App

2015-03-23 Thread Adam X
I chose to go with approach I've seen done before. Common base and regional forks as needed. On Fri, Mar 20, 2015 at 3:39 PM, Adam X wrote: > What's the best approach for a single build of an app with global > presence? I'm not asking for localisation, but subtle functional > differences. Some e

Design / Best Practice on Multinational App

2015-03-20 Thread Adam X
What's the best approach for a single build of an app with global presence? I'm not asking for localisation, but subtle functional differences. Some examples are Address entity bean, which requires a state for some countries, but not for the others. Do I build separate Address bean for each region

Re: best practice for persisting fields

2014-08-15 Thread Lance Java
Actually... on second thought you can't return null from add since tapestry needs to render the empty record. Try this instead: eg: ... public class NullNewValueEncoder implements ValueEncoder { private static final String CLIENT_NULL = "XXX"; private ValueEncoder encoder; private Class

Re: best practice for persisting fields

2014-08-15 Thread Geoff Callender
I agree with Thiago: "My best practices for persisting fields is this: just do it when there's no way of avoiding it." Most JumpStart examples avoid @Persist. The reasons are given in the "Caution" section of this page: http://jumpstart.doublenegative.com.au/jumpstart7/examples/state/s

Re: best practice for persisting fields

2014-08-15 Thread Lance Java
Thinking about this a bit more, you can probably avoid @Persist by using an appropriate ValueEncoder. eg: ... public class LazyValueEncoder implements ValueEncoder { private static final String CLIENT_NULL = "XXX"; private ValueEncoder encoder; private Class type; public LazyValueEnco

Re: best practice for persisting fields

2014-08-14 Thread Lance Java
a form you failed submit before and you > see a part of old-entered values or fiels of an ajaxformloop still there. > > I would like to know if there is a method, a best practice, to handle the > submitting persistence of values that are not link to simple String > Property. > > Thanks in advance. >

Re: best practice for persisting fields

2014-08-14 Thread Thiago H de Paula Figueiredo
On Thu, 14 Aug 2014 12:55:46 -0300, Muhammad Gelbana wrote: What version are you using ? This will make a difference because prior to v5.4 (I think ?) tapestry used to redirect after posing a form, so persisting some fields were sometimes needed.. 5.4 still redirects after posting a form *w

Re: best practice for persisting fields

2014-08-14 Thread Muhammad Gelbana
when you come back later to a form you failed submit before and you > see a part of old-entered values or fiels of an ajaxformloop still there. > > I would like to know if there is a method, a best practice, to handle the > submitting persistence of values that are not link to simple String > Property. > > Thanks in advance. >

Re: best practice for persisting fields

2014-08-14 Thread Thiago H de Paula Figueiredo
On Thu, 14 Aug 2014 12:25:40 -0300, squallmat . wrote: Hi, Hi! My best practices for persisting fields is this: just do it when there's no way of avoiding it. each time on a submit failed the field values associated to a simple string persist without requiring @Persist annotation. Bu

best practice for persisting fields

2014-08-14 Thread squallmat .
values or fiels of an ajaxformloop still there. I would like to know if there is a method, a best practice, to handle the submitting persistence of values that are not link to simple String Property. Thanks in advance.

Re: Best practice for managing JS dependencies in a component project?

2013-07-23 Thread Thiago H de Paula Figueiredo
On Tue, 23 Jul 2013 19:00:52 -0300, George Ludwig wrote: "And be the first to write an open-source component library on the top of Raphael. " I might just do that, I'm getting good at wrapping JS librairies :) Nice! :) Don't forget the post the URL when it's done. ;) -- Thiago H. de Paula

Re: Best practice for managing JS dependencies in a component project?

2013-07-23 Thread George Ludwig
"And be the first to write an open-source component library on the top of Raphael. " I might just do that, I'm getting good at wrapping JS librairies :) On Tue, Jul 23, 2013 at 2:10 PM, Thiago H de Paula Figueiredo < thiag...@gmail.com> wrote: > On Tue, 23 Jul 2013 18:01:17 -0300, George Ludwig

Re: Best practice for managing JS dependencies in a component project?

2013-07-23 Thread Thiago H de Paula Figueiredo
On Tue, 23 Jul 2013 18:01:17 -0300, George Ludwig wrote: The jQuery stuff turns out to be fine, I just include the tap5-jquery project and that seems to fix that. But since no one has ported Raphael.js to Tapestry, There's no such thing as porting JavaScript code to Tapestry. tap5-jquery

Re: Best practice for managing JS dependencies in a component project?

2013-07-23 Thread Thiago H de Paula Figueiredo
On Tue, 23 Jul 2013 17:36:09 -0300, George Ludwig wrote: I'm on 5.3...is 5.4 stable enough to use? I forgot to mention: in 5.4, JavaScript dependencies are handled by RequireJS. For 5.3, I guess the best solution would be to use tapestry5-jquery in your projects, probably as a depende

Re: Best practice for managing JS dependencies in a component project?

2013-07-23 Thread George Ludwig
The jQuery stuff turns out to be fine, I just include the tap5-jquery project and that seems to fix that. But since no one has ported Raphael.js to Tapestry, I put that in my assert folder. But it makes me pause to think about how to better handle these things. I suppose it's not worth worrying ab

Re: Best practice for managing JS dependencies in a component project?

2013-07-23 Thread Thiago H de Paula Figueiredo
On Tue, 23 Jul 2013 17:36:09 -0300, George Ludwig wrote: I'm on 5.3...is 5.4 stable enough to use? It's still an alpha, so I don't think it's ready for production for very serious stuff yet. Of course, if you have a process which includes lots of testing, automated and non-automated, th

Re: Best practice for managing JS dependencies in a component project?

2013-07-23 Thread George Ludwig
I'm on 5.3...is 5.4 stable enough to use? On Tue, Jul 23, 2013 at 12:48 PM, Thiago H de Paula Figueiredo < thiag...@gmail.com> wrote: > What Tapestry version? The answer will be different for 5.3 or 5.4. > > > On Tue, 23 Jul 2013 15:59:16 -0300, George Ludwig > wrote: > > I'm working on a comp

Re: Best practice for managing JS dependencies in a component project?

2013-07-23 Thread Thiago H de Paula Figueiredo
What Tapestry version? The answer will be different for 5.3 or 5.4. On Tue, 23 Jul 2013 15:59:16 -0300, George Ludwig wrote: I'm working on a component project that integrates a JS library with Tapestry. The library has a couple of external dependencies: jQuery, Raphael, as well as it's own

Best practice for managing JS dependencies in a component project?

2013-07-23 Thread George Ludwig
I'm working on a component project that integrates a JS library with Tapestry. The library has a couple of external dependencies: jQuery, Raphael, as well as it's own CSS file. My question is, what is the best way to handle these dependencies? Do I just put the .js and .css in an asset directory (

Re: Best practice activation context and later ajax calls

2012-11-13 Thread Lance Java
I'm guessing that you render the "recalculate" zone by submitting another form... correct? If so, you could include the values from the first calculate as in the second form. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Best-practice-activation-context

Re: Best practice activation context and later ajax calls

2012-11-13 Thread nquirynen
calculated values from the initial calculation. Now I don't see another way than to @Persist these values to use them, or is there a better/other way? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Best-practice-activation-context-and-later-ajax-calls-tp5717936p5717966

Re: Best practice activation context and later ajax calls

2012-11-12 Thread Lance Java
(). Assuming you have a ValueEncoder configured, you can do the following: @PageActivationContext private Policy policy; -- View this message in context: http://tapestry.1045711.n5.nabble.com/Best-practice-activation-context-and-later-ajax-calls-tp5717936p5717941.html Sent from the Tapestry

Re: Best practice activation context and later ajax calls

2012-11-12 Thread Lance Java
; } [1] http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ValueEncoder.html -- View this message in context: http://tapestry.1045711.n5.nabble.com/Best-practice-activation-context-and-later-ajax-calls-tp5717936p5717939.html Sent from the Tapestry - User mailing list archive at

Re: Best practice activation context and later ajax calls

2012-11-12 Thread Chris Poulsen
lso in your AJAX calls? > Do you use @Persist, or maybe just write getter methods and retrieve them > again every request? > > > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Best-practice-activation-context-and-l

Best practice activation context and later ajax calls

2012-11-12 Thread nquirynen
your AJAX calls? Do you use @Persist, or maybe just write getter methods and retrieve them again every request? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Best-practice-activation-context-and-later-ajax-calls-tp5717936.html Sent from the Tapestry - User mailing

Re: Best practice to store other languages files or I don't understand?

2012-11-01 Thread Lance Java
estry.1045711.n5.nabble.com/Best-practice-to-store-other-languages-files-or-I-don-t-understand-tp5717488p5717490.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-uns

Best practice to store other languages files or I don't understand?

2012-10-31 Thread bigcache1
would be appreciated. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Best-practice-to-store-other-languages-files-or-I-don-t-understand-tp5717488.html Sent from the Tapestry - User mailing list archive at Nabble.com. ---

Re: Best practice for deploy tapestry app on nginx and tomcat 7

2011-12-28 Thread Kalle Korhonen
On Wed, Dec 28, 2011 at 7:39 PM, Yohan Yudanara wrote: > I've read somewhere on the internet about deploying application on nginx as > front end server for tomcat. > They say that we better use nginx to serve static content and tomcat for > dynamic content. > Is it true that having nginx/apache as

Re: t5: create a record from another table, what is best practice?

2011-04-16 Thread Taha Hafeez
s message in context: > http://tapestry.1045711.n5.nabble.com/t5-create-a-record-from-another-table-what-is-best-practice-tp4307107p4307173.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > -

Re: t5: create a record from another table, what is best practice?

2011-04-16 Thread Angelo C.
Hi, Thanks, but how to pass a string to prepareForRender? -- View this message in context: http://tapestry.1045711.n5.nabble.com/t5-create-a-record-from-another-table-what-is-best-practice-tp4307107p4307173.html Sent from the Tapestry - User mailing list archive at Nabble.com

Re: t5: create a record from another table, what is best practice?

2011-04-16 Thread Taha Hafeez
session.save(p); >} > > } > > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/t5-create-a-record-from-another-table-what-is-best-practice-tp4307107p4307107.html > Sent from the Tapestry - User mailing list archive at Nabble.com

t5: create a record from another table, what is best practice?

2011-04-16 Thread Angelo C.
ew Profile(); p.setEmail(email); p.setName(name); session.save(p); } } -- View this message in context: http://tapestry.1045711.n5.nabble.com/t5-create-a-record-from-another-table-what-is-best-practice-tp4307107p4307107.html Sent from the Tapestry - Us

Re: Best Practice for flash Messages?

2011-01-06 Thread Thiago H. de Paula Figueiredo
On Thu, 06 Jan 2011 21:26:32 -0200, Bryan Lewis wrote: Interesting idea, I plan to try it... I've had occasional difficulties getting the built-in persistence methods to work just right. If I use flash, the message doesn't always survive the redirect, say if I return null from onSuccess().

Re: Best Practice for flash Messages?

2011-01-06 Thread Bryan Lewis
e Session. > > > > On Thu, 06 Jan 2011 14:25:08 -0200, Pierce Wetter > wrote: > > What's the best practice for pushing and displaying "flash" messages? >> It's easy enough for me to add an variable for this: >> >> @Persist("flash") &g

Re: Best Practice for flash Messages?

2011-01-06 Thread Thiago H. de Paula Figueiredo
o the Session. On Thu, 06 Jan 2011 14:25:08 -0200, Pierce Wetter wrote: What's the best practice for pushing and displaying "flash" messages? It's easy enough for me to add an variable for this: @Persist("flash") List messages; along with associated displ

Best Practice for flash Messages?

2011-01-06 Thread Pierce Wetter
What's the best practice for pushing and displaying "flash" messages? It's easy enough for me to add an variable for this: @Persist("flash") List messages; along with associated display HTML to my layout component, but then getting access to the current layout

Re: Best practice, converting a text field value

2010-12-07 Thread Paul Stanton
Kai, are you using 5.2? how did you configure your translators? On 7/12/2010 9:46 PM, Kai Weber wrote: Hi, the user provided input from a TextField/TextArea component should be cleaned from HTML tags. No validation is needed, the requirements are just "remove the HTML", display the result to th

Re: Best practice, converting a text field value

2010-12-07 Thread Thiago H. de Paula Figueiredo
On Tue, 07 Dec 2010 08:46:13 -0200, Kai Weber wrote: Hi, Hi! the user provided input from a TextField/TextArea component should be cleaned from HTML tags. No validation is needed, the requirements are just "remove the HTML", display the result to the user. The first variant I tried is a T

Best practice, converting a text field value

2010-12-07 Thread Kai Weber
Hi, the user provided input from a TextField/TextArea component should be cleaned from HTML tags. No validation is needed, the requirements are just "remove the HTML", display the result to the user. The first variant I tried is a Translator. This solution works but because there are other possib

Re: T5 AppModule best practice

2010-08-27 Thread based2
search.x=5&search.y=6&la=Java&li=*&scope= http://tapestrymigration.blogspot.com/2010/04/tapestry-5-wont-find-or-use-my.html -- View this message in context: http://tapestry.1045711.n5.nabble.com/T5-AppModule-best-practice-tp2403148p2740618.html S

Re: T5 AppModule best practice

2010-07-29 Thread based2
/cleverpig >> Twitter: twitter.com/cleverpig >> 新浪微博: t.sina.com.cn/cleverpig >> Organization: www.beijing-open-party.org >> or...@facebook: http://www.facebook.com/group.php?gid=8159558294 >> >> --

Re: T5 AppModule best practice

2010-07-24 Thread based2
rpig > 新浪微博: t.sina.com.cn/cleverpig > Organization: www.beijing-open-party.org > or...@facebook: http://www.facebook.com/group.php?gid=8159558294 > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional comma

T5 AppModule best practice

2010-07-23 Thread cleverpig
Let's share a lot of that which was used in your project? I've been looking for documentation about how the AppModule class works. Sadly, I have only found a few examples of bind/contribute and build methods, but nothing that explains when and what to use. It sounds bad for newbies. PS: http://t

Re: Zoneupdater mixin best practice

2010-07-23 Thread Stefan Hagström
H. de Paula Figueiredo" > To: "Tapestry users" > Sent: Friday, 23 July, 2010 15:49:03 GMT +02:00 Athens, Beirut, Bucharest, > Istanbul > Subject: Re: Zoneupdater mixin best practice > > On Fri, 23 Jul 2010 07:40:18 -0300, Peter Stavrinides > wrote: > >

Re: Zoneupdater mixin best practice

2010-07-23 Thread Peter Stavrinides
n someone suggest an example please Cheers, Peter - Original Message - From: "Thiago H. de Paula Figueiredo" To: "Tapestry users" Sent: Friday, 23 July, 2010 15:49:03 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: Zoneupdater mixin best practice On Fri, 23 J

Re: Zoneupdater mixin best practice

2010-07-23 Thread Thiago H. de Paula Figueiredo
On Fri, 23 Jul 2010 07:40:18 -0300, Peter Stavrinides wrote: Hi all, Hi! To be more specific, I am using the Zoneupdater (code below) with a zone that encloses a form, and the form encloses several textfields. For my use case I only want to target one specific form element but don't kn

Zoneupdater mixin best practice

2010-07-23 Thread Peter Stavrinides
Hi all, I am trying out the Zoneupdater mixin on a dropdown. What I want to do is as follows: When the user selects an option from the dropdown I want to trigger an event that filters a list, which is then used on an autocomplete textfield. Sounds simple enough but I don't quite understanding

Re: Best practice for initializing page to default context

2009-12-09 Thread Kalle Korhonen
Opened https://issues.apache.org/jira/browse/TAP5-948 for it. Kalle On Tue, Dec 8, 2009 at 11:24 AM, Kalle Korhonen wrote: > On Tue, Dec 8, 2009 at 10:59 AM, Howard Lewis Ship wrote: >> I've had to solve this problem for one of my clients as well and I >> think it's something that should go int

Re: Best practice for initializing page to default context

2009-12-08 Thread Kalle Korhonen
Yes, I agree with that Norman. That's sort of what I implied when I said that I "always link to pages with initial context already set" - i.e. the reverse works better - re-initialize the page if a specific context is set. That's one way, what Howard suggests is another (identify page internal link

Re: Best practice for initializing page to default context

2009-12-08 Thread Norman Franke
I implemented a somewhat similar approach for search using an even more basic approach. Most of my search fields are @Persisted, but I still needed a way to know when to reset the search dialog. I ended up creating a new context parameter, consisting of the string "reset". Every time I want

Re: Best practice for initializing page to default context

2009-12-08 Thread Kalle Korhonen
On Tue, Dec 8, 2009 at 10:59 AM, Howard Lewis Ship wrote: > I've had to solve this problem for one of my clients as well and I > think it's something that should go into the framework.  The approach > I took was to identify self-referential links (page render links that > are to the same page they

Re: Best practice for initializing page to default context

2009-12-08 Thread Howard Lewis Ship
I've had to solve this problem for one of my clients as well and I think it's something that should go into the framework. The approach I took was to identify self-referential links (page render links that are to the same page they originate from) using an additional query parameter. This allows T

Re: Best practice for initializing page to default context

2009-12-08 Thread Thiago H. de Paula Figueiredo
Em Tue, 08 Dec 2009 16:23:37 -0200, ningdh escreveu: Hi, Thiago Hi! What Kalle and I concern is the onActivate must come first before onPassivate, so if page A links to page B, A must set the context of B first, right? In this case, onActivate() is not invoked, so A must invoke one or

Re: Best practice for initializing page to default context

2009-12-08 Thread ningdh
Hi, Thiago - Original Message - From: "Thiago H. de Paula Figueiredo" To: "Tapestry users" Sent: Wednesday, December 09, 2009 2:09 AM Subject: Re: Best practice for initializing page to default context > Em Tue, 08 Dec 2009 15:49:15 -0200, Kalle Korhonen

Re: Best practice for initializing page to default context

2009-12-08 Thread Kalle Korhonen
;Kalle Korhonen" > To: "Tapestry users" > Sent: Wednesday, December 09, 2009 1:49 AM > Subject: Re: Best practice for initializing page to default context > > >> On Tue, Dec 8, 2009 at 3:39 AM, Thiago H. de Paula Figueiredo >> wrote: >>> Em Tue, 08 Dec 2

Re: Best practice for initializing page to default context

2009-12-08 Thread Thiago H. de Paula Figueiredo
Em Tue, 08 Dec 2009 15:49:15 -0200, Kalle Korhonen escreveu: DH's approach looks interesting, but maybe a bit involving with field names encoded to the url. Thiago, I know it's the recommended approach but I'm just saying it doesn't strike me as the ideal approach. The ideal solution always

Re: Best practice for initializing page to default context

2009-12-08 Thread ningdh
rchpage/cat-VALUE I like this style a lot and use heavily in my multiple projects. DH - Original Message - From: "Kalle Korhonen" To: "Tapestry users" Sent: Wednesday, December 09, 2009 1:49 AM Subject: Re: Best practice for initializing page to default context &g

Re: Best practice for initializing page to default context

2009-12-08 Thread Kalle Korhonen
On Tue, Dec 8, 2009 at 3:39 AM, Thiago H. de Paula Figueiredo wrote: > Em Tue, 08 Dec 2009 04:22:58 -0200, Kalle Korhonen > escreveu: >> and subsequently, if my page has multiple entry points, I typically >> resort to implementing it in a single onActivate(EventContext >> eventContext) operation

Re: Best practice for initializing page to default context

2009-12-08 Thread NingDH
rcer typeCoercer) { configuration.add("PageActivationUnit", new PageActivationUnitWorker(typeCoercer), "before:OnEvent"); } That's all. One disadvantage is that you can't use primitive type for param field, so use Integer instead of int. DH http://www.gaonline.com.cn

Re: Best practice for initializing page to default context

2009-12-08 Thread Thiago H. de Paula Figueiredo
Em Tue, 08 Dec 2009 04:22:58 -0200, Kalle Korhonen escreveu: and subsequently, if my page has multiple entry points, I typically resort to implementing it in a single onActivate(EventContext eventContext) operation containing a big if-else clause. That's the recommended way when you have a

Re: Best practice for initializing page to default context

2009-12-08 Thread DH
rcer typeCoercer) { configuration.add("PageActivationUnit", new PageActivationUnitWorker(typeCoercer), "before:OnEvent"); } That's all. One disadvantage is that you can't use primitive type for param field, so use Integer instead of int. DH http://www.gaonline.com.cn

Re: Best practice for initializing page to default context

2009-12-08 Thread Inge Solvoll
ine.com.cn > > - Original Message - > From: "Kalle Korhonen" > To: "Tapestry users" > Sent: Tuesday, December 08, 2009 2:22 PM > Subject: Best practice for initializing page to default context > > > > Most things in T5 are delightfully simple,

Re: Best practice for initializing page to default context

2009-12-08 Thread DH
To: "Tapestry users" Sent: Tuesday, December 08, 2009 2:22 PM Subject: Best practice for initializing page to default context > Most things in T5 are delightfully simple, but I find this > surprisingly difficult: how to best initialize a page to default > context (and redirect to it).

Best practice for initializing page to default context

2009-12-07 Thread Kalle Korhonen
Most things in T5 are delightfully simple, but I find this surprisingly difficult: how to best initialize a page to default context (and redirect to it). Imagine you have a search & result page. If I access the page without any context I want all records to be displayed. In onActivate() without par

Re: Best practice for database notifications?

2009-11-18 Thread Kalle Korhonen
:48:03 GMT +02:00 Athens, Beirut, > Bucharest, Istanbul > Subject: Re: Best practice for database notifications? > > Thanks Thiago. Yes, 2nd level cache is great for some use cases and I > use them whevever possible but not in this case - when this data > changes, the new data needs to

Re: Best practice for database notifications?

2009-11-18 Thread P . Stavrinides
Tuesday, 17 November, 2009 00:48:03 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: Best practice for database notifications? Thanks Thiago. Yes, 2nd level cache is great for some use cases and I use them whevever possible but not in this case - when this data changes, the new dat

Re: Best practice for database notifications?

2009-11-16 Thread Kalle Korhonen
Thanks Thiago. Yes, 2nd level cache is great for some use cases and I use them whevever possible but not in this case - when this data changes, the new data needs to picked up immediately. Evicting the cache doesn't give me much more - I still need to add in the logic to evict it - although, a conf

Re: Best practice for database notifications?

2009-11-16 Thread Thiago H. de Paula Figueiredo
What about using a second-level cache in Hibernate and configure it to live for a couple hours? You can also use the SessionFactory methods that clear the second level cache programatically: evict(Class persistentClass) and evictQueries(String cacheRegion). -- Thiago H. de Paula Figueiredo

Best practice for database notifications?

2009-11-16 Thread Kalle Korhonen
operate on the same data. I could use the same or as a simple hack, I could just inject the service and update it on the page/service that handles the edit transaction. However, as a generic best practice, I wonder if somebody's already built something for this - for example a configurable Hib

Re: Your best practice for - list view + detail view

2009-08-19 Thread Marcus Veloso
Hi, /book/ (for search and list) /book/detail/4711 (crud without "c") /book/detail/(create) Marcus

Re: Your best practice for - list view + detail view

2009-08-19 Thread Thiago H. de Paula Figueiredo
Em Wed, 19 Aug 2009 17:32:47 -0300, Sebastian Hennebrueder escreveu: Hello, Hi! I usually create two (or three, depending on the case) pages: /book/list (book.ListBook) /book/edit/id (book.EditBook) /book/view/id (book.ViewBook) (if needed) -- Thiago H. de Paula Figueiredo Independent Ja

Your best practice for - list view + detail view

2009-08-19 Thread Sebastian Hennebrueder
Hello, I frequently have the pattern list or search page to list all for example all books and a detail page book Before I used the following urls /book/list /book/4711 Do you create two pages or a single one? Which naming convention do you use for the pages? -- Best Regards / Viele Grüße Se

Re: Best practice unit testing pages and components

2009-06-23 Thread Paul Field
Hi Kai, > > How would I test a page or a component when a @Parameter is not accessible > > because of its need to be a private variable? As well as tests directly on the page/component object that you can do with Tapestry's TestBase class, you can also write tests that run a page through one o

Re: Best practice for CSS styling components

2009-06-22 Thread P . Stavrinides
style. Kind regards, Peter - Original Message - From: "Thiago H. de Paula Figueiredo" To: "Tapestry users" Sent: Tuesday, 23 June, 2009 01:44:51 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: Best practice for CSS styling components Em Mon, 22 J

Re: Best practice unit testing pages and components

2009-06-22 Thread Igor Drobiazko
Take a look into this class: http://tapestry.apache.org/tapestry5.1/apidocs/org/apache/tapestry5/ioc/test/TestBase.html The methods create, get and set are useful in tests. On Tue, Jun 23, 2009 at 12:19 AM, Kai Weber wrote: > How would I test a page or a component when a @Parameter is not acces

Re: Best practice unit testing pages and components

2009-06-22 Thread Thiago H. de Paula Figueiredo
Em Mon, 22 Jun 2009 19:19:27 -0300, Kai Weber escreveu: How would I test a page or a component when a @Parameter is not accessible because of its need to be a private variable? If the component is written by you, add a getter and a setter, probably with package visibility. -- Thiago H.

Re: Best practice for CSS styling components

2009-06-22 Thread Thiago H. de Paula Figueiredo
Em Mon, 22 Jun 2009 19:22:35 -0300, Kai Weber escreveu: Hi, Hi! I am searching for a good way to style my components. How would I do that? I found that adding the CSS directly to the component class (with @IncludeStylesheet) makes page specific changes to a component hard due the loa

Re: Best practice for CSS styling components

2009-06-22 Thread nille hammer
Nachricht Betreff: Best practice for CSS styling components Gesendet: Di, 23. Jun 2009 Von: Kai Weber > Hi, > > I am searching for a good way to style my components. How would I do that? > > I found that adding the CSS directly to the component class (with > @IncludeStyl

Best practice for CSS styling components

2009-06-22 Thread Kai Weber
Hi, I am searching for a good way to style my components. How would I do that? I found that adding the CSS directly to the component class (with @IncludeStylesheet) makes page specific changes to a component hard due the loading order of the stylesheets (page's css comes before the component'

Best practice unit testing pages and components

2009-06-22 Thread Kai Weber
How would I test a page or a component when a @Parameter is not accessible because of its need to be a private variable? I want to test my pages and components with unit tests as I do with my service classes. Regards, Kai -

Re: T5: Best practice for rendering a dynamic component

2008-12-09 Thread mad7777
>> > > org.foo.pages.Start does not contain an embedded component with id >> > > 'apple'. >> > > >> > > Does it expect me to have a tag in the page even though >> I'm >> > > delegating the rend

Re: Best practice for onActivate and onPassivate without persistence

2008-11-05 Thread Peter Stavrinides
thanks guys! - Original Message - From: "Geoff Callender" <[EMAIL PROTECTED]> To: "Tapestry users" Sent: Wednesday, 5 November, 2008 2:52:35 PM GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: Best practice for onActivate and onPassivate

Re: Best practice for onActivate and onPassivate without persistence

2008-11-05 Thread Geoff Callender
http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/state/passingdatabetweenpages1 http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/navigation/onactivateandonpassivate/3 On 06/11/2008, at 12:15 AM, Thiago H. de Paula Figueiredo wrote: Em Wed, 05 Nov 2008 04:56:21 -0300,

Re: Best practice for onActivate and onPassivate without persistence

2008-11-05 Thread Thiago H. de Paula Figueiredo
Em Wed, 05 Nov 2008 04:56:21 -0300, Peter Stavrinides <[EMAIL PROTECTED]> escreveu: Thanks Thiago, its good to know its not using serialization, but the question remains, how does onPassivate retain those values? I doesn't. onPassivate returns the activation context for that page. This co

Re: Best practice for onActivate and onPassivate without persistence

2008-11-04 Thread Peter Stavrinides
ROTECTED]> To: "Tapestry users" Sent: Tuesday, 4 November, 2008 4:46:25 PM GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: Best practice for onActivate and onPassivate without persistence Em Tue, 04 Nov 2008 09:31:36 -0300, Peter Stavrinides <[EMAIL PROTECTED]> esc

Re: Best practice for onActivate and onPassivate without persistence

2008-11-04 Thread Thiago H. de Paula Figueiredo
Em Tue, 04 Nov 2008 09:31:36 -0300, Peter Stavrinides <[EMAIL PROTECTED]> escreveu: Hi everyone, Hi! I was wandering about best practice for passing multiple parameters to a page without using persist in the mix. Take the following example: void onActivate(Integer companyId, I

Best practice for onActivate and onPassivate without persistence

2008-11-04 Thread Peter Stavrinides
Hi everyone, I was wandering about best practice for passing multiple parameters to a page without using persist in the mix. Take the following example: void onActivate(Integer companyId, Integer siteId) throws SQLException { _site = getSite(companyId,siteId); } CompanySite onPassivate

Re: Invalid requests - best practice?

2008-09-01 Thread Geoff Callender
Kalle, thanks for the suggestion. I'll add it in to the mix. Geoff On 29/08/2008, at 6:07 AM, Kalle Korhonen wrote: JMHO, but I think it depends on the case. In your product example, I'd let the page itself handle the error since it's relatively clear the user tried to access a non-existen

Re: Invalid requests - best practice?

2008-08-28 Thread Kalle Korhonen
JMHO, but I think it depends on the case. In your product example, I'd let the page itself handle the error since it's relatively clear the user tried to access a non-existent (possibly removed or non-authorized) product. For a completely random, non-existent url, I'd try to handle it as soon as po

  1   2   >