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
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
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
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
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,
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
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
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
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
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
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
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
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:
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
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
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
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
"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
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
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
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
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
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
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
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-
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();
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(
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]
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
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
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
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().
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
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
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
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
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
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
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
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
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
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
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
;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
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
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
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
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
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
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
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
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
: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
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
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
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
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
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
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
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.
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
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
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
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,
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
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
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
> 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
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
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
] 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
---
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
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
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
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
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
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
77 matches
Mail list logo