Re: Wicket for Hybrid App

2013-03-27 Thread nazeem
My App is not static, I intend build some thing like this..

Phone gap + html + css + JS  >> Bundled as Android App / iPhone App

To start with need to be online, connect to the server using REST,
synchronize the data and store in local db storage via phone gap api's. 

Now when offline, the App uses local storage DB and when connected to
internet it sends all local stored or updated info to server  via REST and
pulls latest info from server. 

Do you see any issue with this ? I would love to use Wicket for the front
end, but not yet.. Can wicket generate client side stubs like DWR does ? 




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-for-Hybrid-App-tp4657458p4657602.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: jQuery Treeview Context menu in wicket

2013-03-27 Thread Leningovi
i want menu like in below link

Tree View with context Menu

  

in wicket .. please help me ... this is very urgent 

Thanks in advance



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/jQuery-Treeview-Context-menu-in-wicket-tp4657512p4657601.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: tomcat session replication

2013-03-27 Thread sauli.ketola
Dan Retzlaff wrote
> Alternatively, Tomcat 7 supports
> parallel deployments so theoretically you can upgrade in-place [1]. 
> [1]
> http://www.tomcatexpert.com/blog/2011/05/31/parallel-deployment-tomcat-7

Wow, I didn't know Tomcat had that feature. That could be the solution, I
need to try it out. Thanks!

-Sauli



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/tomcat-session-replication-tp1891781p4657600.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Proper resource versioning

2013-03-27 Thread Bertrand Guay-Paquet

Hi Dan,

Thanks for sharing this!

On 27/03/2013 6:24 PM, Dan Retzlaff wrote:

Hi, Bertrand. I don't have all your answers, but I can share my experience.

First, when you say you serve files out of webapp folder, do you mean
you're not using any ResourceReference? Just absolute paths from markup? I
think improving that is the first thing to do. You need to process resource
references in Java so you can introduce versions, CDN base URLs, etc.

To answer your question, here's what I use to access my webapp resources:
-ContextImage which uses context-relative urls
-RelativePathPrefixHandler which handles hrefs in the markup and makes 
them context-relative

-UrlResourceReference with, again, context-relative urls


The main caching problem we had was that after upgrades, some clients had
the old CSS cached and the site looked funky for them. So we went through
and made sure all CSS is served through PackageResourceReferences. Wicket's
default versioning strategy then did its magic and that complaint stopped.

With respect to @import, we have many @imports in our source LESS, but by
the time it's being served, the CSS is flat. So versioning that is enough.
It's possible but I think far less likely that this kind of caching problem
will happen for images and fonts. Direct references to these from our
application still go through ResourceReferences just so they can be served
from CDN, but we don't worry about relative-path includes from CSS.

What does LESS mean in the first line of the paragraph above?

Do you do anything special to "flatten" the css files?

So, to not "worry about relative-path includes from CSS", you must make 
the images non-versioned, correct? Do you do this using 
ResourceReferences and IStaticCacheableResource#isCachingEnabled() ?


If you use ResourceRefenrecs, does that mean that all your assets (css, 
js, images,...) are stored along with the java class files (i.e. 
src/main/resources in Maven terms) ?


Thanks again!
Bertrand

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



Re: Free Wicket guide now available!

2013-03-27 Thread Duy Do
Amazing work. Thank you for your contribution to Wicket community.


On Thu, Mar 28, 2013 at 12:18 AM, Andrea Del Bene wrote:

> Hi Martin,
>
> thank you for your kind support. I'm having some difficulty creating a
> patch containing a binary file (the book cover). Any advice or suggestion?
>
>  Well done, Andrea!
>>
>> Create a cover image and we should add your guide to
>> http://wicket.apache.org/**learn/books/
>> Or just send a patch with the addition -
>> https://svn.apache.org/repos/**asf/wicket/common/site/trunk/**learn/books
>>
>>
>> On Thu, Mar 21, 2013 at 5:51 PM, Andrea Del Bene > >wrote:
>>
>>  Dear Wicketers,
>>>
>>> I'm really excited to announce that, after almost two years of work (in
>>> may spare time), I've finished and published my free guide to Wicket!
>>> You can find it at 
>>> https://code.google.com/p/wicket-guide/
>>> 
>>> >.
>>> I've chosen to use Google Project because many of us have a gmail account
>>> that can be used to sign in and leave a feedback (for example opening an
>>> issue). The document is structured as a step-by-step tutorial and is
>>> released under Creative Commons license (CC BY-NC-SA 3.0). Unfortunately
>>> I
>>> didn't cover yet the topic of WebSocket, but I think that writing a
>>> chapter
>>> on it will be my very next step :).
>>>
>>> Hope you find it helpful!
>>>
>>> PS: feel free to contact me via mail. Any feedback is REALLY appreciated!
>>>
>>> --**
>>> --**-
>>> To unsubscribe, e-mail: 
>>> users-unsubscribe@wicket.**apa**che.org
>>> 
>>> >
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>>
>>
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@wicket.**apache.org
>
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Duy Do


question about page variable in AjaxRequestHandler

2013-03-27 Thread Andrew Geery
I just wanted to confirm that add(Component...) in AjaxRequestHandler
will only work with (i.e., refresh) components that are on the same
page as the page associated with the AjaxRequestHandler.

I had a case where the content of a ModalWindow was a WebPage.  In the
modal window, there was an AjaxLink where I was trying to update a
component on the underlying page in the onSubmit method using the
AjaxRequestHandler object (not directly, in an event handler on the
underlying page).  However, this didn't work and I noticed that the
AjaxRequestHandler object referred to the WebPage in the modal window,
not the page from which the modal was launched.  If I change from
using a page in the modal to using a panel (and thus the
AjaxRequestHandler.page refers to the underlying page), the underlying
page gets properly updated.

If it is true that an AjaxRequestHandler can only be used to update
components on the page it is associated with, would it make sense to
add a warning to either AjaxjRequestHandler or AbstractAjaxResponse if
a component is added which is not on the page associated with the
AjaxRequestHander or AbstractAjaxResponse?

Thanks
Andrew

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



Events: Atmosphere vs. Guava vs Wicket native

2013-03-27 Thread yarnish
Hey guys

I'm making a Wicket 6 application that will use Atmosphere for server push
events. I am also planning to use events to communicate between wicket
components (for any messages between components not defined in the same
class) and possibly to use events/observers for internal application
business logic.

One of the guides/examples on using Atmosphere talket about using Guava for
application events and just using Atmosphere for server push events to the
client. I can understand if you want to keep a loose coupling between a
wicket front end and your business logic, but it seems to me that Atmosphere
could be used for events, even in the case that you wanted to use another
front-end framework.

Are there any good arguments for not just using Atmosphere events throughout
the application, completely avoiding Wicket and Guava events? Are there
significants advantages (for instance performance related) to using wicket
native events for the component-component messaging? Is there a consensus
about what is best-practice, or is it mainly a matter of taste.

Looking forward to hearing your thoughts on the matter. Thanks in advance

Jarnis



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Events-Atmosphere-vs-Guava-vs-Wicket-native-tp4657595.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Exception with validator

2013-03-27 Thread Entropy
On Wed, Mar 27, 2013 at 4:55 PM, Sven Meier [via Apache Wicket]
 wrote:
> LookupService is probably coming from another class loader than the
> Wicket classes.

I'm not sure why that would be.  All our pages are launched from the
same menu, my new one included.  They all load their springbeans using
@SpringBean, as does the panel I am re-using which I "new"ed from the
wicket constructor just like everyone else does.  Wicket shouldn't
have been launched using any bootstrap classloader, nor would the
spring context I should think.  I will construct a test of this in the
morning.

> Any particular reason, why you're using Wicket 1.4.x?
> The code to resolve the class on deserialization has been improved with
> Wicket 1.5.x to use the current thread's context class loader.

Well, this is a project where getting approval in the schedule to do
pretty much ANYTHING is largely mandatory.  And approvers don't put a
high priority on upgrading for the sake of upgrading.  They usually
have to be given some compelling specific reason...the new version
fixes a bug that is hurting us, the new version performs better, etc.
No other pages are having this problem, so I don't know if this would
qualify.  I certainly will run it up the flagpole.  But I wouldn't
hold my breath.

> Regards
> Sven
>
>
> On 03/27/2013 07:49 PM, Entropy wrote:
>
>> I tried marking the properties as transient, which got me past that error,
>> but then the properties are null after the validation and that is not
>> really
>> better.  :(
>>
>>
>> Entropy wrote
>>> Form and button works fine without my validator (sounds similar to my
>>> last
>>> message but this is the next problem).  Validator puts up message, and
>>> reloads page with error in it on form submit.  But the following
>>> exception
>>> appears in my console.  The situation is that a re-usable panel has an
>>> @SpringBean property on it.  There is a an extension of that class that a
>>> panel on my page uses.
>>>
>>> The @SpringBean plainly works at first.  The lookupService is set, and
>>> works fine within the reusable panel.  Until I test the error condition.
>>> Then this happens in the console.
>>>
>>> [3/27/13 13:24:08:547 EDT] 002a SystemOut O ERROR [WebContainer :
>>> 8] (RequestCycle.java:1521) - Could not deserialize object using
>>>
>>> `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
>>> object factory
>>> java.lang.RuntimeException: Could not deserialize object using
>>>
>>> `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
>>> object factory
>>> at
>>> org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:435)
>>> at
>>>
>>> org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deserializePage(AbstractPageStore.java:234)
>>> at
>>>
>>> org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskPageStore.java:735)
>>> at
>>>
>>> org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.get(SecondLevelCacheSessionStore.java:310)
>>> at org.apache.wicket.Session.getPage(Session.java:779)
>>> at
>>>
>>> org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:458)
>>> at
>>>
>>> org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:144)
>>> at org.apache.wicket.RequestCycle.step(RequestCycle.java:1310)
>>> at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
>>> at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
>>> at
>>> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479)
>>> at
>>>
>>> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:312)
>>> at
>>>
>>> com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
>>> at
>>>
>>> com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
>>> at
>>>
>>> com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
>>> at
>>>
>>> com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
>>> at
>>>
>>> com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:997)
>>> at
>>>
>>> com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.invokeFilters(DefaultExtensionProcessor.java:1043)
>>> at
>>>
>>> com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:740)
>>> at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3933)
>>> at
>>> com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
>>> at
>>> com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931)
>>> at
>>>
>>> com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
>>> at
>>>
>>> com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
>>> at
>>>
>>> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDi

Re: Proper resource versioning

2013-03-27 Thread Dan Retzlaff
Hi, Bertrand. I don't have all your answers, but I can share my experience.

First, when you say you serve files out of webapp folder, do you mean
you're not using any ResourceReference? Just absolute paths from markup? I
think improving that is the first thing to do. You need to process resource
references in Java so you can introduce versions, CDN base URLs, etc.

The main caching problem we had was that after upgrades, some clients had
the old CSS cached and the site looked funky for them. So we went through
and made sure all CSS is served through PackageResourceReferences. Wicket's
default versioning strategy then did its magic and that complaint stopped.

With respect to @import, we have many @imports in our source LESS, but by
the time it's being served, the CSS is flat. So versioning that is enough.
It's possible but I think far less likely that this kind of caching problem
will happen for images and fonts. Direct references to these from our
application still go through ResourceReferences just so they can be served
from CDN, but we don't worry about relative-path includes from CSS.

Hope that helps.

Dan

On Wed, Mar 27, 2013 at 2:15 PM, Bertrand Guay-Paquet <
ber...@step.polymtl.ca> wrote:

