Following your advice, i've replicated the class CachingDataSource (from
Grid class) inside my mixin, and created an instance of it using the
BindParameter GridDataSource.
@BindParameter
private GridDataSource source;
@OnEvent(value = EXPORT_EVENT)
public StreamResponse export() {
CachingDat
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
Possibly a much simpler option is to explicitly provide a clientId
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
2015-05-20 11:08 GMT+02:00 Lance Java :
> 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).
>
Of course, that is well understood. The grid is not (a
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);
I could fixing my issue the other way thanks to Lance Java. It can be
found here.
http://stackoverflow.com/questions/30259617/tapestry5-url-re-writing-pass-parameters-to-transformpagerenderlink-method/30263687#30263687
-
To uns
On Wed, 20 May 2015 10:11:34 -0300, Lance Java
wrote:
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.
Or annotate the getter with @Cached. :)
Eg:
@BindParameter
private GridData
Thanks, that's helpful.
I think that 'two components not in the same heartbeat' is really the
reason, however I don't quite understand how to make them work in the same
heartbeat and if that's even possible.
Both components are rendered inside a zone, and the second one is a
Bootstrap Affix, whic
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?
Yes, I've finally resorted to data attributes. I wanted Tapestry-generated
client ids for consistency, but it works either way.
On Wed, May 20, 2015 at 7:38 PM, Lance Java
wrote:
> Can you generate the clientId yourself and pass as a parameter into both
> components?
>
> Why do you need to know
11 matches
Mail list logo