13 years dude 13 years
On Thu, 4 Jul 2019, 11:05 am Emmanuel Sowah, wrote:
> Lance,
>
> I am not hating Tapestry, I am only a messenger preaching the good news
> that the world has moved on and left behind antiquated frameworks like
> Tapestry. Even the founder, Howard
Emmanuel Sowah - I think you deserve some form of long service award.
You've been hating on Tapestry for over 13 years now. Way to hold a grudge
dude!
https://wiki.apache.org/tapestry/Tapestry5Trolls
On Wed, 19 Jun 2019, 10:18 am Emmanuel Sowah, wrote:
> Of course it's understandable that they
You might be interested in tapestry-atmosphere and tapestry-cometd. Each
project is a tapestry wrapper for an underlying websocket implementation.
The aim of each library is to integrate websocket / push functionality into
your tapestry app without requiring any javascript. Instead you can use
anno
There's tapestry-hibernate-core which only depends on tapestry-ioc.
tapestry-hibernate builds on top of this with web specific services
https://mvnrepository.com/artifact/org.apache.tapestry/tapestry-hibernate-core/5.4.3
On 9 May 2017 03:54, "Thomas Mayer" wrote:
> Hello Thiago,
>
> thanks for
tapestry-cometd uses tapestry-offline under the hood to fool tapestry into
believing it was invoked via a request / response when it was actually
invoked via websockets.
I'm guessing you are rendering a link in your websocket flow. You'll need
to provide a few extra symbols to render links includi
, and it settles this, I will use something else.
>
> Thanks for the help.
>
>
> -Original Message-
> From: Lance Java [mailto:lance.j...@googlemail.com]
> Sent: Thursday, April 6, 2017 18:21
> To: Tapestry users
> Subject: RE: Creating an org.apache.tapestry5.
Typically you'd use the tapestry dom only in production code (pages,
components, mixins etc)
For verifying html in selenium tests you'd usually use Jsoup or geb or
something or maybe even the java xml libraries. But not the tapestry dom
libraries.
On 6 Apr 2017 17:16, "Davide Vecchi" wrote:
>
Why on earth would you do that?
On 6 Apr 2017 16:20, "Davide Vecchi" wrote:
Hi everybody
I am writing a Selenium test to test a Tapestry 5.3.8 web app, and in that
test I retrieved the whole client-side page source into a String. It's a
regular HTML page generated by Tapestry. Nothing special a
That's incorrect. Tapestry pages / components are byte code transformed
such that properties are stored in PerThreadValue instances. In development
mode tapestry duplicates the values into the bean properties to make
debugging easier.
On 5 Apr 2017 09:30, "Ankit Jain" wrote:
> The problem you a
You'll need to set:
response.setHeader("Content-Disposition", "attachment; filename=" +
fileName);
See StreamResponse usage in PDFLink.onPdf() here
http://t5stitch-lazan.rhcloud.com/pdflinkdemo
On 7 Mar 2017 08:47, "Gopi, Sreela" wrote:
> Hello,
>
>Can anyone please tell me how to open a pd
If you want to avoid http session you could maintain a hidden text field on
the page which also gets posted alongside the checkboxes. The text field
contains a comma separated list of the checkbox ids (or maybe just a count
if index based naming convention)
On 23 Jan 2017 10:07 a.m., "Nathan Quiry
There's also the capture component
http://t5stitch-lazan.rhcloud.com/capturedemo
On 6 Jan 2017 5:17 p.m., "Nathan Quirynen"
wrote:
> Hey,
>
> I'm not sure with blocks, but I do know that Lance (Tapestry committer)
> made a library to render pages and compone
You should be able to use @InjectService assuming each has a unique id.
@InjectService("s1")
private MyService s1;
@InjectService("s2")
private MyService s2;
On 13 Dec 2016 7:31 a.m., "Andrus Adamchik" wrote:
> From what I gather Tapestry 5.4 still does not support parameterized
> se
Perhaps the observe mixin could help you?
http://t5stitch-lazan.rhcloud.com/observedemo
On 8 Dec 2016 11:22 p.m., "David Diaz" wrote:
> Hi guys,
>
> I was wondering if there was any way to submit a form without having a
> t:form component and retrieve the data being sent? (e.g ideally a map woul
I'm guessing it's similar to this?
https://github.com/uklance/tapestry-atmosphere/blob/master/tapestry-atmosphere/src/main/java/org/lazan/t5/atmosphere/services/TapestryAtmosphereObjectFactory.java
On 27 Oct 2016 9:12 p.m., "Norman Franke" wrote:
> I wanted to create a web chat application. I ba
using sessionless authentication (w/ JWT), you can pass the
> > bearer token around in the sub-protocol header,
> > namely Sec-WebSocket-Protocol (see
> > http://stackoverflow.com/questions/22383089/is-it-
> possible-to-use-bearer-
> > authentication-for-websocket-up
There's a chat demo in both tapestry-atmosphere and tapestry-cometd
Atmosphere
Demo: http://t5atmosphere-lazan.rhcloud.com/
Source:
https://github.com/uklance/tapestry-atmosphere/tree/master/tapestry-atmosphere-demo
Cometd
Demo: http://t5cometd-lazan.rhcloud.com/chat
Source:
https://github.com/uk
onActivate() will be invoked for GET and POST and even during link
generation (I think). You shouldn't do any "work" in this method. Better
yet, remove the method all together and use @PageActivationContext.
If you have "work" needed for render only you should use @SetupRender
On 27 Sep 2016 2:12
FYI one bonus of using @PageActivationContext is that you automatically
have onPassivate() generated for you. If you declare onActivate() you'll
need to do this yourself
On 20 Sep 2016 5:56 p.m., "Thiago H de Paula Figueiredo"
wrote:
> On Tue, 20 Sep 2016 13:24:08 -0300, Nathan Quirynen <
> nat.
Sorry... I spoke to soon. You want index=1 to be a string sometimes and a
long others? If you want to use @PageActivationContext you'll need to
declare as a string and parse to long yourself
On 20 Sep 2016 5:51 p.m., "Lance Java" wrote:
> You don't need explicit nu
ntext(index=3) private Long id2;
>
> How do I create links? Can I do this:
>
> yo
> bam
>
> ? Or do I have to explicitly pass null to keep indexes straight?
>
> yo
> bam
>
> Adam
>
> On Tue, Sep 20, 2016 at 6:34 PM, Lance Java
> wrote:
> >
Correction: This feature was added in 5.4 (not 5.3)
On 20 Sep 2016 5:29 p.m., "Lance Java" wrote:
> @PageActivationContext supports multiple values thanks to the new index
> property added in 5.3. Missing values will simply be null
>
> Eg:
> @PageActivationContext(index
@PageActivationContext supports multiple values thanks to the new index
property added in 5.3. Missing values will simply be null
Eg:
@PageActivationContext(index=0) private String value0;
@PageActivationContext(index=1) private String value1;
@PageActivationContext(index=2) private String value2;
Assuming foo is a property you could also do
t:context="[foo,'true']" or t:context="[foo,true]"
https://tapestry.apache.org/property-expressions.html
On 18 Sep 2016 11:13 a.m., "Bob Harner" wrote:
> Yes, that's the correct way to do it. I think you could also do
> t:context="foo,bar" if both f
If you want streaming updates to a page you might be interested in
tapestry-atmosphere or tapestry-cometd rather than 12 periodic updates on a
page.
https://github.com/uklance/tapestry-atmosphere
http://t5atmosphere-lazan.rhcloud.com/
https://github.com/uklance/tapestry-cometd
http://t5cometd-laz
http://tapestryjava.blogspot.co.uk/2013/12/tapestry-quicky-conditionalcomment.html
On 16 Mar 2016 5:42 a.m., "David Diaz" wrote:
> Hi guys,
>
> I've been working at my Tapestry application for a while and I'm just
> cleaning it up and I'm currently ensuring compatibility with Internet
> Explorer
dering modifying the Grid (or the GridPager or other
> component) so that the component is aware of having checkbox columns and
> saves the checkboxes states on paging, and restores them when going back to
> the same grid page. Any suggestion or observation about this would be
> we
If you want the values serverside, you'll need to POST the form when
changing pages. You might find this difficult to achieve as paging is
currently done as a GET request.
The simplest solution would be to add a change event listener clientside
and store the values on the client until the form is
You'll need to @Inject the PerThreadManager and call cleanupThread() in the
finally block of the task(s).
On 1 Nov 2015 14:58, "Ilya Obshadko" wrote:
> I have recently noticed in my GC logs that application leaks memory after
> running periodic background process which performs database operation
A word of warning... Selenium tests can be very problematic and I'm sitting
on the fence as to whether they are actually worth the maintenance cost.
That being said, the tapestry build itself has comprehensive Selenium
tests. Have a look through the source code for examples.
On 17 Aug 2015 12:55,
Further from Thiagos connents...
In eclipse, when using the m2e plugin you can right click on a project
Properties -> Maven -> Resolve dependencies from Workplace projects
This is flagged on by default. Perhaps intellij has a similar configuration
option?
It's rare that eclipse can do something
I've always considered this a bit of a security flaw. Using the javascript
console you can show the password in plain text.
Eg:
alert(document.getElementById('password').value);
On 3 Aug 2015 21:13, "Thiago H de Paula Figueiredo"
wrote:
> On Mon, 03 Aug 2015 15:04:27 -0300, Christine
> wrote:
I think this is caused by the field being reused in the loop. You might
need to recordError with a FieldSnapshot.
Example here
http://t5stitch-lazan.rhcloud.com/mapbindingdemo
You could put the add row link in a zone and update the zone with nothing
(via AjaxResponseRenderer) when the max is hit.
Seems like you're currently instantiating a WorkQueue calling
archiveQueue() then calling shutdownAndAwaitTermination() and discarding
the WorkQueue... Correct?
If you use ExecutorService.submit() instead of ExecutorService.execute()
you can call use the Future response and call Future.get() later
See the observe mixin here
http://t5stitch-lazan.rhcloud.com/observedemo
I think the problem is
publishParameters = "value"
If you want validate and type you need
publishParameters = "value,validate,type"
In my opinion the grid is trying to do a bit too much. It's a nice way to
quickly get started but you often need to reactor to a custom table.
It's possibly worth considering a more override friendly grid version 2.
The current implementation is hard to set custom html attributes (td/tr).
Customis
This sounds quite specific to a single page, I'd use an event handler
public void onException(Throwable cause)
You can @Inject AlertManager to add alerts
You can @Inject Request to test request.isXhr()
You can @Inject AjaxResponseRenderer to update zones.
Another option is adding a mixin to the AjaxUpload. And perhaps attach it
to every instance using a ComponentClassTransformWorker2 eg:
https://tawus.wordpress.com/2011/08/01/tapestry-mixins-classtransformations/
You can probably contribute a ComponentEventRequestFilter to the
ComponentEventRequestHandler.
I always find the diagram at the bottom of this page useful
http://tapestry.apache.org/request-processing.html
Can you explicitly generate your own clientids?
Eg:
Java
@Property
int index;
public String getMyZoneId() {
return "foo" + index;
}
The ApplicationStateManager is injected by TapestryModule.class you will
either need to add this module to the registry or mock the service in a
test module (eg using mockito). Or, you might choose to split your own
module into smaller logical groups (eg core and web) for easier testing.
You might
Which component are we talking about here? Are you sure you're setting id
(not to be confused with t:id, the serverside component id).
If you're solving it by explicitly setting a data attribute, why can't you
just explicitly set the id?
Can you generate the clientId yourself and pass as a parameter into both
components?
Why do you need to know the clientId? If it's for a javascript selector can
you use a data- attribute instead?
As you've discovered... Tapestry replaces field access with Binding.get()
using plastic byte code magic. You can use a local variable to avoid
multiple gets.
Eg:
@BindParameter
private GridDataSource source;
...
GridDataSource sourceCopy = source;
doStuff(sourceCopy);
doMoreStuff(sourceCopy);
The initial render of the grid occurs on a different request to the
"export" event. Tapestry does not maintain state between requests (unless
you explicitly @Persist which i wouldn't recommend).
Therefore it's perfectly reasonable for the GridDataSource to be invoked
once for the initial html rend
Possibly a much simpler option is to explicitly provide a clientId
Can you include your template? Perhaps the two components are not within
the same heartbeat.
Depending on your use case, you might need a container component to invoke
a method on a child at some later stage. Take a look at parallel /
parallelContainer for inspiration
http://t5stitch-lazan.rhclou
Take a look at the Label component which uses @HeartbeatDeferred
I'm not entirely sure the problem but it's likely caused by @BindParameter
which is likely invoking the binding each access.
Try
@InjectContainer Grid grid;
And grid.getDataSource().
This will give you an instance of CachingDataSource which should have the
lazy behaviour you want.
I haven't really been following this thread... But tapestry uses byte code
manipulation magic to change component properties to PerThreadValues which
means the actual member variables are unused.
In development mode, tapestry mirrors the values to the member variables to
make debugging easier. In
tuation where _state = -13 and RequestParameter is null.
> The request should be thrown and never call any methods which can lead
> to unexpected result. Isn't this a security issue too?
>
>
>
> Maybe this is a jetty bug?
>
>
>
>
>
> <*groupId*>org.mortb
Ah, sorry... It looks like the browser actually closes the connection on
abort which is resulting in a partial request being sent to the server. I
have no idea how to detect this (possibly different per container too).
Since you've found a solution which doesn't abort I'd use that.
Cheers,
Lance.
http://tapestry.apache.org/5.3/apidocs/org/apache/tapestry5/EventConstants.html
I can't seem to find the answer for "What kind of
> code would or would you not put in each handler?" there.
>
> Regards,
> Daniel P.
>
> -Ursprüngliche Nachricht-
> Von: Lance Java [mailto:lance.j...@googlemail.com]
> Gesendet: Freitag, 8. Mai 20
http://jumpstart.doublenegative.com.au/jumpstart/examples/navigation/whatiscalledandwhen
Tapestry validates all onXFromY() handlers to ensure that all Y's actually
exist. In your case, it looks like Y does not exist in the child page since
a different tml page is used. I can only assume this validation was
introduced after 5.0.
I consider actionlink to be deprecated, you should use ev
The server will know about an aborted request as it's too late, the request
has already been sent. Abort is a clientside concept AFAIK which stops the
client from waiting for the response / processing it.
Ok, so you don't think it should be a core concept but you also don't want
to build the tree yourself? Something's gotta give!
It's probably best to define the interface you'd like to interact with /
contribute to. I'm sure there's a tapestry-ioc friendly way to achieve what
you want.
May 2015 13:14, "Charlouze" wrote:
> Thanks for your input Lance, you pictured what i had in mind when i was
> talking about the workaround.
>
> But i want to know if adding a configuration type is something that is
> doable ?
>
> Le lun. 4 mai 2015 à 13:51, Lance Java
You could probably achieve this with an OrderedConfiguration
Eg:
public interface NodeConfig() {
public String getName();
public String getParentName(); //optional
public List getChildNames(); // optional
}
After all contributions, you could build a tree of nodes by calculating
actual c
If you want tapestry to use your translator as the default for all dates
you should contribute to TranslatorSource using a class (instead of
contributing by name to TranslatorAlternativesSource).
Otherwise, you could annotate individual date fields with
@Translate("dateTranslator") and leave your
Are you aware that BeanEditor, BeanEditForm and BeanDisplay all obey the
BeanBlockSource?
The problem is that the same field is reused for each loop iteration. See
here for a workaround using a FieldSnapshot to record the errors.
http://t5stitch-lazan.rhcloud.com/mapbindingdemo
I think you'd override the MultopartDecoder service by extending
MultipartDecoderImpl and implementing a custom createFileUpload(). You
could then call ServletFileUpload.setProgressListener(...) with a custom
listener.
The progress listener could store the bytes/percentage finished in a
session at
The page sees the component as a black box and doesn't know about its
internal component structure. This encapsulation is by design. If you want
more specific events you'll need to trigger them from your component.
Hi Geoff, as stated on the demo, the observe mixin was inspired by zone
updater but with a few very handy differences:
1. Developers don't need to deal with request parameters. These are
converted to more user friendly event arguments.
2. You can pass multiple clientside field values. In the jump
Is your autocomplete a select component? If so you can set the 'zone'
attribute and handle the 'onChanged' event to update the zone.
There's also the observe mixin from tapestry-stitch (
http://t5stitch-lazan.rhcloud.com/observedemo). Note: This will require a
javascript tweak to work with jquery
Possibly a sign you should be using composition instead of inheritance ;)
I think you can @Inject ThreadLocale and call ThreadLocale.setLocale(xxx).
On 20 Apr 2015 10:09, "Geoff Callender" <
geoff.callender.jumpst...@gmail.com> wrote:
> I'm generating a page link with PageRenderLinkSource. No problem. Now I'd
> like to generate it for a specific locale.
>
> I've tried
Updating this thread for future googlability. See this example for
executing work in parallel whilst rendering
http://t5stitch-lazan.rhcloud.com/paralleldemo
This sounded like a fun challenge so I implemented it in tapestry-stitch
Demo here with source code: http://t5stitch-lazan.rhcloud.com/paralleldemo
Rendering all happens on the request thread, workers are invoked in
parallel.
Enjoy!
On second thought... Why would you want to swap out the the bytecode
provider?
With clientside javascript it makes sense to choose the provider since you
will be directly using jquery or prototype in your own code. Having a
single provider reduces the scripts downloaded by the client.
But with pl
In theory, that's possible. Tapestry doesn't reference ASM classes, it's
only dependency is plastic. So in theory you could have a layer in plastic
to choose ASM or javassist as the "provider" (or another byte code
library).
I'd doubt that this is high priority for the tapestry team. I seem to
rec
For this to work, I think the actual rendering needs to happen on the
request thread.
See the gist here: https://gist.github.com/anonymous/379b3aae199147684841
By using the parallel component you can ask for an Invokable (which does
the 'work') and a binding (the property to set).
You would provi
Does this help?
http://stackoverflow.com/questions/18959365/tapestry-grid-default-sorting
> I tried triggering
resources.triggerEvent(InternalConstants.GRID_INPLACE_UPDATE,null, null);
from onUpEvent, that trigger from an event link inside the grid. But that
didn't seem to work
This is a common misconception. Your eventlink "inside" the grid is not a
child of the grid so the event won'
Correction, I meant getServletContext() not getServletRequest()
On 4 Apr 2015 07:37, "Lance Java" wrote:
> @Inject ApplicationGlobals instead and call
> getServletRequest().getContextPath()
>
@Inject ApplicationGlobals instead and call
getServletRequest().getContextPath()
You don't need to build the tapestry source.
Create a custom PageSource implementation by copy / paste / tweaking
PageSourceImpl (lookup source on github) and removing SoftReference usage.
Then use tapestry ioc to override the builtin PageSource service with your
custom impl.
I don't really understand why you need the temp files? The normal approach
is to store the static template files somewhere (classpath or database etc)
but never actually store the merge results (template merged with context).
I think you should provide a page which returns a StreamResult which is
I'm guessing you could override the PageElementFactory with a custom
implementation. You could extend PageElementFactoryImpl and override
newExpansionElement. I'm guessing you might wrap Binding.get() to escape
"{{" if the binding type is String.
On 19 Mar 2015 15:36, "Тимур Бухараев" wrote:
> I
You might be interested in the griddecorator mixin from tapestry-stitch
See the example here which adds a context sensitive alert to the "onclick"
of every row
https://t5stitch-lazan.rhcloud.com/griddecoratordemo
On 23 Feb 2015 18:39, "Poggenpohl, Daniel" <
daniel.poggenp...@isst.fraunhofer.de> w
Java
@Inject
private ComponentResources resources;
public void getPdfLink() {
return resources.createPageLink("path/to/pdfpage", "someContext");
}
TML
Use an iframe to load the StreamResponse page embedded in an html page.
On 19 Feb 2015 13:35, "Poggenpohl, Daniel" <
daniel.poggenp...@isst.fraunhofer.de> wrote:
> Hello,
>
> I am trying to build a component which can be embedded in a page and has a
> path parameter. If the parameter is set, the c
> Its working now as long my form components not rendered in loops or grids
Hmm... I'd call that broken ;)
In my opinion, @InjectContainer is a bit fragile. I think you're much
better off using the Environment or a component parameter. Let's consider a
future case where you want to render the child component in a loop (or
maybe an 'if' component). In this case the parent will be the loop/if and
it won't
stephan.windmuel...@tu-dortmund.de> wrote:
> On 23.01.2015, schrieb Lance Java wrote:
>
> > You could use the observe mixin from tapestry stitch. The mixin can fire
> a
> > zone update based on the change event, the current checkbox value can be
> > sent as the event
You could use the observe mixin from tapestry stitch. The mixin can fire a
zone update based on the change event, the current checkbox value can be
sent as the event context.
http://t5stitch-lazan.rhcloud.com/observedemo
On 23 Jan 2015 12:33, "Stephan Windmüller" <
stephan.windmuel...@tu-dortmund.
Perhaps tapestry-offline could help
https://github.com/uklance/tapestry-offline
On 20 Jan 2015 09:24, "George Christman" wrote:
> I'm using T5 beta-25 and I have the following code and I'm noticing
> when the scheduler fires off my service, my PageRenderLinkSource does
> not work. If I manually
The logger is not a service and cannot be @Injected into IOC services.
You have probably seen that you can @Inject the logger into pages and
components. @Inject has been extended (perhaps hijacked) for components and
@Injected values can come from contributed InjectionProviders. See
CommonResource
tapestry-lanceuk-comet? lance-atmosphere? LOL... where do you guys come up
with this stuff?
It's tapestry-cometd or tapestry-atmosphere.
You might be interested in this
http://t5stitch-lazan.rhcloud.com/pagerdemo
> Do I have your permission for it?
I don't mind what you do with the libraries, fork away! If you come up with
something interesting / useful I'd be interested to hear about it.
-room chat running at
http://t5atmosphere-lazan.rhcloud.com/chatdemo
[1] https://github.com/uklance/tapestry-atmosphere
[2] https://github.com/uklance/tapestry-cometd
On 25 November 2014 at 11:48, Name Surname
wrote:
> I am using chat room module from Lance and I would like to make more chat
I'm guessing you need to commit a transaction.
Either:
HibernateSessionManager.commit()
Or:
Session.getTransaction().commit()
Or:
@CommitAfter
s and make sure the jsessionid cookie header
is consistent between kaptcha view and verification.
On 18 Nov 2014 21:02, "George Christman" wrote:
> Hmm, I don't use sticky sessions, but why do you think this would be
> happening all of a sudden? btw lance, how does this work
I'm guessing this is a session issue. Perhaps a session cookie issue? Or
clustering / session replication issue?
On 18 Nov 2014 14:06, "George Christman" wrote:
> Yesterday I appeared to be having a lot of failures with kaptcha. Sometimes
> the image would appear and sometimes it wouldn't. When
1 - 100 of 1612 matches
Mail list logo