> Hello,
>
> I'm trying to figure out the optimal way to deal with caching and out of
> date resources and can't really find which methodology to adopt.
>
> Considering that:
> a) css and js files are only accessed from web pages
> b) image files are accessed from web pages and from email clients (links
> stored for a long time)
> c) image files are referenced from css (e.g. background-image url)
> d) font files are accessed from web pages and maybe eventually from email
> clients
> e) some css files currently use "@import" statements to include other css
> files (this could be removed if needed)
> f) css, js, fonts and images currently are all located in the webapp
> folder (i.e. I wasn't able to access them with PackageResourceReference)
> g) whatever the approach, it needs to be compatible with eventual usage of
> CDN services
>
> Questions:
> 1- Which files should be versioned?
> 2- Should they be versioned using Wicket's ResourceReferences?
> 3- Are there other considerations I haven't thought about?
> 4- Which successful approaches are in use now by other Wicker users?
>
> Thanks for your insight!
>
> Regards,
> Bertrand
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@wicket.**apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Proper resource versioning

2013-03-27 Thread Bertrand Guay-Paquet

Hello,

I'm trying to figure out the optimal way to deal with caching and out of 
date resources and can't really find which methodology to adopt.


Considering that:
a) css and js files are only accessed from web pages
b) image files are accessed from web pages and from email clients (links 
stored for a long time)

c) image files are referenced from css (e.g. background-image url)
d) font files are accessed from web pages and maybe eventually from 
email clients
e) some css files currently use "@import" statements to include other 
css files (this could be removed if needed)
f) css, js, fonts and images currently are all located in the webapp 
folder (i.e. I wasn't able to access them with PackageResourceReference)
g) whatever the approach, it needs to be compatible with eventual usage 
of CDN services


Questions:
1- Which files should be versioned?
2- Should they be versioned using Wicket's ResourceReferences?
3- Are there other considerations I haven't thought about?
4- Which successful approaches are in use now by other Wicker users?

Thanks for your insight!

Regards,
Bertrand

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



Re: Exception with validator

2013-03-27 Thread Sven Meier
LookupService is probably coming from another class loader than the 
Wicket classes.


Any particular reason, why you're using Wicket 1.4.x?
The code to resolve the class on deserialization has been improved with 
Wicket 1.5.x to use the current thread's context class loader.


Regards
Sven


On 03/27/2013 07:49 PM, Entropy wrote:

I tried marking the properties as transient, which got me past that error,
but then the properties are null after the validation and that is not really
better.  :(


Entropy wrote

Form and button works fine without my validator (sounds similar to my last
message but this is the next problem).  Validator puts up message, and
reloads page with error in it on form submit.  But the following exception
appears in my console.  The situation is that a re-usable panel has an
@SpringBean property on it.  There is a an extension of that class that a
panel on my page uses.

The @SpringBean plainly works at first.  The lookupService is set, and
works fine within the reusable panel.  Until I test the error condition.
Then this happens in the console.

[3/27/13 13:24:08:547 EDT] 002a SystemOut O ERROR [WebContainer :
8] (RequestCycle.java:1521) - Could not deserialize object using
`org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
object factory
java.lang.RuntimeException: Could not deserialize object using
`org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
object factory
at
org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:435)
at
org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deserializePage(AbstractPageStore.java:234)
at
org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskPageStore.java:735)
at
org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.get(SecondLevelCacheSessionStore.java:310)
at org.apache.wicket.Session.getPage(Session.java:779)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:458)
at
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:144)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1310)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:312)
at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at
com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:997)
at
com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.invokeFilters(DefaultExtensionProcessor.java:1043)
at
com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:740)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3933)
at
com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931)
at
com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
at
com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at
com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)
Caused by:
java.io.InvalidClassException: gov.usdoj.afms.umc.services.LookupService;
could not resolve class [gov

Re: Ajax and validators

2013-03-27 Thread Sven Meier

AjaxLink doesn't submit the form, thus no input for FormComponents.

Sven

On 03/27/2013 06:34 PM, Entropy wrote:

Thanks Sven, that was what I needed.

Just for my learning, why doesn't AjaxLink report the user input?  If it is
not meant to, it doesn't seem to serve a purpose, so I have to assume I did
something wrong there as well.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Ajax-and-validators-tp4657570p4657586.html
Sent from the Users forum mailing list archive at Nabble.com.

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




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



Re: Exception with validator

2013-03-27 Thread Entropy
I tried marking the properties as transient, which got me past that error,
but then the properties are null after the validation and that is not really
better.  :(


Entropy wrote
> Form and button works fine without my validator (sounds similar to my last
> message but this is the next problem).  Validator puts up message, and
> reloads page with error in it on form submit.  But the following exception
> appears in my console.  The situation is that a re-usable panel has an
> @SpringBean property on it.  There is a an extension of that class that a
> panel on my page uses.
> 
> The @SpringBean plainly works at first.  The lookupService is set, and
> works fine within the reusable panel.  Until I test the error condition. 
> Then this happens in the console.
> 
> [3/27/13 13:24:08:547 EDT] 002a SystemOut O ERROR [WebContainer :
> 8] (RequestCycle.java:1521) - Could not deserialize object using
> `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
> object factory
> java.lang.RuntimeException: Could not deserialize object using
> `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
> object factory
>   at
> org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:435)
>   at
> org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deserializePage(AbstractPageStore.java:234)
>   at
> org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskPageStore.java:735)
>   at
> org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.get(SecondLevelCacheSessionStore.java:310)
>   at org.apache.wicket.Session.getPage(Session.java:779)
>   at
> org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:458)
>   at
> org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:144)
>   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1310)
>   at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
>   at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
>   at
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479)
>   at
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:312)
>   at
> com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
>   at
> com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
>   at
> com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
>   at
> com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
>   at
> com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:997)
>   at
> com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.invokeFilters(DefaultExtensionProcessor.java:1043)
>   at
> com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:740)
>   at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3933)
>   at
> com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
>   at
> com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931)
>   at
> com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
>   at
> com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
>   at
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
>   at
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
>   at
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
>   at
> com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
>   at
> com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
>   at
> com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
>   at
> com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
>   at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
>   at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
>   at
> com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
>   at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
>   at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)
> Caused by: 
> java.io.InvalidClassException: gov.usdoj.afms.umc.services.LookupService;
> could not resolve class [gov.usdoj.afms.umc.services.LookupService] when
> deserializing proxy
>   at
> org.apache.wicket.proxy.LazyInitProxyFactory$ProxyReplacement.readResolve(LazyInitProxyFactory.java:236)
>   at sun.reflect.NativeMethodAccessorImpl.invo

Re: Exception with validator

2013-03-27 Thread Entropy
I meant to also mention that while other pages in the app use this panel and
do NOT have this problem, those other pages do not have an extension of that
class.  I know some annotations do not inherit, but again, the lookupService
is loaded at first.


Entropy wrote
> Form and button works fine without my validator (sounds similar to my last
> message but this is the next problem).  Validator puts up message, and
> reloads page with error in it on form submit.  But the following exception
> appears in my console.  The situation is that a re-usable panel has an
> @SpringBean property on it.  There is a an extension of that class that a
> panel on my page uses.
> 
> The @SpringBean plainly works at first.  The lookupService is set, and
> works fine within the reusable panel.  Until I test the error condition. 
> Then this happens in the console.
> 
> [3/27/13 13:24:08:547 EDT] 002a SystemOut O ERROR [WebContainer :
> 8] (RequestCycle.java:1521) - Could not deserialize object using
> `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
> object factory
> java.lang.RuntimeException: Could not deserialize object using
> `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
> object factory
>   at
> org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:435)
>   at
> org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deserializePage(AbstractPageStore.java:234)
>   at
> org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskPageStore.java:735)
>   at
> org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.get(SecondLevelCacheSessionStore.java:310)
>   at org.apache.wicket.Session.getPage(Session.java:779)
>   at
> org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:458)
>   at
> org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:144)
>   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1310)
>   at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
>   at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
>   at
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479)
>   at
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:312)
>   at
> com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
>   at
> com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
>   at
> com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
>   at
> com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
>   at
> com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:997)
>   at
> com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.invokeFilters(DefaultExtensionProcessor.java:1043)
>   at
> com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:740)
>   at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3933)
>   at
> com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
>   at
> com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931)
>   at
> com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
>   at
> com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
>   at
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
>   at
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
>   at
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
>   at
> com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
>   at
> com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
>   at
> com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
>   at
> com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
>   at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
>   at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
>   at
> com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
>   at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
>   at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)
> Caused by: 
> java.io.InvalidClassException: gov.usdoj.afms.umc.services.LookupService;
> could not resolve class [gov.usdoj.afms.umc.services.LookupService] when
> deserializing proxy
>   at
> org.apache.wicket.proxy.LazyInitProxyFactory$ProxyReplacement.readReso

Exception with validator

2013-03-27 Thread Entropy
Form and button works fine without my validator (sounds similar to my last
message but this is the next problem).  Validator puts up message, and
reloads page with error in it on form submit.  But the following exception
appears in my console.  The situation is that a re-usable panel has an
@SpringBean property on it.  There is a an extension of that class that a
panel on my page uses.

The @SpringBean plainly works at first.  The lookupService is set, and works
fine within the reusable panel.  Until I test the error condition.  Then
this happens in the console.

