Re: Caching problem?

2016-06-29 Thread Nathan Quirynen
I have found that in one of the applications request filters following 
is added to every response:


Cache-Control: no-cache, no-store, must-revalidate

Pragma: no-cache


On 29/06/16 17:33, Nathan Quirynen wrote:

Hi,

I have a "weird" problem where this one image won't show up. Never had 
this problem before the upgrade to 5.4 and since there have been 
changes with caching, I guess it has something to do with that.
I don't know a lot about the caching Tapestry does (or in general), so 
I hope someone can point me in the right direction to find the problem.


After some testing the image does not load when I use Firefox, unless 
I use the reload function of Firefox that overrides the cache.
The difference I find when using this is in the request headers (for 
all files):


Normal load (image does not show up):

Cache-Control: max-age=0

"Hard" reload (image does show up):

Cache-Control: no-cache
Pragma: no-cache


When inspecting the source code in Firefox, the url seems correct and 
then the image does show up magically.


What could be causing this one file (next to all the other assets that 
were added in the same version) to have this behaviour? Can this be 
caused by Tapestry?


I have tried clearing Firefox's cache, using a computer that has not 
opened the application before and also changing the version of the 
application with no results...



Some pointers are appreciated!


Nathan


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org





-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Caching problem?

2016-06-29 Thread Nathan Quirynen

Hi,

I have a "weird" problem where this one image won't show up. Never had 
this problem before the upgrade to 5.4 and since there have been changes 
with caching, I guess it has something to do with that.
I don't know a lot about the caching Tapestry does (or in general), so I 
hope someone can point me in the right direction to find the problem.


After some testing the image does not load when I use Firefox, unless I 
use the reload function of Firefox that overrides the cache.
The difference I find when using this is in the request headers (for all 
files):


Normal load (image does not show up):

Cache-Control: max-age=0

"Hard" reload (image does show up):

Cache-Control: no-cache
Pragma: no-cache


When inspecting the source code in Firefox, the url seems correct and 
then the image does show up magically.


What could be causing this one file (next to all the other assets that 
were added in the same version) to have this behaviour? Can this be 
caused by Tapestry?


I have tried clearing Firefox's cache, using a computer that has not 
opened the application before and also changing the version of the 
application with no results...



Some pointers are appreciated!


Nathan


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: FW: Null pointer on sort with 5.3.8 that didn't occur with 5.3.7

2016-06-29 Thread Dmitry Gusev
Just a correction, that t:add is not just unnecessary, but it will be
ignored if you specify the beanModel explicitly:


> A comma-seperated list of property names to be added to the
> org.apache.tapestry5.beaneditor.BeanModel. Cells for added columns will be
> blank unless a cell override is provided. This parameter is only used when
> a default model is created automatically.



http://tapestry.apache.org/5.3/apidocs/org/apache/tapestry5/corelib/components/Grid.html




On Wed, Jun 29, 2016 at 5:57 PM, Chris Poulsen 
wrote:

> I'm guessing that something in the sorting part attempts to pull out the
> value from your passed data source (possibly coerced from a collection).
>
> The thing is that your data source does not contain the property (as it is
> synthetic) and you do not really pull the value from the data source ever,
> but from the "getMyColumn3" getter instead. The sorting stuff that attempts
> to extract the value for comparison has no way of knowing how to retrieve
> the value as the conduit is null.
>
> In order to provide the grid with the means to extract the value for
> "myColumn3" you should provide a conduit (can be done by creating a
> BeanModel and adding your column(s) with proper conduits. Judging from your
> example you can specify the data type as text (or string or what ever it is
> called in DataTypeConstants).
>
> Then the override (p:myColumn3Cell) and the t:add="." is not
> necessary.. You can keep the override if you need to.
>
> --
> Chris
>
> On Wed, Jun 29, 2016 at 12:04 PM, Davide Vecchi  wrote:
>
> > I changed my plan of finding out what causes this difference between
> 5.3.7
> > and 5.3.8. Instead I will go with some re-design, using some suggestions
> I
> > got here.
> >
> > However I am still very interested in knowing whether my way of defining
> > these t:add columns (pasted below) in general has something wrong or not
> so
> > right or not Tapestry-friendly. If it does, I might try to rectify that
> to
> > see if that helps.
> >
> > The column is defined like this:
> >
> > - In the page template, one param of the grid tag is
> >
> > t:add="prop:gridAdd"
> >
> > - In the page Java code, there is the corresponding
> >
> > public String getGridAdd() {
> > return " myColumn1, myColumn2, myColumn3, myColumn4";
> > }
> >
> >   where let's say that "myColumn3" is the column whose sorting fails.
> >
> > - In the page template, within the t:grid tag there is the definition of
> > the customized content of that column:
> >
> > ${ myColumn3}
> >
> > - In the page Java code, there is the method returning the value for that
> > column:
> >
> > public String getMyColumn3()
> > {
> > return aStringThatIsNeverNull;
> > }
> >
> > Thanks in advance for any possible feedback or hint or any related
> thought.
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
>



-- 
Dmitry Gusev

AnjLab Team
http://anjlab.com


Re: FW: Null pointer on sort with 5.3.8 that didn't occur with 5.3.7

2016-06-29 Thread Chris Poulsen
I'm guessing that something in the sorting part attempts to pull out the
value from your passed data source (possibly coerced from a collection).

The thing is that your data source does not contain the property (as it is
synthetic) and you do not really pull the value from the data source ever,
but from the "getMyColumn3" getter instead. The sorting stuff that attempts
to extract the value for comparison has no way of knowing how to retrieve
the value as the conduit is null.

In order to provide the grid with the means to extract the value for
"myColumn3" you should provide a conduit (can be done by creating a
BeanModel and adding your column(s) with proper conduits. Judging from your
example you can specify the data type as text (or string or what ever it is
called in DataTypeConstants).

Then the override (p:myColumn3Cell) and the t:add="." is not
necessary.. You can keep the override if you need to.

-- 
Chris

On Wed, Jun 29, 2016 at 12:04 PM, Davide Vecchi  wrote:

> I changed my plan of finding out what causes this difference between 5.3.7
> and 5.3.8. Instead I will go with some re-design, using some suggestions I
> got here.
>
> However I am still very interested in knowing whether my way of defining
> these t:add columns (pasted below) in general has something wrong or not so
> right or not Tapestry-friendly. If it does, I might try to rectify that to
> see if that helps.
>
> The column is defined like this:
>
> - In the page template, one param of the grid tag is
>
> t:add="prop:gridAdd"
>
> - In the page Java code, there is the corresponding
>
> public String getGridAdd() {
> return " myColumn1, myColumn2, myColumn3, myColumn4";
> }
>
>   where let's say that "myColumn3" is the column whose sorting fails.
>
> - In the page template, within the t:grid tag there is the definition of
> the customized content of that column:
>
> ${ myColumn3}
>
> - In the page Java code, there is the method returning the value for that
> column:
>
> public String getMyColumn3()
> {
> return aStringThatIsNeverNull;
> }
>
> Thanks in advance for any possible feedback or hint or any related thought.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>


Re: Tapestry 5.4.1 + Hibernate 5 exception

2016-06-29 Thread Pavel Chernyak
Greetings.
I compiled tapestry-hibernate-core against hibernate 5.2 and since have 0
problems with hibernate.
Maybe you should reconsider to do same thing?


On 29 June 2016 at 12:41, M J  wrote:

> Hi!
>
>
> It seems that Tapestry 5.4.1 is compatible with Hibernate 5.x (
> https://issues.apache.org/jira/browse/TAP5-2525) and I've seen a few
> e-mails on this list that suggest people are successfully using 5.0 and 5.1
> (
> http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/Hibernate-5-1-td5732433.html
> ).
>
>
> Yet when I attempt running our app with Tapestry 5.4.1 and Hibernate
> 5.1.0.Final, HibernateSessionManagerImpl.java:71 throws an exception:
>
>
> Thread main had uncaught exception: java.lang.NoSuchMethodError:
> org.hibernate.Session.close()Ljava/sql/Connection;
>
> [STDOUT] Total memory: 324534272
>
> [STDOUT] Max memory: 477626368
>
> [STDOUT] Free memory: 123366760
>
> [STDOUT] java.lang.NoSuchMethodError:
> org.hibernate.Session.close()Ljava/sql/Connection;
>
> [STDOUT] at
> org.apache.tapestry5.internal.hibernate.HibernateSessionManagerImpl.threadDidCleanup(HibernateSessionManagerImpl.java:71)
>
> [STDOUT] at
> org.apache.tapestry5.ioc.internal.services.PerthreadManagerImpl$2.run(PerthreadManagerImpl.java:107)
>
> [STDOUT] at
> org.apache.tapestry5.ioc.internal.services.PerthreadManagerImpl.cleanup(PerthreadManagerImpl.java:135)
>
> [STDOUT] at
> org.apache.tapestry5.ioc.internal.RegistryImpl.cleanupThread(RegistryImpl.java:522)
>
> [STDOUT] at
> org.apache.tapestry5.ioc.internal.RegistryImpl.performRegistryStartup(RegistryImpl.java:368)
>
> [STDOUT] at
> org.apache.tapestry5.ioc.internal.RegistryWrapper.performRegistryStartup(RegistryWrapper.java:89)
>
> [STDOUT] at
> org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:110)
>
> ...
>
> It seems there was an incompatible change from going form 4 -> 5, with
> Session now extending Closeable and changing the return value of close() to
> void.
>
> How would one get around this?
>
> users@tapestry.apache.org Mailing List Archives - Hibernate 5.1<
> http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/Hibernate-5-1-td5732433.html
> >
> apache-tapestry-mailing-list-archives.1045711.n5.nabble.com
> Hibernate 5.1. Greetings. Since version 5.4.1 we now can use Hibernate
> 5.0. Have someone tried to upgrade Hibernate to 5.1 ?
>
>
>


-- 
С уважением,
Черняк Павел Александрович


FW: Null pointer on sort with 5.3.8 that didn't occur with 5.3.7

2016-06-29 Thread Davide Vecchi
I changed my plan of finding out what causes this difference between 5.3.7 and 
5.3.8. Instead I will go with some re-design, using some suggestions I got here.

However I am still very interested in knowing whether my way of defining these 
t:add columns (pasted below) in general has something wrong or not so right or 
not Tapestry-friendly. If it does, I might try to rectify that to see if that 
helps.

The column is defined like this:

- In the page template, one param of the grid tag is

t:add="prop:gridAdd"

- In the page Java code, there is the corresponding

public String getGridAdd() {
return " myColumn1, myColumn2, myColumn3, myColumn4";
}
 
  where let's say that "myColumn3" is the column whose sorting fails.

- In the page template, within the t:grid tag there is the definition of the 
customized content of that column:

${ myColumn3}

- In the page Java code, there is the method returning the value for that 
column:

public String getMyColumn3()
{
return aStringThatIsNeverNull;
}

Thanks in advance for any possible feedback or hint or any related thought.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


Tapestry 5.4.1 + Hibernate 5 exception

2016-06-29 Thread M J
Hi!


It seems that Tapestry 5.4.1 is compatible with Hibernate 5.x 
(https://issues.apache.org/jira/browse/TAP5-2525) and I've seen a few e-mails 
on this list that suggest people are successfully using 5.0 and 5.1 
(http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/Hibernate-5-1-td5732433.html).


Yet when I attempt running our app with Tapestry 5.4.1 and Hibernate 
5.1.0.Final, HibernateSessionManagerImpl.java:71 throws an exception:


Thread main had uncaught exception: java.lang.NoSuchMethodError: 
org.hibernate.Session.close()Ljava/sql/Connection;

[STDOUT] Total memory: 324534272

[STDOUT] Max memory: 477626368

[STDOUT] Free memory: 123366760

[STDOUT] java.lang.NoSuchMethodError: 
org.hibernate.Session.close()Ljava/sql/Connection;

[STDOUT] at 
org.apache.tapestry5.internal.hibernate.HibernateSessionManagerImpl.threadDidCleanup(HibernateSessionManagerImpl.java:71)

[STDOUT] at 
org.apache.tapestry5.ioc.internal.services.PerthreadManagerImpl$2.run(PerthreadManagerImpl.java:107)

[STDOUT] at 
org.apache.tapestry5.ioc.internal.services.PerthreadManagerImpl.cleanup(PerthreadManagerImpl.java:135)

[STDOUT] at 
org.apache.tapestry5.ioc.internal.RegistryImpl.cleanupThread(RegistryImpl.java:522)

[STDOUT] at 
org.apache.tapestry5.ioc.internal.RegistryImpl.performRegistryStartup(RegistryImpl.java:368)

[STDOUT] at 
org.apache.tapestry5.ioc.internal.RegistryWrapper.performRegistryStartup(RegistryWrapper.java:89)

[STDOUT] at org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:110)

...

It seems there was an incompatible change from going form 4 -> 5, with Session 
now extending Closeable and changing the return value of close() to void.

How would one get around this?

users@tapestry.apache.org Mailing List Archives - Hibernate 
5.1
apache-tapestry-mailing-list-archives.1045711.n5.nabble.com
Hibernate 5.1. Greetings. Since version 5.4.1 we now can use Hibernate 5.0. 
Have someone tried to upgrade Hibernate to 5.1 ?




Re: Dynamic Security Role Value - Tynamo Security

2016-06-29 Thread Dmitry Gusev
Just specify the prop: binding prefix explicitly, i.e.:

role="prop:dynamicRoles"

This parameter just uses literal: binding prefix by default.

Also make sure you read this:
http://tapestry.apache.org/component-parameters.html#ComponentParameters-BindingExpressions

On Wednesday, June 29, 2016, Matthew Bush <
matthew.b...@jetinteractive.com.au> wrote:

> I want to dynamically set required roles at runtime dynamically rather
> than have them statically coded.  Is this possible?
>
> Taken from the tynamo-security page (
> http://www.tynamo.org/tapestry-security+guide/ <
> http://www.tynamo.org/tapestry-security+guide/>)
>
> 
>   delete user
> 
> What I would like to be able to do is set the required role or role list
> based on a bound parameter, is that possible?
>
> Example syntax -
>
> 
>   delete user
> 
>
>
> Cheers,
> Matthew Bush
>
>
>

-- 
Dmitry Gusev

AnjLab Team
http://anjlab.com


Re: Dynamic Security Role Value - Tynamo Security

2016-06-29 Thread mailingl...@j-b-s.de
Maybe use a  and move the role related code to your java page?

Von meinem iPhone gesendet

> Am 29.06.2016 um 08:24 schrieb Matthew Bush 
> :
> 
> I want to dynamically set required roles at runtime dynamically rather than 
> have them statically coded.  Is this possible?
> 
> Taken from the tynamo-security page 
> (http://www.tynamo.org/tapestry-security+guide/ 
> )
> 
> 
>  delete user
> 
> What I would like to be able to do is set the required role or role list 
> based on a bound parameter, is that possible?
> 
> Example syntax -
> 
> 
>  delete user
> 
> 
> 
> Cheers,
> Matthew Bush
> 
> 


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Dynamic Security Role Value - Tynamo Security

2016-06-29 Thread Matthew Bush
I want to dynamically set required roles at runtime dynamically rather than 
have them statically coded.  Is this possible?

Taken from the tynamo-security page 
(http://www.tynamo.org/tapestry-security+guide/ 
)


  delete user

What I would like to be able to do is set the required role or role list based 
on a bound parameter, is that possible?

Example syntax -


  delete user



Cheers,
Matthew Bush