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

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
There's really 3 options: 1. Use the HttpSession 2. Save to the database and pass ids (perhaps a staging table or status= temp) 3. Store values on the client (hidden fields, data attributes, javascript variables, activation context, request parameters) On 14 Aug 2014 16:26, "squallmat ." wrote:

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
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.. I usually have one @Persist'ed object being edited by my page. This object had, within it, all the values that

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

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

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-and-later-ajax-

Re: Best practice activation context and later ajax calls

2012-11-13 Thread nquirynen
Ok it works with the onPassivate in this case: void onActivate(int policyId) { if(policy == null) { policy = policyRepository.get(policyId); } } int onPassivate() { return policy.getId();

Re: Best practice activation context and later ajax calls

2012-11-12 Thread Lance Java
Chris is right, if you include an onPassivate() with your policy/policyId there is no need to pass it in the ajax event as it tapestry will implicitly populate the value for you. You might also want to consider the @PageActivationContext annotation which takes care of onActivate() and onPassivate(

Re: Best practice activation context and later ajax calls

2012-11-12 Thread Lance Java
I always avoid @Persist as it makes your webapp far more scalable. In this example, you can pass policyId as an event context to all of the ajax events on your page. eg: void onMyEvent(int policyId) { policy = policyRepository.get(policyId); } A better idea is to configure a ValueEncoder [1]

Re: Best practice activation context and later ajax calls

2012-11-12 Thread Chris Poulsen
Hi, Have you checked out: http://tapestry.apache.org/page-navigation.html To see if "onPassivate" or providing an explicit activation context can help you -- Chris On Mon, Nov 12, 2012 at 4:20 PM, nquirynen wrote: > Hi > > I have a page with an activation context: > > void onActivate(int poli

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

2012-11-01 Thread Lance Java
This is not really a tapestry question. Here's the standard maven project layout http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html Any files under src/main/resources will be available on the classpath (eg Classloader.getResrouceAsStream(...)) Any files

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: 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
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(). But I'm curious about the original statement, "Generics are d

Re: Best Practice for flash Messages?

2011-01-06 Thread Thiago H. de Paula Figueiredo
This looks like an application-wide problem, so I'd create a service that stored the messages in the Session with two methods. One would get the messages and removes them from the Session, remove them from the Session and then return them. The other one would store these messages into the S

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

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
Would it be possible for you to share that code with us? I don't necessarily want to use that approach, but it would be very helpful to see how you implemented it. Inge On Tue, Dec 8, 2009 at 9:10 AM, DH wrote: > Once I found it difficult too, and I never used EventContext because I > think it

Re: Best practice for initializing page to default context

2009-12-08 Thread DH
Once I found it difficult too, and I never used EventContext because I think it is not better than multiple onActivate. Finally I wrote my own PageActivationContext called PageActivationUnit, the difference is that PageActivationContext only can occur once, but PageActivationUnit can be used i

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

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
Hi Kai, I use a layout component for every of my pages (look here:http://tapestry.apache.org/tapestry5.1/guide/layout.html). So this seems to be a good place to include the stylesheet. I use a single file for my hole app. Regards, nillehammer == http://www.winfonet.eu - original Nachrich

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, Integer sit

Re: best practice

2008-05-14 Thread Josh Canfield
> onActivate (this.entity is not null) > @OnEvent(component = "parameterEditor") void doDeleteParameter(long id); > the list element removed but the entity not persisted. > onActivate (this.entity is null and re-readed from database) > > are there any suggestions to prevent the re-reading of the en

RE: Best practice for new/edit object page?

2006-07-16 Thread Jim Steinberger
Quick update on this: If you're persisting the ID of an entity so you don't have to embed it in the page (the main conclusion from this thread), the pseudocode I used before with regard to the pageBeginRender implementation has two potential gotchas in it (found so far). To refresh, I said: "Have

RE: Best practice for new/edit object page?

2006-07-10 Thread Jim Steinberger
s ^_^ Jim -Original Message- From: Jesse Kuhnert [mailto:[EMAIL PROTECTED] Sent: Monday, July 10, 2006 2:50 PM To: Tapestry users Subject: Re: Best practice for new/edit object page? No that's true, hibernate will only update members that have changed. They modify all of your clas

Re: Best practice for new/edit object page?

2006-07-10 Thread Jesse Kuhnert
] On Behalf Of Malin Ljungh Sent: Monday, July 10, 2006 2:23 PM To: Tapestry users Subject: Re: Best practice for new/edit object page? Thank you. Especially Jim, you have understood my "problem" perfectly! The thing is I have a hibernate OR-mapping with lots of relationships and attrib

RE: Best practice for new/edit object page?

2006-07-10 Thread Jim Steinberger
--- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Malin Ljungh Sent: Monday, July 10, 2006 2:23 PM To: Tapestry users Subject: Re: Best practice for new/edit object page? Thank you. Especially Jim, you have understood my "problem" perfectly! The thing is I have a hibern

RE: Best practice for new/edit object page?

2006-07-10 Thread Gentry, Michael \(Contractor\)
session page.) /dev/mrg -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Malin Ljungh Sent: Monday, July 10, 2006 2:23 PM To: Tapestry users Subject: Re: Best practice for new/edit object page? Thank you. Especially Jim, you have understood my "problem&quo

Re: Best practice for new/edit object page?

2006-07-10 Thread Malin Ljungh
Thank you. Especially Jim, you have understood my "problem" perfectly! The thing is I have a hibernate OR-mapping with lots of relationships and attributes which the user should not edit or see at all in the edit page. I think I'll use your #3 - keeping the ID in the session using @Persist and re

Re: Best practice for new/edit object page?

2006-07-10 Thread Andreas Bulling
On 10. Jul 2006 - 11:21:49, Gentry, Michael (Contractor) wrote: | The down side to embedding database IDs in your HTML form is they can be | changed by the user before POSTing them back to your application, which | can cause all sorts of problems. Exactly, this creates _really huge_ security issue

RE: Best practice for new/edit object page?

2006-07-10 Thread Gentry, Michael \(Contractor\)
PM To: Tapestry users Subject: RE: Best practice for new/edit object page? Hi Malin, Here are my thoughts: 1. Embedding the ID into the page (along with every other property of the entity). Benefit: After the rewind phase sets all the OGNL-mapped properties to your page-property-object, you

RE: Best practice for new/edit object page?

2006-07-09 Thread Jim Steinberger
Hi Malin, Here are my thoughts: 1. Embedding the ID into the page (along with every other property of the entity). Benefit: After the rewind phase sets all the OGNL-mapped properties to your page-property-object, you can simply pass that object directly to the service/persistence layers to be s