[3/27/13 13:24:08:547 EDT] 002a SystemOut O ERROR [WebContainer : 8]
(RequestCycle.java:1521) - Could not deserialize object using
`org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
object factory
java.lang.RuntimeException: Could not deserialize object using
`org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory`
object factory
at 
org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:435)
at
org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deserializePage(AbstractPageStore.java:234)
at
org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskPageStore.java:735)
at
org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.get(SecondLevelCacheSessionStore.java:310)
at org.apache.wicket.Session.getPage(Session.java:779)
at
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:458)
at
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:144)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1310)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:312)
at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at
com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:997)
at
com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.invokeFilters(DefaultExtensionProcessor.java:1043)
at
com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:740)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3933)
at 
com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931)
at
com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
at
com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at
com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)
Caused by: 
java.io.InvalidClassException: gov.usdoj.afms.umc.services.LookupService;
could not resolve class [gov.usdoj.afms.umc.services.LookupService] when
deserializing proxy
at
org.apache.wicket.proxy.LazyInitProxyFactory$ProxyReplacement.readResolve(LazyInitProxyFactory.java:236)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at 
j

HttpsMapper not Switching to SSL When there is no JsessionId Cookie

2013-03-27 Thread Tim Urberg

Hi Everyone,

I'm having an issue with HttpsMapper not switching to SSL when there is 
no JSESSIONID cookie.  It's happening with wicket-auth-roles when the 
user goes to the home page, which need authentication.  I have this code 
in my init method in my WebApplication class.


getSecuritySettings().setAuthorizationStrategy(new IAuthorizationStrategy()
{
   @Override
   public  boolean 
isInstantiationAuthorized(Class componentClass)

   {
  if (AuthenticatedWebPage.class.isAssignableFrom(componentClass))
  {
 if (MyAuthenticatedWebSession.get().isSignedIn())
return true;

 throw new RestartResponseAtInterceptPageException(new 
LoginPage());

  }

  return true;
   }

   @Override
   public boolean isActionAuthorized(Component component, Action action)
   {
  return true;
   }
});

HomePage implements AuthenticatedWebPage and LoginPage has the 
@RequireHttps annotation.  This only seems to happen when there is no 
JSESSIONID cookie.  The URL looks like this:


http://localhost:7011/documentation/login;jsessionid=1c9nRTpWGWynRXdX1WKC5ZnSfTNKCydGTdHH83mvfXQZQcQ8fLpx!-1875818450?0

when it should be https://localhost:7012/login.  If I try it a second 
time after the cookie has been created it works fine.  This is not a 
problem when I go straight to http://localhost:7011/login (works fine 
then).  Just wondering if anyone else has this problem.


Thanks,
Tim

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



Re: Ajax and validators

2013-03-27 Thread Entropy
Thanks Sven, that was what I needed.  

Just for my learning, why doesn't AjaxLink report the user input?  If it is
not meant to, it doesn't seem to serve a purpose, so I have to assume I did
something wrong there as well.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Ajax-and-validators-tp4657570p4657586.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Free Wicket guide now available!

2013-03-27 Thread Andrea Del Bene

Hi Martin,

thank you for your kind support. I'm having some difficulty creating a 
patch containing a binary file (the book cover). Any advice or suggestion?

Well done, Andrea!

Create a cover image and we should add your guide to
http://wicket.apache.org/learn/books/
Or just send a patch with the addition -
https://svn.apache.org/repos/asf/wicket/common/site/trunk/learn/books


On Thu, Mar 21, 2013 at 5:51 PM, Andrea Del Bene wrote:


Dear Wicketers,

I'm really excited to announce that, after almost two years of work (in
may spare time), I've finished and published my free guide to Wicket!
You can find it at 
https://code.google.com/p/**wicket-guide/.
I've chosen to use Google Project because many of us have a gmail account
that can be used to sign in and leave a feedback (for example opening an
issue). The document is structured as a step-by-step tutorial and is
released under Creative Commons license (CC BY-NC-SA 3.0). Unfortunately I
didn't cover yet the topic of WebSocket, but I think that writing a chapter
on it will be my very next step :).

Hope you find it helpful!

PS: feel free to contact me via mail. Any feedback is REALLY appreciated!

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







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



Re: how to create a new Session

2013-03-27 Thread Paul Bors
Wait I got this, you could use some subliminal algorithm to figure out that
the new person at the keyboard is not the same one and then log them out :)

~ Thank you,
   Paul Bors

On Wed, Mar 27, 2013 at 12:31 PM, Paul Bors  wrote:

> Ohh, and yes. If a new tab opens while a session is still around isn't
> that normal to take over the existing session?
>
> Is like leaving home w/o locking the front door and then expecting to find
> it locked when you come back from work.
> Set the session time out to a smaller amount of time, like 1 min to solve
> that problem.
> ~ Thank you,
>Paul Bors
> On Wed, Mar 27, 2013 at 12:28 PM, Paul Bors  wrote:
>
>> Not even, he already knows is a new session:
>>
>> "A new user comes and tries to log in (before the
>> session expires). He would get the same session, wouldn't he? How can I
>> enforce that he get a new session?"
>>
>> I advise you only create new sessions after the user authenticates (ie: 
>> always
>> create a new session each time you log in).
>> Any old versions such as the one left behind because of the closed tab,
>> let it expire and it would eventually be cleaned up.
>>
>> ~ Thank you,
>>Paul Bors
>>
>> On Wed, Mar 27, 2013 at 11:36 AM, Martin Grigorov 
>> wrote:
>>
>>> On Wed, Mar 27, 2013 at 5:34 PM, Hans Lesmeister 2 <
>>> hans.lesmeis...@lessy-software.de> wrote:
>>>
>>> > you might be looking for Session.replaceSession()
>>> >
>>>
>>> plus WebRTC and face recognition
>>>
>>> you need to find out somehow that another person is using the session of
>>> the first person
>>>
>>>
>>>
>>> >
>>> >
>>> >
>>> > -
>>> > --
>>> > Regards,
>>> > Hans
>>> >
>>> > http://cantaa.de
>>> >
>>> > --
>>> > View this message in context:
>>> >
>>> http://apache-wicket.1842946.n4.nabble.com/how-to-create-a-new-Session-tp4657553p4657574.html
>>> > Sent from the Users forum mailing list archive at Nabble.com.
>>> >
>>> > -
>>> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> > For additional commands, e-mail: users-h...@wicket.apache.org
>>> >
>>> >
>>>
>>>
>>> --
>>> Martin Grigorov
>>> jWeekend
>>> Training, Consulting, Development
>>> http://jWeekend.com 
>>>
>>
>>
>


Re: how to create a new Session

2013-03-27 Thread Paul Bors
Ohh, and yes. If a new tab opens while a session is still around isn't that
normal to take over the existing session?

Is like leaving home w/o locking the front door and then expecting to find
it locked when you come back from work.
Set the session time out to a smaller amount of time, like 1 min to solve
that problem.
~ Thank you,
   Paul Bors
On Wed, Mar 27, 2013 at 12:28 PM, Paul Bors  wrote:

> Not even, he already knows is a new session:
>
> "A new user comes and tries to log in (before the
> session expires). He would get the same session, wouldn't he? How can I
> enforce that he get a new session?"
>
> I advise you only create new sessions after the user authenticates (ie: always
> create a new session each time you log in).
> Any old versions such as the one left behind because of the closed tab,
> let it expire and it would eventually be cleaned up.
>
> ~ Thank you,
>Paul Bors
>
> On Wed, Mar 27, 2013 at 11:36 AM, Martin Grigorov wrote:
>
>> On Wed, Mar 27, 2013 at 5:34 PM, Hans Lesmeister 2 <
>> hans.lesmeis...@lessy-software.de> wrote:
>>
>> > you might be looking for Session.replaceSession()
>> >
>>
>> plus WebRTC and face recognition
>>
>> you need to find out somehow that another person is using the session of
>> the first person
>>
>>
>>
>> >
>> >
>> >
>> > -
>> > --
>> > Regards,
>> > Hans
>> >
>> > http://cantaa.de
>> >
>> > --
>> > View this message in context:
>> >
>> http://apache-wicket.1842946.n4.nabble.com/how-to-create-a-new-Session-tp4657553p4657574.html
>> > Sent from the Users forum mailing list archive at Nabble.com.
>> >
>> > -
>> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> > For additional commands, e-mail: users-h...@wicket.apache.org
>> >
>> >
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com 
>>
>
>


Re: how to create a new Session

2013-03-27 Thread Paul Bors
Not even, he already knows is a new session:

"A new user comes and tries to log in (before the
session expires). He would get the same session, wouldn't he? How can I
enforce that he get a new session?"

I advise you only create new sessions after the user authenticates (ie: always
create a new session each time you log in).
Any old versions such as the one left behind because of the closed tab, let
it expire and it would eventually be cleaned up.

~ Thank you,
   Paul Bors

On Wed, Mar 27, 2013 at 11:36 AM, Martin Grigorov wrote:

> On Wed, Mar 27, 2013 at 5:34 PM, Hans Lesmeister 2 <
> hans.lesmeis...@lessy-software.de> wrote:
>
> > you might be looking for Session.replaceSession()
> >
>
> plus WebRTC and face recognition
>
> you need to find out somehow that another person is using the session of
> the first person
>
>
>
> >
> >
> >
> > -
> > --
> > Regards,
> > Hans
> >
> > http://cantaa.de
> >
> > --
> > View this message in context:
> >
> http://apache-wicket.1842946.n4.nabble.com/how-to-create-a-new-Session-tp4657553p4657574.html
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com 
>


Re: Adding a large amount of MarkupContainers into the ListView or RepeatingView

2013-03-27 Thread Paul Bors
Get rid of your large scroll area and use data tables with 50-100 rows per
page along with a filter panel.
That'll be more like the "wicket developer" way.

As for the fancy infinite scrolling, I would strongly suggest you take the
advise and consider what Martin said about using lazy loading repeaters
with DOM elements being added and removed unless you want to get the all
familiar "This application stopped responding, would you like to terminate
it now" error from Windows whenever you scroll past first few hundred rows
in IE :)

~ Thank you,
   Paul Bors

On Wed, Mar 27, 2013 at 9:29 AM, vineet semwal wrote:

> i was expecting this case too :-) but it's a very unusual usecase for a
> *user* but not for wicket developer ,i have an easy(may be stupid) idea for
> this,no need of quickview :-) ,show only one repeater's page items  to user
> like as usual.., on scroll event just  repaint the repeater's parent
> ,foreg. with dataview on event
>
> dataview.setcurrentpage(dataview.getcurrentpage()+1) //plus or minus 1
> depending on scroll direction
> target.add(parent)
>
> that might be the cheapest/baddest way of achieving this usecase :-)
>
>
> On Wed, Mar 27, 2013 at 5:28 PM, Martin Grigorov  >wrote:
>
> > Hi,
> >
> > I mean something like
> > https://github.com/mleibman/SlickGrid/wiki#virtual-rendering - DOM
> objects
> > are added and removed while scrolling, thus keeping the DOM tree size
> small
> >
> >
> > On Wed, Mar 27, 2013 at 12:52 PM, vineet semwal <
> vineetsemwa...@gmail.com
> > >wrote:
> >
> > > hi ,
> > > do you mean removing items when you said unloading?
> > > the scroll behavior and navigator that are in the package just do
> > > quickview#addItemsForNextPage()  on event like in this example
> > >
> > >
> >
> https://github.com/vineetsemwal/quickview/blob/master/wicket-quickview-examples/src/main/java/com/aplombee/examples/PageScrollBar.java
> > >
> > > somone who doesn't want to maintain state can do
> > >
> > > *protected* void onScroll(AjaxRequestTarget target) {
> > > //this removes items but do not update client view
> > > quickView.simpleRemoveAll();
> > >  addItemsForNextPage(quickView);
> > > }
> > >
> > > as in this case the state is not maintained hence not good for someone
> > > who wants to use stateful components ..
> > > may be i am just misunderstanding you :-)
> > >
> > >
> > >
> > > On Wed, Mar 27, 2013 at 1:01 PM, Martin Grigorov  > > >wrote:
> > >
> > > > Check https://github.com/vineetsemwal/quickview - a lazy loading
> > > repeater.
> > > > I'm not sure whether it also unloads items which are no more visible.
> > > >
> > > >
> > > > On Wed, Mar 27, 2013 at 12:16 AM, Ernesto Reinaldo Barreiro <
> > > > reier...@gmail.com> wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > Angular is just a "detail" on the approach I was suggesting... You
> > can
> > > > > achieve "the same" using "plain" jquery to ask for JSON and do
> > > "creation"
> > > > > of rows at client side iterating over results. If you do thing
> nicely
> > > you
> > > > > can still have some kind of componentization and the performance
> will
> > > be
> > > > a
> > > > > lot better...  Not to mention use of resources at server side.
> > > > >
> > > > > On Tue, Mar 26, 2013 at 9:10 PM, Marco Springer <
> ma...@glitchbox.nl>
> > > > > wrote:
> > > > >
> > > > > > I've looked at Angular a while back and it certainly looks
> > > interesting.
> > > > > >
> > > > > > However I don't think it's wise to introduce another technology
> > > within
> > > > > the
> > > > > > current company where I'm migrating a rather large CGI-BIN
> > > application
> > > > > to a
> > > > > > Wicket variant and into several modules.
> > > > > > I'm the main JAVA/Wicket guy now, the others are mainly C++
> > > developers
> > > > > with
> > > > > > some JAVA knowledge and growing in that knowledge as more and
> more
> > > > parts
> > > > > > are
> > > > > > converted into Wicket counterparts.
> > > > > > So they already have to get known with:
> > > > > > Hibernate, parts of Spring, Wicket, Maven and HTML, CSS & JS.
> > > > > >
> > > > > > Sooo for now.. I'm sticking with Wicket only.
> > > > > > And with the zoomed out version and restricting the date range,
> > ergo
> > > > > > reducing
> > > > > > the amount of components.., that fixes things.
> > > > > >
> > > > > > The future will give me plenty of time make things even fancier.
> > > > Perhaps
> > > > > > even
> > > > > > the use of Angular.
> > > > > >
> > > > > > On Tuesday 26 March 2013 19:55:30 Ernesto Reinaldo Barreiro
> wrote:
> > > > > > > I mean: This same component could be used as "context" for AJAX
> > > > > > > interactions.
> > > > > > >
> > > > > > > On Tue, Mar 26, 2013 at 7:42 PM, Ernesto Reinaldo Barreiro <
> > > > > > >
> > > > > > > reier...@gmail.com> wrote:
> > > > > > > > Why don't you try rolling your own component that at sever
> side
> > > > just
> > > > > > > > serves JSON and you build up "rich functionality" at client
> > side.
> > > > > This
> > 

Re: tomcat session replication

2013-03-27 Thread Dan Retzlaff
Hi, Sauli.

The context of your question is not clear to me. Are you trying to upgrade
a running cluster?

I have not used Nginx, but Apache HTTPD allows you to disable balancer
members from receiving new sessions. Alternatively, Tomcat 7 supports
parallel deployments so theoretically you can upgrade in-place [1]. In any
case, my understanding is that the main risk to abruptly taking a node down
is that the new node won't have users' page history (in DiskDataStore). His
current page and session state will however be available.

Any confirmation or correction of these statements from the community would
be appreciated.

Dan

[1] http://www.tomcatexpert.com/blog/2011/05/31/parallel-deployment-tomcat-7

On Wed, Mar 27, 2013 at 7:50 AM, sauli.ketola  wrote:

> Igor Vaynberg-2 wrote
> > ..the loadbalancer is
> > configured to only send new sessions to A while B is being "starved"
> > of new sessions.
>
> I know this is an old thread but I found it just now when facing a similar
> case.
> Could you or someone explain more: How do you do this and what load
> balancer
> are you using for this? Do you know would nginx support this?
>
> I would guess that it would be pretty common to have to wait for sessions
> to
> die before starting to install the server but it seems to be pretty hard to
> find any concrete examples.
>
> If someone could point me to the right direction, I'd appreciate it.
>
> -Sauli
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/tomcat-session-replication-tp1891781p4657571.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: AjaxLink with image

2013-03-27 Thread Paul Bors
I take it delete.png is in the same package as SabcActionsPanel.class and
they both are in a jar that's placed on your classpath and end up in your
deployed folder under WEB-INF\lib.

Have you checked the HTML source code of your page after wicket rendered it
on  your page and that your  changed to
something like ?

Try loading that relative SRC in your browser's URL. Can you get to that
image?
~ Thank you,
   Paul Bors
On Wed, Mar 27, 2013 at 3:49 AM, Marco Springer  wrote:

> The Markup is missing somehow but I'd say the following HTML should do the
> trick:
> 
>   
> 
>
> Check the log if it isn't complaining that it can't find the "delete.png"
> file..
>
> On Tuesday 26 March 2013 16:39:26 grazia wrote:
> > The image in the AjaxLink does not display, anyone could help me figure
> this
> > one out ?
> >
> >private static final ResourceReference DELETE = new
> > PackageResourceReference(SabcActionsPanel.class, "delete.png");
> >
> > final AjaxLink deleteLink = new AjaxLink("delete") {
> >
> > private static final long serialVersionUID = 1L;
> >
> > public void onClick(AjaxRequestTarget target) {
> > target.appendJavaScript("alert('Going to delete!')");
> > }
> > };
> > deleteLink.add(new Image("deleteImg", DELETE));
> > deleteLink.setOutputMarkupId(true);
> >
> > add(deleteLink);
> >
> > in Html, I have tried:
> >
> >
> > or
> >
> > 
> >
> > 
> >
> >
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://apache-wicket.1842946.n4.nabble.com/AjaxLink-with-image-tp4657544.ht
> > ml Sent from the Users forum mailing list archive at Nabble.com.
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
>


Re: Wicket for Hybrid App

2013-03-27 Thread Paul Bors
I shouldn't say static, I shoud have asked if your app is not depending on
a persistence server side storage?
ie: I would expect my data view to change when I update a filter and a SQL
or some query to run on a remote server.

On Wed, Mar 27, 2013 at 11:57 AM, Paul Bors  wrote:

> But if you use plain JS, Css, Html etc, how do you satisfy the requirement
> of having the app work offline?
> Is your app all static?
>
> On Tue, Mar 26, 2013 at 8:11 PM, nazeem  wrote:
>
>> That sounds interesting..  But im afraid it gets bigger in size, memory
>> etc..
>> Need to try this..
>>
>> But for now, I chose jQuery + REST to communicate to server for data and
>> all
>> other html, JS, css etc packaged as phone gap app. So the desktop version
>> of
>> the client is Wicket and mobile version in plain JS, Css,Html.
>>
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/Wicket-for-Hybrid-App-tp4657458p4657546.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>


Re: Wicket for Hybrid App

2013-03-27 Thread Paul Bors
But if you use plain JS, Css, Html etc, how do you satisfy the requirement
of having the app work offline?
Is your app all static?

On Tue, Mar 26, 2013 at 8:11 PM, nazeem  wrote:

> That sounds interesting..  But im afraid it gets bigger in size, memory
> etc..
> Need to try this..
>
> But for now, I chose jQuery + REST to communicate to server for data and
> all
> other html, JS, css etc packaged as phone gap app. So the desktop version
> of
> the client is Wicket and mobile version in plain JS, Css,Html.
>
>
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-for-Hybrid-App-tp4657458p4657546.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Serverside caching of IResource's that are expensive to generate

2013-03-27 Thread Pointbreak
Cool! I took a slightly different route, as explained in a previous
mail. I may try to find some time to see if both implementations could
be merged, but I'll have to check license issues first. What I built is
tightly integrated with Less4J so I'm not so sure merging the two would
make sense for wicket-bootstrap anyway.

I put a few comments inline below. Will try to make some time free later
to have a look at the pull request.

Cheers

On Wed, Mar 27, 2013, at 15:50, Martin Grigorov wrote:
> Hi,
> 
> At https://github.com/l0rdn1kk0n/wicket-bootstrap/compare/cached-less you
> may see the diff between master and cached-less branches.
> I still have to discuss the changes with Michael Haitz but your feedback
> is
> welcome too!
> 
> LessResourceReference is a specialization of CssResourceReference so it
> can
> be used like:
> 
> 
>  @Override
> public void renderHead(IHeaderResponse response) {
> super.renderHead(response);
> 
> response.render(CssHeaderItem.forReference(new
> LessResourceReference(HomePage.class, "demo.less")));
> }

You don't need a CssResourceReference for that, any ResourceReference
can be used like that.

> LessPackageResource is a specialization of CssPackageResource so all that
> is valid for CPR is valid for LPR too - compression, minified name, etc.

Why would you want to have a minified name for your less source file?
Only the output after compilation goes to the client. The compression (I
guess you mean minification) can be handled by Less as well.

> The real logic is in LessCacheManager that handles the server side
> caching
> for the generated CSS content per Less resource.
> As I explained earlier:
> - if a request without 'If-Modified-Since' request header is being
> processed then the cache manager is being advised
> - if there is no CSS content entry in the cache then the Less resource is
> compiled on the fly
> - if there is CSS entry then it is returned
> - if there is 'If-Modified-Since' then it is used by the cache manager to
> compare it against the last modification time of the root Less resource
> and
> all imports in it
> - if the Less resource is newer then the cache manager returns either the
> generated CSS or re-generates a new one if the CSS has been generated is
> before the last modification of the Less file(s)

Please note that LessSource.URLSource is not threadsafe, your
CacheManager seems to assume that. I went the same route as you, caching
LessSource, but made my own threadsafe LessSource implementation for
that (and also to @imports much much more flexible).

> 
> On Tue, Mar 26, 2013 at 11:29 AM, Pointbreak
>  > wrote:
> 
> > Thanks!
> >
> > Just FYI: with Less4j it's actually quite easy to get the modification
> > time of the most recently updated import, since it creates a list of all
> > used imports on the top level LessSource
> >
> > On Tue, Mar 26, 2013, at 10:13, Martin Grigorov wrote:
> > > Hi,
> > >
> > > As Dan explained at the moment Wicket provides just the logic for client
> > > side caching. And this is enough for _static_ resources.
> > > The case with Less/SASS/Stylus and similar resources is a bit more
> > > complicated because they are not static, unless you compile them at the
> > > client side.
> > > Wicket uses the last modification time of the resource to decide whether
> > > to
> > > stream it back to the client. If the resource is not modified then
> > > response
> > > with code 304 (Not Modified) is returned, _without_ body.
> > >
> > > For dynamically created resources this is not enough. The CSS content
> > > should be generated once, for the first client, and then cached for all
> > > following clients. Response with code 304 should be returned for clients
> > > which have already received the compiled CSS content and the modification
> > > time of the .less file is still the same.
> > >
> > > The more complex logic should be in
> > > LessResourceStream#getModificationTime() - it may contain @import's and
> > > it
> > > should return the modification time of the import with the most recent
> > > update.
> > >
> > > CachingResourceStreamLocator is about caching the location of the
> > > resource,
> > > i.e. the location of the resource with the most specific attributes -
> > > locale, variation and style.  Wicket will still read the input stream of
> > > the resource if the response is with code 200.
> > > CachingResourceStreamLocator
> > > just saves the time of checking all combinations of
> > > scope/name/locale/variation/style every time.
> > >
> > > I'll work to improve Wicket Bootstrap Less module with this.
> > > And probably ConcatBundleResource will need similar optimizations.
> > >
> > >
> > >
> > >
> > > On Tue, Mar 26, 2013 at 10:36 AM, Michael Haitz
> > > wrote:
> > >
> > > > Wicket has a CachingResourceStreamLocator that caches the resource
> > streams.
> > > >
> > > > here's my wicket less implementation, could be helpful too:
> > > >
> > https://github.com/l0rdn1kk0n/wicket-bootstrap/

Re: how to create a new Session

2013-03-27 Thread Martin Grigorov
On Wed, Mar 27, 2013 at 5:34 PM, Hans Lesmeister 2 <
hans.lesmeis...@lessy-software.de> wrote:

> you might be looking for Session.replaceSession()
>

plus WebRTC and face recognition

you need to find out somehow that another person is using the session of
the first person



>
>
>
> -
> --
> Regards,
> Hans
>
> http://cantaa.de
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/how-to-create-a-new-Session-tp4657553p4657574.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com 


Re: how to create a new Session

2013-03-27 Thread Hans Lesmeister 2
you might be looking for Session.replaceSession()



-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-create-a-new-Session-tp4657553p4657574.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Ajax and validators

2013-03-27 Thread Sven Meier

Hi,

an ajaxbutton submits the form, see its javadoc.

You probably want to use #setDefaultFormProcessing(false) on your button.

Sven

On 03/27/2013 03:43 PM, Entropy wrote:

I had an ajaxbutton to add selected items from a multiple choice control to
another multiple choice control.  This worked spendidly with me getting the
selected via the getInput() method.  Well, along comes time for me to write
and add a validator to the form, and suddenly the event does not arrive.
Pull the validator back out and everything works.  So clearly the validator
is in the way, but it shouldn't be...it's not validation time yet!

Question 1: Why would a form validator interfere with an ajaxbutton's event?
It was NOT a submit button.

Then a co-worker suggested I try to use AjaxLink instead of button, but tie
it to a button.  This allows the event in (Hooray!) but now getInput()
returns null.  As if AjaxLink doesn't bring any screen controls other than
itself.

Question 2: Why is AjaxLink making getInput() null?  If there is some other
mechanism to get form data, what is that mechanism?

The AjaxLink code looks like:

add(new AjaxLink("addSelected") {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target) {
onAddSelected(target);
}
});

private void onAddSelected(AjaxRequestTarget target) {
if(listUsers.getInput()!=null) {  //listUsers is null
List newChoices = (List) 
listUsers.getChoices();
List selChoices = new ArrayList();
for(String index: listUsers.getInputAsArray())

selChoices.add(newChoices.get(Integer.parseInt(index)));
mergeUniquelyIntoRecipients(recipients, selChoices);
}
listUsers.setModelObject(new ArrayList());
target.addComponent(listUsers);
target.addComponent(selected);
}




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Ajax-and-validators-tp4657570.html
Sent from the Users forum mailing list archive at Nabble.com.

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




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



Re: Serverside caching of IResource's that are expensive to generate

2013-03-27 Thread Martin Grigorov
Hi,

At https://github.com/l0rdn1kk0n/wicket-bootstrap/compare/cached-less you
may see the diff between master and cached-less branches.
I still have to discuss the changes with Michael Haitz but your feedback is
welcome too!

LessResourceReference is a specialization of CssResourceReference so it can
be used like:


 @Override
public void renderHead(IHeaderResponse response) {
super.renderHead(response);

response.render(CssHeaderItem.forReference(new
LessResourceReference(HomePage.class, "demo.less")));
}


LessPackageResource is a specialization of CssPackageResource so all that
is valid for CPR is valid for LPR too - compression, minified name, etc.

The real logic is in LessCacheManager that handles the server side caching
for the generated CSS content per Less resource.
As I explained earlier:
- if a request without 'If-Modified-Since' request header is being
processed then the cache manager is being advised
- if there is no CSS content entry in the cache then the Less resource is
compiled on the fly
- if there is CSS entry then it is returned
- if there is 'If-Modified-Since' then it is used by the cache manager to
compare it against the last modification time of the root Less resource and
all imports in it
- if the Less resource is newer then the cache manager returns either the
generated CSS or re-generates a new one if the CSS has been generated is
before the last modification of the Less file(s)


On Tue, Mar 26, 2013 at 11:29 AM, Pointbreak  wrote:

> Thanks!
>
> Just FYI: with Less4j it's actually quite easy to get the modification
> time of the most recently updated import, since it creates a list of all
> used imports on the top level LessSource
>
> On Tue, Mar 26, 2013, at 10:13, Martin Grigorov wrote:
> > Hi,
> >
> > As Dan explained at the moment Wicket provides just the logic for client
> > side caching. And this is enough for _static_ resources.
> > The case with Less/SASS/Stylus and similar resources is a bit more
> > complicated because they are not static, unless you compile them at the
> > client side.
> > Wicket uses the last modification time of the resource to decide whether
> > to
> > stream it back to the client. If the resource is not modified then
> > response
> > with code 304 (Not Modified) is returned, _without_ body.
> >
> > For dynamically created resources this is not enough. The CSS content
> > should be generated once, for the first client, and then cached for all
> > following clients. Response with code 304 should be returned for clients
> > which have already received the compiled CSS content and the modification
> > time of the .less file is still the same.
> >
> > The more complex logic should be in
> > LessResourceStream#getModificationTime() - it may contain @import's and
> > it
> > should return the modification time of the import with the most recent
> > update.
> >
> > CachingResourceStreamLocator is about caching the location of the
> > resource,
> > i.e. the location of the resource with the most specific attributes -
> > locale, variation and style.  Wicket will still read the input stream of
> > the resource if the response is with code 200.
> > CachingResourceStreamLocator
> > just saves the time of checking all combinations of
> > scope/name/locale/variation/style every time.
> >
> > I'll work to improve Wicket Bootstrap Less module with this.
> > And probably ConcatBundleResource will need similar optimizations.
> >
> >
> >
> >
> > On Tue, Mar 26, 2013 at 10:36 AM, Michael Haitz
> > wrote:
> >
> > > Wicket has a CachingResourceStreamLocator that caches the resource
> streams.
> > >
> > > here's my wicket less implementation, could be helpful too:
> > >
> https://github.com/l0rdn1kk0n/wicket-bootstrap/tree/master/bootstrap-less
> > >
> > >
> > > Am 26.03.2013 um 01:01 schrieb Pointbreak <
> pointbreak+wicketst...@ml1.net
> > > >:
> > >
> > > > I have implemented a LessCssResource (it generates a CSS resource
> from
> > > > Less source files) + LessCssResourceReference. Since computing the
> CSS
> > > > is expensive, I would like to cache the generated CSS on the server,
> > > > once generated. It is unclear to me whether Wicket has mechanisms to
> do
> > > > this. I expected that IStaticCacheableResource would also provide the
> > > > means to do server side caching (in addition to setting the correct
> > > > headers and decorating the url for client-side caching). But this
> > > > doesn't seem to be the case.
> > > >
> > > > When I look at what happens when doing a second page request/refresh
> > > > after all browser caches are cleared, it seems that for IResource's
> that
> > > > implement IStaticCacheableResource (including my LessCssResource, but
> > > > also e.g. ConcatBundleResource from wicket core):
> > > >
> > > > * Resource.newResourceResponse is called (which obviously results in
> a
> > > > recompute of the entire response)
> > > > * Resource.getCacheableResourceStream is called (which also does a
> > > > recompute 

Re: tomcat session replication

2013-03-27 Thread sauli.ketola
Igor Vaynberg-2 wrote
> ..the loadbalancer is
> configured to only send new sessions to A while B is being "starved"
> of new sessions.

I know this is an old thread but I found it just now when facing a similar
case.
Could you or someone explain more: How do you do this and what load balancer
are you using for this? Do you know would nginx support this?

I would guess that it would be pretty common to have to wait for sessions to
die before starting to install the server but it seems to be pretty hard to
find any concrete examples.

If someone could point me to the right direction, I'd appreciate it.

-Sauli




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/tomcat-session-replication-tp1891781p4657571.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Ajax and validators

2013-03-27 Thread Entropy
I had an ajaxbutton to add selected items from a multiple choice control to
another multiple choice control.  This worked spendidly with me getting the
selected via the getInput() method.  Well, along comes time for me to write
and add a validator to the form, and suddenly the event does not arrive. 
Pull the validator back out and everything works.  So clearly the validator
is in the way, but it shouldn't be...it's not validation time yet!

Question 1: Why would a form validator interfere with an ajaxbutton's event? 
It was NOT a submit button.

Then a co-worker suggested I try to use AjaxLink instead of button, but tie
it to a button.  This allows the event in (Hooray!) but now getInput()
returns null.  As if AjaxLink doesn't bring any screen controls other than
itself.

Question 2: Why is AjaxLink making getInput() null?  If there is some other
mechanism to get form data, what is that mechanism?  

The AjaxLink code looks like:

add(new AjaxLink("addSelected") {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target) {
onAddSelected(target);
}
});

private void onAddSelected(AjaxRequestTarget target) {
if(listUsers.getInput()!=null) {  //listUsers is null
List newChoices = (List) 
listUsers.getChoices();
List selChoices = new ArrayList();
for(String index: listUsers.getInputAsArray()) 

selChoices.add(newChoices.get(Integer.parseInt(index)));
mergeUniquelyIntoRecipients(recipients, selChoices);
}
listUsers.setModelObject(new ArrayList());
target.addComponent(listUsers);
target.addComponent(selected);
}




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Ajax-and-validators-tp4657570.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: BgiframeJavaScriptResourceReference in wicket 6.5.0

2013-03-27 Thread Ernesto Reinaldo Barreiro
maybe

http://wiquery.googlecode.com/svn-history/r415/trunk/src/main/java/org/odlabs/wiquery/core/jqueryplugins/BgiframeJavaScriptResourceReference.java

On Wed, Mar 27, 2013 at 3:34 PM, Martin Grigorov wrote:

> Hi,
>
> You cannot find it because it has never been part of Wicket distro.
> It is part of some third party library you use.
>
>
> On Wed, Mar 27, 2013 at 2:46 PM, iamrakesh  >wrote:
>
> > Hi,
> >
> > I am trying upgrade wicket library version from 1.4.21 to 6.5.0. I am
> using
> > BgiframeJavaScriptResourceReference class and I couldn't find it in the
> > latest version and couldn't find any text in migration Wiki page!
> >
> > Is there any replacement for this class?
> >
> > Regards,
> > Rakesh.A
> >
> >
> >
> > --
> > View this message in context:
> >
> http://apache-wicket.1842946.n4.nabble.com/BgiframeJavaScriptResourceReference-in-wicket-6-5-0-tp4657564.html
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com 
>



-- 
Regards - Ernesto Reinaldo Barreiro


Re: BgiframeJavaScriptResourceReference in wicket 6.5.0

2013-03-27 Thread Martin Grigorov
Hi,

You cannot find it because it has never been part of Wicket distro.
It is part of some third party library you use.


On Wed, Mar 27, 2013 at 2:46 PM, iamrakesh wrote:

> Hi,
>
> I am trying upgrade wicket library version from 1.4.21 to 6.5.0. I am using
> BgiframeJavaScriptResourceReference class and I couldn't find it in the
> latest version and couldn't find any text in migration Wiki page!
>
> Is there any replacement for this class?
>
> Regards,
> Rakesh.A
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/BgiframeJavaScriptResourceReference-in-wicket-6-5-0-tp4657564.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com 


Re: Velocity Log

2013-03-27 Thread Martin Grigorov
Hi,

I see that you cross posted to Tomcat's mailing lists.
Please make sure that you update the thread there with the solution.

Wicket doesn't require Apache Velocity.
Only if you use VelocityPanel from wicket-velocity module in your
application then you need velocity.jar in your classpath.
I guess you don't need it so just remove it from your.war#WEB-INF/lib/
folder.


On Wed, Mar 27, 2013 at 4:14 PM, Bruce Pease  wrote:

> We are running a web application under tomcat using the wicket framework.
>  A
> requirement for Wicket is the velocity libraries.  The velocity framework
> is
> auto loading and writing to a log in the conf directory.  Since it is in
> use
> I am unable to undeploy the web application.  So, I am looking for a way to
> turn off the velocity logging.  Previous version of tomcat does not have
> this
> issue (7.0.26).
>
>
> -Original Message-
> From: Martin Grigorov [mailto:mgrigo...@apache.org]
> Sent: Wednesday, March 27, 2013 3:13 AM
> To: users@wicket.apache.org
> Subject: Re: Velocity Log
>
> Hi,
>
> Can you give more details ?
>
>
>
> On Tue, Mar 26, 2013 at 9:24 PM, Bruce Pease  wrote:
>
> > Good Afternoon:
> >
> >
> >
> > I am using Wicket 1.4.22 with Tomcat 7.0.37 and JDK 1.6.0_33.  The
> > recent upgrade to Tomcat created an issue where the application cannot
> > be undeployed unless the app is shut down due to the Wicket dependency
> > velocity logging in use (1.4).  Is there a way to turn it off or shut
> > it down?
> >
> >
> >
> > Thanks in advance for your help.
> >
> >
> >
> > Bruce D. Pease
> > Technical Team Lead - Web Applications
> > CruiseOne(r)   & Cruises Inc(tm)
> > 
> > 1201 W. Cypress Creek Road, Suite 100
> > Fort Lauderdale, FL 33309-1955
> > 954-958-3654 (direct) | 954-958-3665 (fax) bpe...@wth.com
> > 
> >
> >
> >
> >
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com 
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com 


RE: Velocity Log

2013-03-27 Thread Bruce Pease
We are running a web application under tomcat using the wicket framework.  A
requirement for Wicket is the velocity libraries.  The velocity framework is
auto loading and writing to a log in the conf directory.  Since it is in use
I am unable to undeploy the web application.  So, I am looking for a way to
turn off the velocity logging.  Previous version of tomcat does not have this
issue (7.0.26).


-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Wednesday, March 27, 2013 3:13 AM
To: users@wicket.apache.org
Subject: Re: Velocity Log

Hi,

Can you give more details ?



On Tue, Mar 26, 2013 at 9:24 PM, Bruce Pease  wrote:

> Good Afternoon:
>
>
>
> I am using Wicket 1.4.22 with Tomcat 7.0.37 and JDK 1.6.0_33.  The 
> recent upgrade to Tomcat created an issue where the application cannot 
> be undeployed unless the app is shut down due to the Wicket dependency 
> velocity logging in use (1.4).  Is there a way to turn it off or shut 
> it down?
>
>
>
> Thanks in advance for your help.
>
>
>
> Bruce D. Pease
> Technical Team Lead - Web Applications
> CruiseOne(r)   & Cruises Inc(tm) 
> 
> 1201 W. Cypress Creek Road, Suite 100
> Fort Lauderdale, FL 33309-1955
> 954-958-3654 (direct) | 954-958-3665 (fax) bpe...@wth.com 
> 
>
>
>
>


--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com 

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



BgiframeJavaScriptResourceReference in wicket 6.5.0

2013-03-27 Thread iamrakesh
Hi,

I am trying upgrade wicket library version from 1.4.21 to 6.5.0. I am using
BgiframeJavaScriptResourceReference class and I couldn't find it in the
latest version and couldn't find any text in migration Wiki page!

Is there any replacement for this class?

Regards,
Rakesh.A



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/BgiframeJavaScriptResourceReference-in-wicket-6-5-0-tp4657564.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Adding a large amount of MarkupContainers into the ListView or RepeatingView

2013-03-27 Thread vineet semwal
i was expecting this case too :-) but it's a very unusual usecase for a
*user* but not for wicket developer ,i have an easy(may be stupid) idea for
this,no need of quickview :-) ,show only one repeater's page items  to user
like as usual.., on scroll event just  repaint the repeater's parent
,foreg. with dataview on event

dataview.setcurrentpage(dataview.getcurrentpage()+1) //plus or minus 1
depending on scroll direction
target.add(parent)

that might be the cheapest/baddest way of achieving this usecase :-)


On Wed, Mar 27, 2013 at 5:28 PM, Martin Grigorov wrote:

> Hi,
>
> I mean something like
> https://github.com/mleibman/SlickGrid/wiki#virtual-rendering - DOM objects
> are added and removed while scrolling, thus keeping the DOM tree size small
>
>
> On Wed, Mar 27, 2013 at 12:52 PM, vineet semwal  >wrote:
>
> > hi ,
> > do you mean removing items when you said unloading?
> > the scroll behavior and navigator that are in the package just do
> > quickview#addItemsForNextPage()  on event like in this example
> >
> >
> https://github.com/vineetsemwal/quickview/blob/master/wicket-quickview-examples/src/main/java/com/aplombee/examples/PageScrollBar.java
> >
> > somone who doesn't want to maintain state can do
> >
> > *protected* void onScroll(AjaxRequestTarget target) {
> > //this removes items but do not update client view
> > quickView.simpleRemoveAll();
> >  addItemsForNextPage(quickView);
> > }
> >
> > as in this case the state is not maintained hence not good for someone
> > who wants to use stateful components ..
> > may be i am just misunderstanding you :-)
> >
> >
> >
> > On Wed, Mar 27, 2013 at 1:01 PM, Martin Grigorov  > >wrote:
> >
> > > Check https://github.com/vineetsemwal/quickview - a lazy loading
> > repeater.
> > > I'm not sure whether it also unloads items which are no more visible.
> > >
> > >
> > > On Wed, Mar 27, 2013 at 12:16 AM, Ernesto Reinaldo Barreiro <
> > > reier...@gmail.com> wrote:
> > >
> > > > Hi,
> > > >
> > > > Angular is just a "detail" on the approach I was suggesting... You
> can
> > > > achieve "the same" using "plain" jquery to ask for JSON and do
> > "creation"
> > > > of rows at client side iterating over results. If you do thing nicely
> > you
> > > > can still have some kind of componentization and the performance will
> > be
> > > a
> > > > lot better...  Not to mention use of resources at server side.
> > > >
> > > > On Tue, Mar 26, 2013 at 9:10 PM, Marco Springer 
> > > > wrote:
> > > >
> > > > > I've looked at Angular a while back and it certainly looks
> > interesting.
> > > > >
> > > > > However I don't think it's wise to introduce another technology
> > within
> > > > the
> > > > > current company where I'm migrating a rather large CGI-BIN
> > application
> > > > to a
> > > > > Wicket variant and into several modules.
> > > > > I'm the main JAVA/Wicket guy now, the others are mainly C++
> > developers
> > > > with
> > > > > some JAVA knowledge and growing in that knowledge as more and more
> > > parts
> > > > > are
> > > > > converted into Wicket counterparts.
> > > > > So they already have to get known with:
> > > > > Hibernate, parts of Spring, Wicket, Maven and HTML, CSS & JS.
> > > > >
> > > > > Sooo for now.. I'm sticking with Wicket only.
> > > > > And with the zoomed out version and restricting the date range,
> ergo
> > > > > reducing
> > > > > the amount of components.., that fixes things.
> > > > >
> > > > > The future will give me plenty of time make things even fancier.
> > > Perhaps
> > > > > even
> > > > > the use of Angular.
> > > > >
> > > > > On Tuesday 26 March 2013 19:55:30 Ernesto Reinaldo Barreiro wrote:
> > > > > > I mean: This same component could be used as "context" for AJAX
> > > > > > interactions.
> > > > > >
> > > > > > On Tue, Mar 26, 2013 at 7:42 PM, Ernesto Reinaldo Barreiro <
> > > > > >
> > > > > > reier...@gmail.com> wrote:
> > > > > > > Why don't you try rolling your own component that at sever side
> > > just
> > > > > > > serves JSON and you build up "rich functionality" at client
> side.
> > > > This
> > > > > > > same
> > > > > > > context could be used as "context" for AJAX interactions.
> > Something
> > > > > like
> > > > > > >
> > > > > > > http://www.antiliasoft.com/wicket-angular-demo/
> > > > > > >
> > > > > > > On Tue, Mar 26, 2013 at 5:23 PM, Marco Springer <
> > > ma...@glitchbox.nl
> > > > > >wrote:
> > > > > > >> I'm building a Gantt like interface with Wicket (nearly
> > finished).
> > > > > > >> It was a requirement to see multiple years of planned items,
> in
> > > the
> > > > > > >> extreme
> > > > > > >> range even.
> > > > > > >>
> > > > > > >> I've down-tuned it to be around max ~3k (8 years) of
> components
> > in
> > > > > that
> > > > > > >> listview, through the power of persuasion and as a test.
> > > > > > >> At 3k components, the getId() method is called quite a
> > reasonable
> > > > > amount
> > > > > > >> of
> > > > > > >> times. around 4.5M'ish times through the children_inde

Re: Adding a large amount of MarkupContainers into the ListView or RepeatingView

2013-03-27 Thread Martin Grigorov
Hi,

I mean something like
https://github.com/mleibman/SlickGrid/wiki#virtual-rendering - DOM objects
are added and removed while scrolling, thus keeping the DOM tree size small


On Wed, Mar 27, 2013 at 12:52 PM, vineet semwal wrote:

> hi ,
> do you mean removing items when you said unloading?
> the scroll behavior and navigator that are in the package just do
> quickview#addItemsForNextPage()  on event like in this example
>
> https://github.com/vineetsemwal/quickview/blob/master/wicket-quickview-examples/src/main/java/com/aplombee/examples/PageScrollBar.java
>
> somone who doesn't want to maintain state can do
>
> *protected* void onScroll(AjaxRequestTarget target) {
> //this removes items but do not update client view
> quickView.simpleRemoveAll();
>  addItemsForNextPage(quickView);
> }
>
> as in this case the state is not maintained hence not good for someone
> who wants to use stateful components ..
> may be i am just misunderstanding you :-)
>
>
>
> On Wed, Mar 27, 2013 at 1:01 PM, Martin Grigorov  >wrote:
>
> > Check https://github.com/vineetsemwal/quickview - a lazy loading
> repeater.
> > I'm not sure whether it also unloads items which are no more visible.
> >
> >
> > On Wed, Mar 27, 2013 at 12:16 AM, Ernesto Reinaldo Barreiro <
> > reier...@gmail.com> wrote:
> >
> > > Hi,
> > >
> > > Angular is just a "detail" on the approach I was suggesting... You can
> > > achieve "the same" using "plain" jquery to ask for JSON and do
> "creation"
> > > of rows at client side iterating over results. If you do thing nicely
> you
> > > can still have some kind of componentization and the performance will
> be
> > a
> > > lot better...  Not to mention use of resources at server side.
> > >
> > > On Tue, Mar 26, 2013 at 9:10 PM, Marco Springer 
> > > wrote:
> > >
> > > > I've looked at Angular a while back and it certainly looks
> interesting.
> > > >
> > > > However I don't think it's wise to introduce another technology
> within
> > > the
> > > > current company where I'm migrating a rather large CGI-BIN
> application
> > > to a
> > > > Wicket variant and into several modules.
> > > > I'm the main JAVA/Wicket guy now, the others are mainly C++
> developers
> > > with
> > > > some JAVA knowledge and growing in that knowledge as more and more
> > parts
> > > > are
> > > > converted into Wicket counterparts.
> > > > So they already have to get known with:
> > > > Hibernate, parts of Spring, Wicket, Maven and HTML, CSS & JS.
> > > >
> > > > Sooo for now.. I'm sticking with Wicket only.
> > > > And with the zoomed out version and restricting the date range, ergo
> > > > reducing
> > > > the amount of components.., that fixes things.
> > > >
> > > > The future will give me plenty of time make things even fancier.
> > Perhaps
> > > > even
> > > > the use of Angular.
> > > >
> > > > On Tuesday 26 March 2013 19:55:30 Ernesto Reinaldo Barreiro wrote:
> > > > > I mean: This same component could be used as "context" for AJAX
> > > > > interactions.
> > > > >
> > > > > On Tue, Mar 26, 2013 at 7:42 PM, Ernesto Reinaldo Barreiro <
> > > > >
> > > > > reier...@gmail.com> wrote:
> > > > > > Why don't you try rolling your own component that at sever side
> > just
> > > > > > serves JSON and you build up "rich functionality" at client side.
> > > This
> > > > > > same
> > > > > > context could be used as "context" for AJAX interactions.
> Something
> > > > like
> > > > > >
> > > > > > http://www.antiliasoft.com/wicket-angular-demo/
> > > > > >
> > > > > > On Tue, Mar 26, 2013 at 5:23 PM, Marco Springer <
> > ma...@glitchbox.nl
> > > > >wrote:
> > > > > >> I'm building a Gantt like interface with Wicket (nearly
> finished).
> > > > > >> It was a requirement to see multiple years of planned items, in
> > the
> > > > > >> extreme
> > > > > >> range even.
> > > > > >>
> > > > > >> I've down-tuned it to be around max ~3k (8 years) of components
> in
> > > > that
> > > > > >> listview, through the power of persuasion and as a test.
> > > > > >> At 3k components, the getId() method is called quite a
> reasonable
> > > > amount
> > > > > >> of
> > > > > >> times. around 4.5M'ish times through the children_indexOf
> method.
> > > > > >>
> > > > > >> But you're absolutely right, 100k components is bull.
> > > > > >>
> > > > > >> Right now I've settled with them that I'd change the view of the
> > > > Gantt to
> > > > > >> be
> > > > > >> less detailed when that amount of data is in there. The UI is
> > quite
> > > > > >> flexible in
> > > > > >> that I can change what I render.
> > > > > >>
> > > > > >> With 2 years, only 731 columns are rendered, each day is a
> column.
> > > > > >> When > 2 years, I change the view to a more zoomed out version.
> > > > > >> With 8 years, only 97 columns are rendered, each month being a
> > > column.
> > > > > >>
> > > > > >> Etc...
> > > > > >>
> > > > > >> Still with all the components taken in as it is a Gantt chart
> > kinda
> > > > > >> interface,
> > > > > >> the browsers that I test i

Re: Mapping by hostname?

2013-03-27 Thread Martin Grigorov
Hi,

If you are able to extract this info from the HttpServletRequest then you
should be able to do it.

Request req = RequestCycle.get().getRequest();
HttpServletRequest httpReq = ((ServletWebRequest) req).getContainerObject();
httpReq.xyz()


On Wed, Mar 27, 2013 at 1:17 PM, Ondrej Zizka  wrote:

> Hi,
>
> I have one site which uses generic hostnames (subdomains) and shows a page
> based on that.
> The mapping is pretty simple, something like .mysite.com would
> load a page of the $stringId object.
>
> Is that achievable with current URL mapping system?
> Is there some such? FWICT, the existing mappers only deal with the path
> part.
>
> Thanks,
> Ondra
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@wicket.**apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com 


Re: jQuery Treeview Context menu in wicket

2013-03-27 Thread Andrea Del Bene

Hi,

I didn't clearly understand what you want to build. Dou you want a 
treeview like this http://jquery.bassistance.de/treeview/demo/?

Hi,

How to implement jQuery Tree View with Context Menu in wicket.
Please provide a sample code or example


Thanks in advance


Regards
G.Lenin



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/jQuery-Treeview-Context-menu-in-wicket-tp4657512.html
Sent from the Users forum mailing list archive at Nabble.com.

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




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



Mapping by hostname?

2013-03-27 Thread Ondrej Zizka

Hi,

I have one site which uses generic hostnames (subdomains) and shows a 
page based on that.
The mapping is pretty simple, something like .mysite.com would 
load a page of the $stringId object.


Is that achievable with current URL mapping system?
Is there some such? FWICT, the existing mappers only deal with the path 
part.


Thanks,
Ondra

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



Re: Adding a large amount of MarkupContainers into the ListView or RepeatingView

2013-03-27 Thread vineet semwal
hi ,
do you mean removing items when you said unloading?
the scroll behavior and navigator that are in the package just do
quickview#addItemsForNextPage()  on event like in this example
https://github.com/vineetsemwal/quickview/blob/master/wicket-quickview-examples/src/main/java/com/aplombee/examples/PageScrollBar.java

somone who doesn't want to maintain state can do

*protected* void onScroll(AjaxRequestTarget target) {
//this removes items but do not update client view
quickView.simpleRemoveAll();
 addItemsForNextPage(quickView);
}

as in this case the state is not maintained hence not good for someone
who wants to use stateful components ..
may be i am just misunderstanding you :-)



On Wed, Mar 27, 2013 at 1:01 PM, Martin Grigorov wrote:

> Check https://github.com/vineetsemwal/quickview - a lazy loading repeater.
> I'm not sure whether it also unloads items which are no more visible.
>
>
> On Wed, Mar 27, 2013 at 12:16 AM, Ernesto Reinaldo Barreiro <
> reier...@gmail.com> wrote:
>
> > Hi,
> >
> > Angular is just a "detail" on the approach I was suggesting... You can
> > achieve "the same" using "plain" jquery to ask for JSON and do "creation"
> > of rows at client side iterating over results. If you do thing nicely you
> > can still have some kind of componentization and the performance will be
> a
> > lot better...  Not to mention use of resources at server side.
> >
> > On Tue, Mar 26, 2013 at 9:10 PM, Marco Springer 
> > wrote:
> >
> > > I've looked at Angular a while back and it certainly looks interesting.
> > >
> > > However I don't think it's wise to introduce another technology within
> > the
> > > current company where I'm migrating a rather large CGI-BIN application
> > to a
> > > Wicket variant and into several modules.
> > > I'm the main JAVA/Wicket guy now, the others are mainly C++ developers
> > with
> > > some JAVA knowledge and growing in that knowledge as more and more
> parts
> > > are
> > > converted into Wicket counterparts.
> > > So they already have to get known with:
> > > Hibernate, parts of Spring, Wicket, Maven and HTML, CSS & JS.
> > >
> > > Sooo for now.. I'm sticking with Wicket only.
> > > And with the zoomed out version and restricting the date range, ergo
> > > reducing
> > > the amount of components.., that fixes things.
> > >
> > > The future will give me plenty of time make things even fancier.
> Perhaps
> > > even
> > > the use of Angular.
> > >
> > > On Tuesday 26 March 2013 19:55:30 Ernesto Reinaldo Barreiro wrote:
> > > > I mean: This same component could be used as "context" for AJAX
> > > > interactions.
> > > >
> > > > On Tue, Mar 26, 2013 at 7:42 PM, Ernesto Reinaldo Barreiro <
> > > >
> > > > reier...@gmail.com> wrote:
> > > > > Why don't you try rolling your own component that at sever side
> just
> > > > > serves JSON and you build up "rich functionality" at client side.
> > This
> > > > > same
> > > > > context could be used as "context" for AJAX interactions. Something
> > > like
> > > > >
> > > > > http://www.antiliasoft.com/wicket-angular-demo/
> > > > >
> > > > > On Tue, Mar 26, 2013 at 5:23 PM, Marco Springer <
> ma...@glitchbox.nl
> > > >wrote:
> > > > >> I'm building a Gantt like interface with Wicket (nearly finished).
> > > > >> It was a requirement to see multiple years of planned items, in
> the
> > > > >> extreme
> > > > >> range even.
> > > > >>
> > > > >> I've down-tuned it to be around max ~3k (8 years) of components in
> > > that
> > > > >> listview, through the power of persuasion and as a test.
> > > > >> At 3k components, the getId() method is called quite a reasonable
> > > amount
> > > > >> of
> > > > >> times. around 4.5M'ish times through the children_indexOf method.
> > > > >>
> > > > >> But you're absolutely right, 100k components is bull.
> > > > >>
> > > > >> Right now I've settled with them that I'd change the view of the
> > > Gantt to
> > > > >> be
> > > > >> less detailed when that amount of data is in there. The UI is
> quite
> > > > >> flexible in
> > > > >> that I can change what I render.
> > > > >>
> > > > >> With 2 years, only 731 columns are rendered, each day is a column.
> > > > >> When > 2 years, I change the view to a more zoomed out version.
> > > > >> With 8 years, only 97 columns are rendered, each month being a
> > column.
> > > > >>
> > > > >> Etc...
> > > > >>
> > > > >> Still with all the components taken in as it is a Gantt chart
> kinda
> > > > >> interface,
> > > > >> the browsers that I test in are only getting a bit sluggish when
> I'm
> > > > >> displaying around 2k of components on this Intel Q8200.
> > > > >> I'm not displaying any fancy gif's/flash or whatever, only allot
> of
> > > div's
> > > > >> and
> > > > >> some svg overlays through jsPlumb for dependency display.
> > > > >>
> > > > >> I mainly found it staggering that the getId() function was called
> > that
> > > > >> much.
> > > > >> As Martin said, I'm targeting to limit the amount of components
> that
> > > > >> should be

Re: Wicket DefaultDataTable - Refresh it on browser back button

2013-03-27 Thread Jayakrishnan R
Hi Martin,

Thanks for the direction. I finally found the problem. The list of records
( collection ) was assigned to the data provider in the contructor of that
page. So when I press back button, the latest data was not getting
refreshed.

I still need to find a way to push the latest data on to the model.

Thanks
JK


On Mon, Mar 25, 2013 at 4:08 PM, Jayakrishnan R  wrote:

>
> Hi,
>
> Does that mean that the DataProvider returns primary key objects which are
> used in the LoadableDetachableModel to load the real object ?
>
> I am not sure. But one thing I noticed, the load() method of the
> LoadableDetachableModel is not being called when the back button is hit.
>
> I am getting exception the populateItem method .of the columns in the data
> table... see below.
>
>
> List> columns = new ArrayList>();
>
>columns.add(new AbstractColumn(
> new StringResourceModel("Record_number", this, null),
> "Record_number") {
>
> @Override
> public void populateItem(Item item, String id, IModel
> rowModel) {
> }};
>
>
>
>
>
> On Mon, Mar 25, 2013 at 3:55 PM, Martin Grigorov wrote:
>
>> Hi,
>>
>> On Mon, Mar 25, 2013 at 5:50 PM, Jayakrishnan R 
>> wrote:
>>
>> > Hi All,
>> >
>> > In my application I am using *DefaultDataTable *with
>> > *SortableDataProvider *which
>> > has *LoadableDetachableModel *as the model.
>> >
>>
>> Does that mean that the DataProvider returns primary key objects which are
>> used in the LoadableDetachableModel to load the real object ?
>>
>> Check why your DataProvider returns (the ids of) deleted objects when back
>> button is used.
>>
>>
>> >
>> > I used it to display a set of records ( say RecordList page). When I
>> add or
>> > remove some records and load the page RecordList again, it displays the
>> > changes. However, if I use the back button of the browser and go the
>> > RecordList page which was rentered earlier ( before adding/ removing the
>> > records ). The *DefaultDataTable *still has the old sets of records.
>> This
>> > is a big issue when records are deleted.
>> >
>> > For example, If I delete a record and press back button then the page
>> fails
>> > as the record it is trying to show does not exist in the database.
>> Adding
>> > does not create an issue because it simply does not get listed in the
>> set
>> > of records.
>> >
>> > In another page, I just have *PageableListView *with *
>> > LoadableDetachableModel*. It works fine with out an issue.
>> >
>> > Can someone advice me on how to refresh the data table on browser back
>> > button ?
>> >
>> > --
>> > Thanks & Regards
>> > JK
>> >
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com 
>>
>
>
>
> --
> Thanks & Regards
> JK
>



-- 
Thanks & Regards
JK


Re: FeedbackPanel Empty on Wizard in 6.5

2013-03-27 Thread Fergal Keating
FYI,

I couldn't resolve the issue. I had a couple of places with ListView and i
made sure setReuseItems was (true) but that didn't resolve the issue. I
tried removing various panels to track down the issue, but still nothing.
However when i removed the .setRequired on some textboxes the form then
processed and i was already throwing exceptions for invalid data, then
catching exceptions and calling Error(exception.getmessage) <<-- Note
calling error() at this point worked without referring to the sesssion as
long as the form/submit was called.

So i just updated the exceptions to check for null values in the model and
set the error feedback that way.

Fergal.


On 25 March 2013 13:13, Martin Grigorov  wrote:

> Hi,
>
> Do you use ListView somewhere in the hierarchy by chance ?
> I remember a similar issue - the component with the feedback message was in
> a ListView with .setReuseItems(false). Changing it to .setReuseItems(true)
> fixed the problem.
>
>
> On Mon, Mar 25, 2013 at 3:06 PM, Fergal Keating <
> fergal.keat...@directski.com> wrote:
>
> > The MywizardPage is being used as the Root component and its set in the
> > FeedbackCollector constructor. So it should be a parent of all components
> > under it.
> > Adding session.error to my FinishButton#OnError get the feedback panel
> > displayed correctly with that one message, however i'm relying on
> > component#setRequired  for some of my error messages. so i need to get to
> > the bottom of the issue.
> >
> > I added a check in the feedbackPanel to findParent(MywizardPage.class)
> and
> > its returning correctly...
> >
> >
> >
> >
> > On 25 March 2013 09:45, Martin Grigorov  wrote:
> >
> > > Hi,
> > >
> > > Check which component is used as root in FeedbackCollector. Is it the
> > page
> > > or some other component which is not parent of the component on which
> you
> > > call .error() method ?
> > > As a workaround you can use session.error() instead but I think it will
> > be
> > > better if you understand why the component-scoped feedback message is
> not
> > > used.
> > >
> > >
> > > On Mon, Mar 25, 2013 at 11:17 AM, Fergal Keating <
> > > fergal.keat...@directski.com> wrote:
> > >
> > > > Hi,
> > > >
> > > > I'm using a wizard page on which there is some feedback panels. On
> the
> > > last
> > > > step, (since i upgraded to version 6.5 wicket) the feedback messages
> > are
> > > > not displaying. (they are working fine on other steps).
> > > >
> > > > I can correctly see each component in the form adding its own error
> > > > message.The FinishButton#On Error is being called because there are
> > > errors
> > > > detectcted, but they seem to be cleared by the time i have to display
> > the
> > > > feedback panel. I have even called error() from the overwritten
> > > > FinishButton#On Error method and it seems to disappear.
> > > >
> > > > I have placed Debug on orw.feedback class which shows that my
> feedback
> > > > messages are being added. but when the feedback Collector Class gets
> > > called
> > > > to display the feedback messages they somehow seem to have
> disappeared.
> > > >
> > > > The feedback panel is set to visible, and its onBeforeRender is being
> > > > called, but messages arent displayed. I've tried to see where the
> > > messages
> > > > are being cleared, but it just seem that the FeedbackMessages#clear
> > > methods
> > > > only being called on Detach.
> > > >
> > > > can someone advise ?
> > > >
> > > > --
> > > > Fergal Keating
> > > > IT Senior Engineer
> > > > ---
> > > > e. fergal.keat...@directski.com
> > > > p. NA
> > > > w. www.directski.com
> > > >
> > >
> > >
> > >
> > > --
> > > Martin Grigorov
> > > jWeekend
> > > Training, Consulting, Development
> > > http://jWeekend.com 
> > >
> >
> >
> >
> > --
> > Fergal Keating
> > IT Senior Engineer
> > ---
> > e. fergal.keat...@directski.com
> > p. NA
> > w. www.directski.com
> >
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com 
>



-- 
Fergal Keating
IT Senior Engineer
---
e. fergal.keat...@directski.com
p. NA
w. www.directski.com


Re: how to create a new Session

2013-03-27 Thread ravaszroka
Thanks for the answer. I have however a follow up question.

In a browser there are at least two tabs open. In one of them a user logs in
and instead of logging out (where the session is explicitely invalidated) he
just closes the tab. A new user comes and tries to log in (before the
session expires). He would get the same session, wouldn't he? How can I
enforce that he get a new session?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-create-a-new-Session-tp4657553p4657556.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: how to create a new Session

2013-03-27 Thread Bernard
Hi,

Do you want to get rid of an existing session?

Bernard


On Wed, 27 Mar 2013 02:00:53 -0700 (PDT), you wrote:

>hello.
>
>how can tell the wicket application to create and use a new session for
>subsequent requests?
>the problem to solve is: 
>the session keeps track of userdata. on the login page a new session should
>be created and used. 
>one solution would be to reset the userdata when i'm on the login page.
>however, if in a browser (chrome) i try to log in from 2 different tabs the
>session is shared, which obviously is not what i want.
>
>can someone lighten me on the relationship between httpsession and wicket
>session. 
>
>thanks.


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



Re: how to create a new Session

2013-03-27 Thread Martin Grigorov
Hi,


On Wed, Mar 27, 2013 at 11:00 AM, ravaszroka  wrote:

> hello.
>
> how can tell the wicket application to create and use a new session for
> subsequent requests?
> the problem to solve is:
> the session keeps track of userdata. on the login page a new session should
> be created and used.
>

getSession().bind(); is what you need


> one solution would be to reset the userdata when i'm on the login page.
> however, if in a browser (chrome) i try to log in from 2 different tabs the
> session is shared, which obviously is not what i want.
>
>
the session is shared between the tabs.
session scope means - all requests from an user agent until the session is
invalidated or expire due to inactivity


> can someone lighten me on the relationship between httpsession and wicket
> session.
>

Wicket's Session is stored as an attribute in the HttpSession


>
> thanks.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/how-to-create-a-new-Session-tp4657553.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com 


how to create a new Session

2013-03-27 Thread ravaszroka
hello.

how can tell the wicket application to create and use a new session for
subsequent requests?
the problem to solve is: 
the session keeps track of userdata. on the login page a new session should
be created and used. 
one solution would be to reset the userdata when i'm on the login page.
however, if in a browser (chrome) i try to log in from 2 different tabs the
session is shared, which obviously is not what i want.

can someone lighten me on the relationship between httpsession and wicket
session. 

thanks.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/how-to-create-a-new-Session-tp4657553.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: AjaxLink with image

2013-03-27 Thread Marco Springer
The Markup is missing somehow but I'd say the following HTML should do the 
trick:

  


Check the log if it isn't complaining that it can't find the "delete.png" file..

On Tuesday 26 March 2013 16:39:26 grazia wrote:
> The image in the AjaxLink does not display, anyone could help me figure this
> one out ?
> 
>private static final ResourceReference DELETE = new
> PackageResourceReference(SabcActionsPanel.class, "delete.png");
> 
> final AjaxLink deleteLink = new AjaxLink("delete") {
> 
> private static final long serialVersionUID = 1L;
> 
> public void onClick(AjaxRequestTarget target) {
> target.appendJavaScript("alert('Going to delete!')");
> }
> };
> deleteLink.add(new Image("deleteImg", DELETE));
> deleteLink.setOutputMarkupId(true);
> 
> add(deleteLink);
> 
> in Html, I have tried:
> 
> 
> or
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/AjaxLink-with-image-tp4657544.ht
> ml Sent from the Users forum mailing list archive at Nabble.com.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org

Re: AjaxLink with image

2013-03-27 Thread Martin Grigorov
Your markup didn't make it and Nabble says your thread cannot be found.


On Wed, Mar 27, 2013 at 1:39 AM, grazia wrote:

> The image in the AjaxLink does not display, anyone could help me figure
> this
> one out ?
>
>private static final ResourceReference DELETE = new
> PackageResourceReference(SabcActionsPanel.class, "delete.png");
>
> final AjaxLink deleteLink = new AjaxLink("delete") {
>
> private static final long serialVersionUID = 1L;
>
> public void onClick(AjaxRequestTarget target) {
> target.appendJavaScript("alert('Going to delete!')");
> }
> };
> deleteLink.add(new Image("deleteImg", DELETE));
> deleteLink.setOutputMarkupId(true);
>
> add(deleteLink);
>
> in Html, I have tried:
>
>
> or
>
> 
>
> 
>
>
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/AjaxLink-with-image-tp4657544.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com 


Re: Adding a large amount of MarkupContainers into the ListView or RepeatingView

2013-03-27 Thread Martin Grigorov
Check https://github.com/vineetsemwal/quickview - a lazy loading repeater.
I'm not sure whether it also unloads items which are no more visible.


On Wed, Mar 27, 2013 at 12:16 AM, Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Hi,
>
> Angular is just a "detail" on the approach I was suggesting... You can
> achieve "the same" using "plain" jquery to ask for JSON and do "creation"
> of rows at client side iterating over results. If you do thing nicely you
> can still have some kind of componentization and the performance will be a
> lot better...  Not to mention use of resources at server side.
>
> On Tue, Mar 26, 2013 at 9:10 PM, Marco Springer 
> wrote:
>
> > I've looked at Angular a while back and it certainly looks interesting.
> >
> > However I don't think it's wise to introduce another technology within
> the
> > current company where I'm migrating a rather large CGI-BIN application
> to a
> > Wicket variant and into several modules.
> > I'm the main JAVA/Wicket guy now, the others are mainly C++ developers
> with
> > some JAVA knowledge and growing in that knowledge as more and more parts
> > are
> > converted into Wicket counterparts.
> > So they already have to get known with:
> > Hibernate, parts of Spring, Wicket, Maven and HTML, CSS & JS.
> >
> > Sooo for now.. I'm sticking with Wicket only.
> > And with the zoomed out version and restricting the date range, ergo
> > reducing
> > the amount of components.., that fixes things.
> >
> > The future will give me plenty of time make things even fancier. Perhaps
> > even
> > the use of Angular.
> >
> > On Tuesday 26 March 2013 19:55:30 Ernesto Reinaldo Barreiro wrote:
> > > I mean: This same component could be used as "context" for AJAX
> > > interactions.
> > >
> > > On Tue, Mar 26, 2013 at 7:42 PM, Ernesto Reinaldo Barreiro <
> > >
> > > reier...@gmail.com> wrote:
> > > > Why don't you try rolling your own component that at sever side just
> > > > serves JSON and you build up "rich functionality" at client side.
> This
> > > > same
> > > > context could be used as "context" for AJAX interactions. Something
> > like
> > > >
> > > > http://www.antiliasoft.com/wicket-angular-demo/
> > > >
> > > > On Tue, Mar 26, 2013 at 5:23 PM, Marco Springer  > >wrote:
> > > >> I'm building a Gantt like interface with Wicket (nearly finished).
> > > >> It was a requirement to see multiple years of planned items, in the
> > > >> extreme
> > > >> range even.
> > > >>
> > > >> I've down-tuned it to be around max ~3k (8 years) of components in
> > that
> > > >> listview, through the power of persuasion and as a test.
> > > >> At 3k components, the getId() method is called quite a reasonable
> > amount
> > > >> of
> > > >> times. around 4.5M'ish times through the children_indexOf method.
> > > >>
> > > >> But you're absolutely right, 100k components is bull.
> > > >>
> > > >> Right now I've settled with them that I'd change the view of the
> > Gantt to
> > > >> be
> > > >> less detailed when that amount of data is in there. The UI is quite
> > > >> flexible in
> > > >> that I can change what I render.
> > > >>
> > > >> With 2 years, only 731 columns are rendered, each day is a column.
> > > >> When > 2 years, I change the view to a more zoomed out version.
> > > >> With 8 years, only 97 columns are rendered, each month being a
> column.
> > > >>
> > > >> Etc...
> > > >>
> > > >> Still with all the components taken in as it is a Gantt chart kinda
> > > >> interface,
> > > >> the browsers that I test in are only getting a bit sluggish when I'm
> > > >> displaying around 2k of components on this Intel Q8200.
> > > >> I'm not displaying any fancy gif's/flash or whatever, only allot of
> > div's
> > > >> and
> > > >> some svg overlays through jsPlumb for dependency display.
> > > >>
> > > >> I mainly found it staggering that the getId() function was called
> that
> > > >> much.
> > > >> As Martin said, I'm targeting to limit the amount of components that
> > > >> should be
> > > >> rendered now, although sometimes hard with this kind of interface.
> > > >>
> > > >> Cheers.
> > > >>
> > > >> On Tuesday 26 March 2013 08:23:19 Igor Vaynberg wrote:
> > > >> > putting a 10 components into a page is ill advised even if
> they
> > > >> > are under different parents.
> > > >>
> > > >>
> -
> > > >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > >> For additional commands, e-mail: users-h...@wicket.apache.org
> > > >
> > > > --
> > > > Regards - Ernesto Reinaldo Barreiro
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
>
> --
> Regards - Ernesto Reinaldo Barreiro
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com 


Re: Velocity Log

2013-03-27 Thread Martin Grigorov
Hi,

Can you give more details ?



On Tue, Mar 26, 2013 at 9:24 PM, Bruce Pease  wrote:

> Good Afternoon:
>
>
>
> I am using Wicket 1.4.22 with Tomcat 7.0.37 and JDK 1.6.0_33.  The recent
> upgrade to Tomcat created an issue where the application cannot be
> undeployed
> unless the app is shut down due to the Wicket dependency velocity logging
> in
> use (1.4).  Is there a way to turn it off or shut it down?
>
>
>
> Thanks in advance for your help.
>
>
>
> Bruce D. Pease
> Technical Team Lead - Web Applications
> CruiseOne(r)   & Cruises Inc(tm)
> 
> 1201 W. Cypress Creek Road, Suite 100
> Fort Lauderdale, FL 33309-1955
> 954-958-3654 (direct) | 954-958-3665 (fax)
> bpe...@wth.com 
>
>
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com