[jira] [Assigned] (WICKET-6192) Remove recreateBookmarkablePagesAfterExpiry ceck in AbstractBookmarkableMapper#mapHandler

2016-07-13 Thread Martin Grigorov (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-6192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Grigorov reassigned WICKET-6192:
---

Assignee: Martin Grigorov

> Remove recreateBookmarkablePagesAfterExpiry ceck in 
> AbstractBookmarkableMapper#mapHandler
> -
>
> Key: WICKET-6192
> URL: https://issues.apache.org/jira/browse/WICKET-6192
> Project: Wicket
>  Issue Type: Bug
>Reporter: Ravi Knox
>Assignee: Martin Grigorov
> Attachments: WICKET-6192.patch, wicket-sandbox.7z
>
>
> In a nutshell that's what we try to archive:
> Save a cookie on a client browser under the path of the current page.
> The page does have a mandatory named parameter!
> If the Session expires. The SessionExpiredPage will read the cookie and start 
> a redirect.
> After resolving Ticket 
> [WICKET-6182|https://issues.apache.org/jira/browse/WICKET-6182]:
> What happens now is that by the time the AbstractBookmarkableMapper wants to 
> generate the URL of the component, before including the existent parameters,
> it does an getRecreateMountedPagesAfterExpiry() check ([see 
> here|https://github.com/apache/wicket/blob/f71a2d33c2ff9dbb669066a3dfc7b58229824b0e/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/AbstractBookmarkableMapper.java#L479]).
>  which answers false and the existing parameters are not added to the new 
> UrlInfo object.
> That in return will lead to a failure when calling setPlaceholders(copy, url) 
> ([see 
> here|https://github.com/apache/wicket/blob/f71a2d33c2ff9dbb669066a3dfc7b58229824b0e/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/MountedMapper.java#L206])
>  and results in a null url return value, that lets wicket default to the 
> generic URL we had before. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Assigned] (WICKET-6200) Add default converters for Java 8 classes

2016-07-13 Thread Martin Grigorov (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-6200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Grigorov reassigned WICKET-6200:
---

Assignee: Martin Grigorov

> Add default converters for Java 8 classes
> -
>
> Key: WICKET-6200
> URL: https://issues.apache.org/jira/browse/WICKET-6200
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket
>Affects Versions: 8.0.0-M1
>Reporter: Martin Grigorov
>Assignee: Martin Grigorov
>Priority: Minor
>
> It would be good to add some default converters for Java 8 classes like 
> DateTime, Optional (?!), ??? 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WICKET-6192) Remove recreateBookmarkablePagesAfterExpiry ceck in AbstractBookmarkableMapper#mapHandler

2016-07-13 Thread Martin Grigorov (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-6192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15375917#comment-15375917
 ] 

Martin Grigorov commented on WICKET-6192:
-

The idea is to preserve the named path parameters when creating the urls for 
ajax callbacks.
Without this the logic for finding the required named parameters fails and 
instead of MountedMapper Wicket uses BookmarkableMapper which has lower 
compatibility score and acts as a fallback.

> Remove recreateBookmarkablePagesAfterExpiry ceck in 
> AbstractBookmarkableMapper#mapHandler
> -
>
> Key: WICKET-6192
> URL: https://issues.apache.org/jira/browse/WICKET-6192
> Project: Wicket
>  Issue Type: Bug
>Reporter: Ravi Knox
> Attachments: WICKET-6192.patch, wicket-sandbox.7z
>
>
> In a nutshell that's what we try to archive:
> Save a cookie on a client browser under the path of the current page.
> The page does have a mandatory named parameter!
> If the Session expires. The SessionExpiredPage will read the cookie and start 
> a redirect.
> After resolving Ticket 
> [WICKET-6182|https://issues.apache.org/jira/browse/WICKET-6182]:
> What happens now is that by the time the AbstractBookmarkableMapper wants to 
> generate the URL of the component, before including the existent parameters,
> it does an getRecreateMountedPagesAfterExpiry() check ([see 
> here|https://github.com/apache/wicket/blob/f71a2d33c2ff9dbb669066a3dfc7b58229824b0e/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/AbstractBookmarkableMapper.java#L479]).
>  which answers false and the existing parameters are not added to the new 
> UrlInfo object.
> That in return will lead to a failure when calling setPlaceholders(copy, url) 
> ([see 
> here|https://github.com/apache/wicket/blob/f71a2d33c2ff9dbb669066a3dfc7b58229824b0e/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/MountedMapper.java#L206])
>  and results in a null url return value, that lets wicket default to the 
> generic URL we had before. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (WICKET-6192) Remove recreateBookmarkablePagesAfterExpiry ceck in AbstractBookmarkableMapper#mapHandler

2016-07-13 Thread Martin Grigorov (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-6192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Grigorov updated WICKET-6192:

Attachment: WICKET-6192.patch

Here is my suggested patch for this issue.

> Remove recreateBookmarkablePagesAfterExpiry ceck in 
> AbstractBookmarkableMapper#mapHandler
> -
>
> Key: WICKET-6192
> URL: https://issues.apache.org/jira/browse/WICKET-6192
> Project: Wicket
>  Issue Type: Bug
>Reporter: Ravi Knox
> Attachments: WICKET-6192.patch, wicket-sandbox.7z
>
>
> In a nutshell that's what we try to archive:
> Save a cookie on a client browser under the path of the current page.
> The page does have a mandatory named parameter!
> If the Session expires. The SessionExpiredPage will read the cookie and start 
> a redirect.
> After resolving Ticket 
> [WICKET-6182|https://issues.apache.org/jira/browse/WICKET-6182]:
> What happens now is that by the time the AbstractBookmarkableMapper wants to 
> generate the URL of the component, before including the existent parameters,
> it does an getRecreateMountedPagesAfterExpiry() check ([see 
> here|https://github.com/apache/wicket/blob/f71a2d33c2ff9dbb669066a3dfc7b58229824b0e/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/AbstractBookmarkableMapper.java#L479]).
>  which answers false and the existing parameters are not added to the new 
> UrlInfo object.
> That in return will lead to a failure when calling setPlaceholders(copy, url) 
> ([see 
> here|https://github.com/apache/wicket/blob/f71a2d33c2ff9dbb669066a3dfc7b58229824b0e/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/MountedMapper.java#L206])
>  and results in a null url return value, that lets wicket default to the 
> generic URL we had before. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (WICKET-6199) Update Guide: Pagemaps are gone

2016-07-13 Thread Andrea Del Bene (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-6199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrea Del Bene resolved WICKET-6199.
-
Resolution: Fixed

I think there are no more reference to page map. Thank you!

> Update Guide: Pagemaps are gone
> ---
>
> Key: WICKET-6199
> URL: https://issues.apache.org/jira/browse/WICKET-6199
> Project: Wicket
>  Issue Type: Bug
>  Components: guide
>Affects Versions: 7.3.0
>Reporter: Jan Lühr
>Assignee: Andrea Del Bene
>Priority: Trivial
>
> Is - The Guide says: 
> " When storing information in fields you should consider that the information 
> is serializable, because the pages are stored in Wicket's page map. By 
> default the page map stores the pages on the hard disk."
> But: Page Maps are gone since 1.5 - this info is confusing.
> http://apache-wicket.1842946.n4.nabble.com/1-5-Page-Maps-td2998780.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WICKET-5623) Custom Getters and Setters for PropertyResolver

2016-07-13 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-5623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15375900#comment-15375900
 ] 

ASF GitHub Bot commented on WICKET-5623:


Github user svenmeier commented on the issue:

https://github.com/apache/wicket/pull/74
  
I'm working on a different solution, please take a look at 
https://github.com/apache/wicket/tree/WICKET-5623-extensible-propertyresolver


> Custom Getters and Setters for PropertyResolver
> ---
>
> Key: WICKET-5623
> URL: https://issues.apache.org/jira/browse/WICKET-5623
> Project: Wicket
>  Issue Type: New Feature
>  Components: wicket
>Affects Versions: 6.15.0
>Reporter: Ilia Naryzhny
>Assignee: Sven Meier
>  Labels: properties, property-expression
>
> There is no way to customize getting of properties from the object. All 
> possible ways to gain properties are hardcoded in PropertyResolver. 
> But, for example, there is set of NoSQL document DBs which have some class 
> "Document" to work with DB. And to get some property of that document you 
> should call something like this: 'doc.getProperty("myPropertyName")'.
> Please add ability to customize obtaining properties from different kind of 
> objects.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WICKET-5623) Custom Getters and Setters for PropertyResolver

2016-07-13 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-5623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15375897#comment-15375897
 ] 

ASF subversion and git services commented on WICKET-5623:
-

Commit fd72be98adbe9395ef96b08f194fae95f4a20966 in wicket's branch 
refs/heads/WICKET-5623-extensible-propertyresolver from [~svenmeier]
[ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=fd72be9 ]

WICKET-5623 extensible PropertyResolver


> Custom Getters and Setters for PropertyResolver
> ---
>
> Key: WICKET-5623
> URL: https://issues.apache.org/jira/browse/WICKET-5623
> Project: Wicket
>  Issue Type: New Feature
>  Components: wicket
>Affects Versions: 6.15.0
>Reporter: Ilia Naryzhny
>Assignee: Sven Meier
>  Labels: properties, property-expression
>
> There is no way to customize getting of properties from the object. All 
> possible ways to gain properties are hardcoded in PropertyResolver. 
> But, for example, there is set of NoSQL document DBs which have some class 
> "Document" to work with DB. And to get some property of that document you 
> should call something like this: 'doc.getProperty("myPropertyName")'.
> Please add ability to customize obtaining properties from different kind of 
> objects.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


wicket git commit: WICKET-5623 extensible PropertyResolver

2016-07-13 Thread svenmeier
Repository: wicket
Updated Branches:
  refs/heads/WICKET-5623-extensible-propertyresolver [created] fd72be98a


WICKET-5623 extensible PropertyResolver


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/fd72be98
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/fd72be98
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/fd72be98

Branch: refs/heads/WICKET-5623-extensible-propertyresolver
Commit: fd72be98adbe9395ef96b08f194fae95f4a20966
Parents: ea89a79
Author: Sven Meier 
Authored: Thu Jul 14 00:16:48 2016 +0200
Committer: Sven Meier 
Committed: Thu Jul 14 00:16:48 2016 +0200

--
 .../wicket/core/util/lang/PropertyResolver.java | 813 ++-
 1 file changed, 440 insertions(+), 373 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/fd72be98/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyResolver.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyResolver.java
 
b/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyResolver.java
index 37d5edb..c3e3025 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyResolver.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/core/util/lang/PropertyResolver.java
@@ -27,6 +27,7 @@ import java.util.concurrent.ConcurrentHashMap;
 import org.apache.wicket.Application;
 import org.apache.wicket.Session;
 import org.apache.wicket.WicketRuntimeException;
+import org.apache.wicket.core.util.lang.PropertyResolverConverter;
 import org.apache.wicket.util.convert.ConversionException;
 import org.apache.wicket.util.lang.Generics;
 import org.apache.wicket.util.string.Strings;
@@ -39,36 +40,45 @@ import org.slf4j.LoggerFactory;
  * 
  * This class parses expressions to lookup or set a value on the object that 
is given. 
  * The supported expressions are:
- * 
- * "property": This could be a bean property with get and set method. Or if a 
map is given as
- * an object it will be lookup with the property as a key when there is not 
get method for that
+ * 
+ * "property"
+ * 
+ * This could be a bean property with getter and setter. Or if a map is given 
as
+ * an object it will be lookup with the expression as a key when there is not 
getter for that
  * property.
- * 
- * 
- * "property1.property2": Both properties are looked up as described above. If 
property1 evaluates to
- * null then if there is a setMethod (or if it is a map) and the Class of the 
property has a default
+ * 
+ * "property1.property2"
+ * 
+ * Both properties are looked up as described above. If property1 evaluates to
+ * null then if there is a setter (or if it is a map) and the Class of the 
property has a default
  * constructor then the object will be constructed and set on the object.
- * 
- * 
- * "property.index": If the property is a List or Array then the second 
property can be a index on
- * that list like: 'mylist.0' this expression will also map on a 
getProperty(index) or
- * setProperty(index,value) methods. If the object is a List then the list 
will grow automatically
- * if the index is greater than the size
- * 
- * 
- * Index or map properties can also be written as: "property[index]" or 
"property[key]"
- * 
+ * 
+ * "method()"
+ * 
+ * The corresponding method is invoked.
+ * 
+ * "property.index" or "property[index]"
+ * 
+ * If the property is a List or Array then the following expression can be a 
index on
+ * that list like: 'mylist.0'. The list will grow automatically if the index 
is greater than the size.
+ * This expression will also map on indexed properties, i.e. {@code 
getProperty(index)} and {@code setProperty(index,value)}
+ * methods.
+ * 
+ * "property.key" or "property[key]"
+ * 
+ * If the property is a Map then the following expression can be a key in that 
map like: 'myMap.key'.
+ * 
+ * 
+ * Note that the {@link DefaultGetAndSetLocator} by default provides 
access to private members
+ * and methods. If guaranteeing encapsulation of the target objects is a big 
concern, you should consider
+ * using an alternative implementation.
  * 
- * Note that the property resolver by default provides access to 
private members and methods. If
- * guaranteeing encapsulation of the target objects is a big concern, you 
should consider using an
- * alternative implementation.
- * 
- * Note: If a property evaluates to an instance of {@link 
org.apache.wicket.model.IModel} then
- * the expression should use '.object' to work with its value.
+ * Note: If a property evaluates to an instance of {@link 
org.apache.wicket.model.IModel} then
+ * the expression should use '.object' to work with its value.
  *
  * @author jcompagner
+ * @author svenmeier
  */
-@SuppressWarnings

[jira] [Commented] (WICKET-6192) Remove recreateBookmarkablePagesAfterExpiry ceck in AbstractBookmarkableMapper#mapHandler

2016-07-13 Thread Martin Grigorov (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-6192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15375871#comment-15375871
 ] 

Martin Grigorov commented on WICKET-6192:
-

Any reason why you removed Start.java ?
Please don't make it harder for us to help you!

> Remove recreateBookmarkablePagesAfterExpiry ceck in 
> AbstractBookmarkableMapper#mapHandler
> -
>
> Key: WICKET-6192
> URL: https://issues.apache.org/jira/browse/WICKET-6192
> Project: Wicket
>  Issue Type: Bug
>Reporter: Ravi Knox
> Attachments: wicket-sandbox.7z
>
>
> In a nutshell that's what we try to archive:
> Save a cookie on a client browser under the path of the current page.
> The page does have a mandatory named parameter!
> If the Session expires. The SessionExpiredPage will read the cookie and start 
> a redirect.
> After resolving Ticket 
> [WICKET-6182|https://issues.apache.org/jira/browse/WICKET-6182]:
> What happens now is that by the time the AbstractBookmarkableMapper wants to 
> generate the URL of the component, before including the existent parameters,
> it does an getRecreateMountedPagesAfterExpiry() check ([see 
> here|https://github.com/apache/wicket/blob/f71a2d33c2ff9dbb669066a3dfc7b58229824b0e/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/AbstractBookmarkableMapper.java#L479]).
>  which answers false and the existing parameters are not added to the new 
> UrlInfo object.
> That in return will lead to a failure when calling setPlaceholders(copy, url) 
> ([see 
> here|https://github.com/apache/wicket/blob/f71a2d33c2ff9dbb669066a3dfc7b58229824b0e/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/MountedMapper.java#L206])
>  and results in a null url return value, that lets wicket default to the 
> generic URL we had before. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WICKET-6199) Update Guide: Pagemaps are gone

2016-07-13 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-6199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15375863#comment-15375863
 ] 

ASF subversion and git services commented on WICKET-6199:
-

Commit 0cde96d53910b1b4c5eed229a3b78b3b63338cc1 in wicket's branch 
refs/heads/wicket-7.x from [~bitstorm]
[ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=0cde96d ]

WICKET-6199 Update Guide: Pagemaps are gone

> Update Guide: Pagemaps are gone
> ---
>
> Key: WICKET-6199
> URL: https://issues.apache.org/jira/browse/WICKET-6199
> Project: Wicket
>  Issue Type: Bug
>  Components: guide
>Affects Versions: 7.3.0
>Reporter: Jan Lühr
>Assignee: Andrea Del Bene
>Priority: Trivial
>
> Is - The Guide says: 
> " When storing information in fields you should consider that the information 
> is serializable, because the pages are stored in Wicket's page map. By 
> default the page map stores the pages on the hard disk."
> But: Page Maps are gone since 1.5 - this info is confusing.
> http://apache-wicket.1842946.n4.nabble.com/1-5-Page-Maps-td2998780.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


wicket git commit: WICKET-6199 Update Guide: Pagemaps are gone

2016-07-13 Thread adelbene
Repository: wicket
Updated Branches:
  refs/heads/wicket-7.x ea89a7920 -> 0cde96d53


WICKET-6199 Update Guide: Pagemaps are gone

Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/0cde96d5
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/0cde96d5
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/0cde96d5

Branch: refs/heads/wicket-7.x
Commit: 0cde96d53910b1b4c5eed229a3b78b3b63338cc1
Parents: ea89a79
Author: Andrea Del Bene 
Authored: Wed Jul 13 21:01:47 2016 +0200
Committer: Andrea Del Bene 
Committed: Thu Jul 14 00:04:03 2016 +0200

--
 .../src/docs/guide/bestpractices/bestpractices_2.gdoc  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/0cde96d5/wicket-user-guide/src/docs/guide/bestpractices/bestpractices_2.gdoc
--
diff --git 
a/wicket-user-guide/src/docs/guide/bestpractices/bestpractices_2.gdoc 
b/wicket-user-guide/src/docs/guide/bestpractices/bestpractices_2.gdoc
index 63e99f0..8aa7620 100644
--- a/wicket-user-guide/src/docs/guide/bestpractices/bestpractices_2.gdoc
+++ b/wicket-user-guide/src/docs/guide/bestpractices/bestpractices_2.gdoc
@@ -1,3 +1,3 @@
 
 
-In contrast to Struts, Wicket pages and components are no singletons, they are 
stateful and session-scoped. This enables us to store user-specific information 
within pages and components. The information should be stored in fields. This 
way you can access the information within a class while avoiding long method 
signatures only for passing the same information around. Instances of 
components can exist for several requests. For example, a page with a form 
which gets submitted and produces validation errors uses the same page 
instance. Furthermore the same page instance gets used when the user presses 
the back button of the browser and resubmits this formular again. Information 
which gets passed by the constructor should be assigned to fields (normally 
this must be models). When storing information in fields you should consider 
that the information is serializable, because the pages are stored using Java 
serialization. By default the page map stores the pages on the hard disk. A 
non-s
 erializable object leads to @NullPointerExceptions@ and 
@NonSerializableExceptions@. Additionally, big data (like binary stuff) should 
not be stored directly in fields because this can cause performance losses and 
memory leaks during serialization and deserialization. In this case, you should 
use the @LoadableDetachableModel@ which can be assigned to a field because this 
provides an efficient mechanism to load and detach data.
\ No newline at end of file
+In contrast to Struts, Wicket pages and components are no singletons, they are 
stateful and session-scoped. This enables us to store user-specific information 
within pages and components. The information should be stored in fields. This 
way you can access the information within a class while avoiding long method 
signatures only for passing the same information around. Instances of 
components can exist for several requests. For example, a page with a form 
which gets submitted and produces validation errors uses the same page 
instance. Furthermore the same page instance gets used when the user presses 
the back button of the browser and resubmits this formular again. Information 
which gets passed by the constructor should be assigned to fields (normally 
this must be models). When storing information in fields you should consider 
that the information is serializable, because the pages are stored using Java 
serialization. By default Wicket stores pages on the hard disk. A 
non-serializabl
 e object leads to @NullPointerExceptions@ and @NonSerializableExceptions@. 
Additionally, big data (like binary stuff) should not be stored directly in 
fields because this can cause performance losses and memory leaks during 
serialization and deserialization. In this case, you should use the 
@LoadableDetachableModel@ which can be assigned to a field because this 
provides an efficient mechanism to load and detach data.
\ No newline at end of file



[jira] [Commented] (WICKET-6199) Update Guide: Pagemaps are gone

2016-07-13 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-6199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15375860#comment-15375860
 ] 

ASF subversion and git services commented on WICKET-6199:
-

Commit fb9c65df3069567943251a22c4519757c8f0ef2f in wicket's branch 
refs/heads/wicket-6.x from [~bitstorm]
[ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=fb9c65d ]

WICKET-6199 Update Guide: Pagemaps are gone

> Update Guide: Pagemaps are gone
> ---
>
> Key: WICKET-6199
> URL: https://issues.apache.org/jira/browse/WICKET-6199
> Project: Wicket
>  Issue Type: Bug
>  Components: guide
>Affects Versions: 7.3.0
>Reporter: Jan Lühr
>Assignee: Andrea Del Bene
>Priority: Trivial
>
> Is - The Guide says: 
> " When storing information in fields you should consider that the information 
> is serializable, because the pages are stored in Wicket's page map. By 
> default the page map stores the pages on the hard disk."
> But: Page Maps are gone since 1.5 - this info is confusing.
> http://apache-wicket.1842946.n4.nabble.com/1-5-Page-Maps-td2998780.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


wicket git commit: WICKET-6199 Update Guide: Pagemaps are gone

2016-07-13 Thread adelbene
Repository: wicket
Updated Branches:
  refs/heads/wicket-6.x 159da6182 -> fb9c65df3


WICKET-6199 Update Guide: Pagemaps are gone

Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/fb9c65df
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/fb9c65df
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/fb9c65df

Branch: refs/heads/wicket-6.x
Commit: fb9c65df3069567943251a22c4519757c8f0ef2f
Parents: 159da61
Author: Andrea Del Bene 
Authored: Wed Jul 13 21:01:47 2016 +0200
Committer: Andrea Del Bene 
Committed: Thu Jul 14 00:02:46 2016 +0200

--
 .../src/docs/guide/bestpractices/bestpractices_2.gdoc  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/fb9c65df/wicket-user-guide/src/docs/guide/bestpractices/bestpractices_2.gdoc
--
diff --git 
a/wicket-user-guide/src/docs/guide/bestpractices/bestpractices_2.gdoc 
b/wicket-user-guide/src/docs/guide/bestpractices/bestpractices_2.gdoc
index 63e99f0..8aa7620 100644
--- a/wicket-user-guide/src/docs/guide/bestpractices/bestpractices_2.gdoc
+++ b/wicket-user-guide/src/docs/guide/bestpractices/bestpractices_2.gdoc
@@ -1,3 +1,3 @@
 
 
-In contrast to Struts, Wicket pages and components are no singletons, they are 
stateful and session-scoped. This enables us to store user-specific information 
within pages and components. The information should be stored in fields. This 
way you can access the information within a class while avoiding long method 
signatures only for passing the same information around. Instances of 
components can exist for several requests. For example, a page with a form 
which gets submitted and produces validation errors uses the same page 
instance. Furthermore the same page instance gets used when the user presses 
the back button of the browser and resubmits this formular again. Information 
which gets passed by the constructor should be assigned to fields (normally 
this must be models). When storing information in fields you should consider 
that the information is serializable, because the pages are stored using Java 
serialization. By default the page map stores the pages on the hard disk. A 
non-s
 erializable object leads to @NullPointerExceptions@ and 
@NonSerializableExceptions@. Additionally, big data (like binary stuff) should 
not be stored directly in fields because this can cause performance losses and 
memory leaks during serialization and deserialization. In this case, you should 
use the @LoadableDetachableModel@ which can be assigned to a field because this 
provides an efficient mechanism to load and detach data.
\ No newline at end of file
+In contrast to Struts, Wicket pages and components are no singletons, they are 
stateful and session-scoped. This enables us to store user-specific information 
within pages and components. The information should be stored in fields. This 
way you can access the information within a class while avoiding long method 
signatures only for passing the same information around. Instances of 
components can exist for several requests. For example, a page with a form 
which gets submitted and produces validation errors uses the same page 
instance. Furthermore the same page instance gets used when the user presses 
the back button of the browser and resubmits this formular again. Information 
which gets passed by the constructor should be assigned to fields (normally 
this must be models). When storing information in fields you should consider 
that the information is serializable, because the pages are stored using Java 
serialization. By default Wicket stores pages on the hard disk. A 
non-serializabl
 e object leads to @NullPointerExceptions@ and @NonSerializableExceptions@. 
Additionally, big data (like binary stuff) should not be stored directly in 
fields because this can cause performance losses and memory leaks during 
serialization and deserialization. In this case, you should use the 
@LoadableDetachableModel@ which can be assigned to a field because this 
provides an efficient mechanism to load and detach data.
\ No newline at end of file



[jira] [Resolved] (WICKET-6195) ResourceMapper / ImageResourceReferences not working as expected

2016-07-13 Thread Martin Grigorov (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-6195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Grigorov resolved WICKET-6195.
-
Resolution: Not A Problem

> ResourceMapper / ImageResourceReferences not working as expected
> 
>
> Key: WICKET-6195
> URL: https://issues.apache.org/jira/browse/WICKET-6195
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 6.22.0
>Reporter: Patrick Davids
>Assignee: Martin Grigorov
> Attachments: imgres.tgz, imgres.zip
>
>
> Hi,
> as discussed in
> https://www.mail-archive.com/users@wicket.apache.org/msg89246.html
> It seems the ResourceMapper is not working as expected by tutorial:
> http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/
> ??The override of #equals() is the second requirement needed by 
> ResourceMapper to fully recognize the mapped resource.??
> \\
> _equals()_ is never called by wicket and _getResource()_ is always called, 
> returning a new instance.
> This is why I loose my lastModified information and always gets HTTP 200.
> When having a static instance of image resource in the image resource 
> reference; always returning the same instance when getResource() is called it 
> is working (get HTTP 304).
> See quickstart attached...
> kind regards
> Patrick



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (WICKET-6195) ResourceMapper / ImageResourceReferences not working as expected

2016-07-13 Thread Martin Grigorov (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-6195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Grigorov updated WICKET-6195:

Attachment: imgres.tgz

Attaching imgres.tgz with slight modification in DynamicPersonImageResource, 
added:

{code}

@Override
protected void configureResponse(final ResourceResponse response, final 
Attributes attributes) {
super.configureResponse(response, attributes);

response.setLastModified(Time.valueOf(TimeOfDay.MIDNIGHT));
}
{code}

and removed
{code}
setLastModifiedTime(Time.valueOf(TimeOfDay.MIDNIGHT));
{code}
from de.example.imgres.imgres.DynamicPersonImageResource#getImageData().

The requirement for IResource#equals() is obsolete. I'll update the blog 
article!

> ResourceMapper / ImageResourceReferences not working as expected
> 
>
> Key: WICKET-6195
> URL: https://issues.apache.org/jira/browse/WICKET-6195
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 6.22.0
>Reporter: Patrick Davids
>Assignee: Martin Grigorov
> Attachments: imgres.tgz, imgres.zip
>
>
> Hi,
> as discussed in
> https://www.mail-archive.com/users@wicket.apache.org/msg89246.html
> It seems the ResourceMapper is not working as expected by tutorial:
> http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/
> ??The override of #equals() is the second requirement needed by 
> ResourceMapper to fully recognize the mapped resource.??
> \\
> _equals()_ is never called by wicket and _getResource()_ is always called, 
> returning a new instance.
> This is why I loose my lastModified information and always gets HTTP 200.
> When having a static instance of image resource in the image resource 
> reference; always returning the same instance when getResource() is called it 
> is working (get HTTP 304).
> See quickstart attached...
> kind regards
> Patrick



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Assigned] (WICKET-6195) ResourceMapper / ImageResourceReferences not working as expected

2016-07-13 Thread Martin Grigorov (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-6195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Grigorov reassigned WICKET-6195:
---

Assignee: Martin Grigorov

> ResourceMapper / ImageResourceReferences not working as expected
> 
>
> Key: WICKET-6195
> URL: https://issues.apache.org/jira/browse/WICKET-6195
> Project: Wicket
>  Issue Type: Bug
>  Components: wicket
>Affects Versions: 6.22.0
>Reporter: Patrick Davids
>Assignee: Martin Grigorov
> Attachments: imgres.zip
>
>
> Hi,
> as discussed in
> https://www.mail-archive.com/users@wicket.apache.org/msg89246.html
> It seems the ResourceMapper is not working as expected by tutorial:
> http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/
> ??The override of #equals() is the second requirement needed by 
> ResourceMapper to fully recognize the mapped resource.??
> \\
> _equals()_ is never called by wicket and _getResource()_ is always called, 
> returning a new instance.
> This is why I loose my lastModified information and always gets HTTP 200.
> When having a static instance of image resource in the image resource 
> reference; always returning the same instance when getResource() is called it 
> is working (get HTTP 304).
> See quickstart attached...
> kind regards
> Patrick



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


wicket git commit: Remove some unnecessary array instantiations

2016-07-13 Thread mgrigorov
Repository: wicket
Updated Branches:
  refs/heads/master b9bd66453 -> abbd93f04


Remove some unnecessary array instantiations


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/abbd93f0
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/abbd93f0
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/abbd93f0

Branch: refs/heads/master
Commit: abbd93f0409df0a041144994e9ae2bfd3ad6b601
Parents: b9bd664
Author: Martin Tzvetanov Grigorov 
Authored: Wed Jul 13 23:24:39 2016 +0200
Committer: Martin Tzvetanov Grigorov 
Committed: Wed Jul 13 23:25:12 2016 +0200

--
 .../org/apache/wicket/page/PageAccessSynchronizer.java| 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/abbd93f0/wicket-core/src/main/java/org/apache/wicket/page/PageAccessSynchronizer.java
--
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/page/PageAccessSynchronizer.java 
b/wicket-core/src/main/java/org/apache/wicket/page/PageAccessSynchronizer.java
index 7986632..86fbb8b 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/page/PageAccessSynchronizer.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/page/PageAccessSynchronizer.java
@@ -142,9 +142,10 @@ public class PageAccessSynchronizer implements Serializable
if (logger.isWarnEnabled())
{
logger.warn(
-   "Thread '{}' failed to acquire lock to 
page with id '{}', attempted for {} out of allowed {}. The thread that holds 
the lock has name '{}'.",
-   new Object[] { thread.getName(), 
pageId, start.elapsedSince(), timeout,
-   
previous.thread.getName() });
+   "Thread '{}' failed to acquire lock to 
page with id '{}', attempted for {} out of allowed {}." +
+   " The thread that holds 
the lock has name '{}'.",
+   thread.getName(), pageId, 
start.elapsedSince(), timeout,
+   
previous.thread.getName());
if (Application.exists())
{
ThreadDumpStrategy strategy = 
Application.get()
@@ -338,7 +339,7 @@ public class PageAccessSynchronizer implements Serializable
if (isDebugEnabled)
{
logger.debug("{} waiting for lock to page {} 
for {}",
-   new Object[] { thread.getName(), 
pageId, Duration.milliseconds(remaining) });
+   thread.getName(), pageId, 
Duration.milliseconds(remaining));
}
try
{
@@ -346,7 +347,6 @@ public class PageAccessSynchronizer implements Serializable
}
catch (InterruptedException e)
{
-   // TODO better exception
throw new RuntimeException(e);
}
}



[jira] [Assigned] (WICKET-5623) Custom Getters and Setters for PropertyResolver

2016-07-13 Thread Sven Meier (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-5623?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sven Meier reassigned WICKET-5623:
--

Assignee: Sven Meier

> Custom Getters and Setters for PropertyResolver
> ---
>
> Key: WICKET-5623
> URL: https://issues.apache.org/jira/browse/WICKET-5623
> Project: Wicket
>  Issue Type: New Feature
>  Components: wicket
>Affects Versions: 6.15.0
>Reporter: Ilia Naryzhny
>Assignee: Sven Meier
>  Labels: properties, property-expression
>
> There is no way to customize getting of properties from the object. All 
> possible ways to gain properties are hardcoded in PropertyResolver. 
> But, for example, there is set of NoSQL document DBs which have some class 
> "Document" to work with DB. And to get some property of that document you 
> should call something like this: 'doc.getProperty("myPropertyName")'.
> Please add ability to customize obtaining properties from different kind of 
> objects.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


wicket git commit: WICKET-6199 Update Guide: Pagemaps are gone

2016-07-13 Thread adelbene
Repository: wicket
Updated Branches:
  refs/heads/master 6ec2d3164 -> b9bd66453


WICKET-6199 Update Guide: Pagemaps are gone

Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/b9bd6645
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/b9bd6645
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/b9bd6645

Branch: refs/heads/master
Commit: b9bd664535baf4a735fe533b08c8b59762900cff
Parents: 6ec2d31
Author: Andrea Del Bene 
Authored: Wed Jul 13 21:01:47 2016 +0200
Committer: Andrea Del Bene 
Committed: Wed Jul 13 21:03:31 2016 +0200

--
 .../src/docs/guide/bestpractices/bestpractices_2.gdoc  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/wicket/blob/b9bd6645/wicket-user-guide/src/docs/guide/bestpractices/bestpractices_2.gdoc
--
diff --git 
a/wicket-user-guide/src/docs/guide/bestpractices/bestpractices_2.gdoc 
b/wicket-user-guide/src/docs/guide/bestpractices/bestpractices_2.gdoc
index 63e99f0..8aa7620 100644
--- a/wicket-user-guide/src/docs/guide/bestpractices/bestpractices_2.gdoc
+++ b/wicket-user-guide/src/docs/guide/bestpractices/bestpractices_2.gdoc
@@ -1,3 +1,3 @@
 
 
-In contrast to Struts, Wicket pages and components are no singletons, they are 
stateful and session-scoped. This enables us to store user-specific information 
within pages and components. The information should be stored in fields. This 
way you can access the information within a class while avoiding long method 
signatures only for passing the same information around. Instances of 
components can exist for several requests. For example, a page with a form 
which gets submitted and produces validation errors uses the same page 
instance. Furthermore the same page instance gets used when the user presses 
the back button of the browser and resubmits this formular again. Information 
which gets passed by the constructor should be assigned to fields (normally 
this must be models). When storing information in fields you should consider 
that the information is serializable, because the pages are stored using Java 
serialization. By default the page map stores the pages on the hard disk. A 
non-s
 erializable object leads to @NullPointerExceptions@ and 
@NonSerializableExceptions@. Additionally, big data (like binary stuff) should 
not be stored directly in fields because this can cause performance losses and 
memory leaks during serialization and deserialization. In this case, you should 
use the @LoadableDetachableModel@ which can be assigned to a field because this 
provides an efficient mechanism to load and detach data.
\ No newline at end of file
+In contrast to Struts, Wicket pages and components are no singletons, they are 
stateful and session-scoped. This enables us to store user-specific information 
within pages and components. The information should be stored in fields. This 
way you can access the information within a class while avoiding long method 
signatures only for passing the same information around. Instances of 
components can exist for several requests. For example, a page with a form 
which gets submitted and produces validation errors uses the same page 
instance. Furthermore the same page instance gets used when the user presses 
the back button of the browser and resubmits this formular again. Information 
which gets passed by the constructor should be assigned to fields (normally 
this must be models). When storing information in fields you should consider 
that the information is serializable, because the pages are stored using Java 
serialization. By default Wicket stores pages on the hard disk. A 
non-serializabl
 e object leads to @NullPointerExceptions@ and @NonSerializableExceptions@. 
Additionally, big data (like binary stuff) should not be stored directly in 
fields because this can cause performance losses and memory leaks during 
serialization and deserialization. In this case, you should use the 
@LoadableDetachableModel@ which can be assigned to a field because this 
provides an efficient mechanism to load and detach data.
\ No newline at end of file



[jira] [Commented] (WICKET-6199) Update Guide: Pagemaps are gone

2016-07-13 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-6199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15375545#comment-15375545
 ] 

ASF subversion and git services commented on WICKET-6199:
-

Commit b9bd664535baf4a735fe533b08c8b59762900cff in wicket's branch 
refs/heads/master from [~bitstorm]
[ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=b9bd664 ]

WICKET-6199 Update Guide: Pagemaps are gone

> Update Guide: Pagemaps are gone
> ---
>
> Key: WICKET-6199
> URL: https://issues.apache.org/jira/browse/WICKET-6199
> Project: Wicket
>  Issue Type: Bug
>  Components: guide
>Affects Versions: 7.3.0
>Reporter: Jan Lühr
>Assignee: Andrea Del Bene
>Priority: Trivial
>
> Is - The Guide says: 
> " When storing information in fields you should consider that the information 
> is serializable, because the pages are stored in Wicket's page map. By 
> default the page map stores the pages on the hard disk."
> But: Page Maps are gone since 1.5 - this info is confusing.
> http://apache-wicket.1842946.n4.nabble.com/1-5-Page-Maps-td2998780.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Reopened] (WICKET-6199) Update Guide: Pagemaps are gone

2016-07-13 Thread Andrea Del Bene (JIRA)

 [ 
https://issues.apache.org/jira/browse/WICKET-6199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrea Del Bene reopened WICKET-6199:
-

> Update Guide: Pagemaps are gone
> ---
>
> Key: WICKET-6199
> URL: https://issues.apache.org/jira/browse/WICKET-6199
> Project: Wicket
>  Issue Type: Bug
>  Components: guide
>Affects Versions: 7.3.0
>Reporter: Jan Lühr
>Assignee: Andrea Del Bene
>Priority: Trivial
>
> Is - The Guide says: 
> " When storing information in fields you should consider that the information 
> is serializable, because the pages are stored in Wicket's page map. By 
> default the page map stores the pages on the hard disk."
> But: Page Maps are gone since 1.5 - this info is confusing.
> http://apache-wicket.1842946.n4.nabble.com/1-5-Page-Maps-td2998780.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WICKET-6199) Update Guide: Pagemaps are gone

2016-07-13 Thread Andrea Del Bene (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-6199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15374527#comment-15374527
 ] 

Andrea Del Bene commented on WICKET-6199:
-

Yep! Thank you! Time for a text-search :-).

> Update Guide: Pagemaps are gone
> ---
>
> Key: WICKET-6199
> URL: https://issues.apache.org/jira/browse/WICKET-6199
> Project: Wicket
>  Issue Type: Bug
>  Components: guide
>Affects Versions: 7.3.0
>Reporter: Jan Lühr
>Assignee: Andrea Del Bene
>Priority: Trivial
>
> Is - The Guide says: 
> " When storing information in fields you should consider that the information 
> is serializable, because the pages are stored in Wicket's page map. By 
> default the page map stores the pages on the hard disk."
> But: Page Maps are gone since 1.5 - this info is confusing.
> http://apache-wicket.1842946.n4.nabble.com/1-5-Page-Maps-td2998780.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)