Re: References not loading correctly. Wicket 1.5.7

2012-06-13 Thread Martin Grigorov
Hi,

Please create a quickstart and attach it to a ticket in Jira.

On Wed, Jun 13, 2012 at 4:12 AM, Sean Kendall - NASource Imports
s...@nasource.com wrote:
 I wish it as that easy.   :p

 I did add in the super.renderHead(response); call (and I already had it
 set in child classes).

 But still my styles are not showing up. The other weird thing is that if I
 shutdown my app, re-create the artifacts and basically redeploy; the first
 time I open my 'HomePage' I see all my styles again, but after doing a
 page refresh, all styles are removed again and the following WARNING shows:

 WARN  - ResourceReferenceRegistry  - Asked to auto-create a
 ResourceReference, but
 ResourceReferenceRegistry.createDefaultResourceReference() return null.
 [scope: com.company.web.WebDummy; name: jquery/js/jquery.myjavascript.js;
 locale: null; style: null; variation: null]

 Possibly is a caching problem?







 On 12-06-12 12:24 AM, Martin Grigorov mgrigo...@apache.org wrote:

Hi,

On Tue, Jun 12, 2012 at 4:46 AM, Sean Kendall - NASource Imports
s...@nasource.com wrote:
 I am not sure if this is something I am missing or a bug in wicket
(1.5.7)
 (Tomcat 6)

 Basically, I am trying to add CSS and JS references to my 'BasePage'
 (extends WebPage) and my references are not loading.
 The actual markup has a link to the JS and CSS files, yet they do not
link
 to the actual files.

 Here is the basic setup of my 'BasePage.class'

 code

 public abstract class BasePage extends WebPage implements
 IHeaderContributor{

No need to implement IHeaderContributor.
o.a.w.Component does this for you in 1.5.x.


 protected BasePage() {
        initPage();
    }

 private void initPage() {
 this.setStatelessHint(true);
 //add a bunch of componentsŠ
 Add(some new Component);
 //end of my adding component code
 }//end of initPage

 public void renderHead(IHeaderResponse response) {

I see you do not call: super.renderHead(response).
For the base page it is not really needed but if you skip this call in
the children pages' #renderHead() then the following code wont be
executed and this will lead to the problem you describe.


        response.renderCSSReference(new
CssResourceReference(WebDummy.class,
 css/wicketIsAwesome.css), screen);
        response.renderJavaScriptReference(new
 JavaScriptResourceReference(WebDummy.class, js/javascriptRocks.js));
        response.renderJavaScriptReference(new
 JavaScriptResourceReference(WebDummy.class, js/lightbox.js));
        response.renderCSSReference(new
CssResourceReference(WebDummy.class,
 css/commonCss.css));
 //add to some page
        if (this instanceof AwesomeWicketPage) {
            response.renderCSSReference(new
 CssResourceReference(WebDummy.class, css/jqu.jqz.css));
            response.renderJavaScriptReference(new
 JavaScriptResourceReference(WebDummy.class, js/libjs-1.6.js));
            response.renderJavaScriptReference(new
 JavaScriptResourceReference(WebDummy.class, js/mylibsJs-core.js));
        }
 }//end of renderHead
 }//end of class
 /code

 This is my Directory Structure (hopefully this makes sense):
 -src (directory)
 ---main (directory)
 --java (directory)
 com.company (directory)
 ---com.company.common (directory)
 ---BasePage.class
 ---BasePage.html
 ---com.company.web (directory)
 ---WebDummy.class
 ---com.company.web.js  (directory)
 ---javascriptRocks.js
 ---lightbox.js
 ---libjs-1.6.js
 ---mylibsJs-core.js
 ---com.company.web.css (directory)
 ---wicketIsAwesome.css
 ---commonCss.css
 ---jqu.jqz.css


 Anyone?










--
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




 -
 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

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



Re: References not loading correctly. Wicket 1.5.7

2012-06-13 Thread vineet semwal
it actually means can't find jquery.myjavascript.js at the path you
provided ie. the path relative to WebDummy
so do you have that file in  com/company/web/jquery/js directory?

On Wed, Jun 13, 2012 at 6:42 AM, Sean Kendall - NASource Imports
s...@nasource.com wrote:
 I wish it as that easy.   :p

 I did add in the super.renderHead(response); call (and I already had it
 set in child classes).

 But still my styles are not showing up. The other weird thing is that if I
 shutdown my app, re-create the artifacts and basically redeploy; the first
 time I open my 'HomePage' I see all my styles again, but after doing a
 page refresh, all styles are removed again and the following WARNING shows:

 WARN  - ResourceReferenceRegistry  - Asked to auto-create a
 ResourceReference, but
 ResourceReferenceRegistry.createDefaultResourceReference() return null.
 [scope: com.company.web.WebDummy; name: jquery/js/jquery.myjavascript.js;
 locale: null; style: null; variation: null]

 Possibly is a caching problem?







 On 12-06-12 12:24 AM, Martin Grigorov mgrigo...@apache.org wrote:

Hi,

On Tue, Jun 12, 2012 at 4:46 AM, Sean Kendall - NASource Imports
s...@nasource.com wrote:
 I am not sure if this is something I am missing or a bug in wicket
(1.5.7)
 (Tomcat 6)

 Basically, I am trying to add CSS and JS references to my 'BasePage'
 (extends WebPage) and my references are not loading.
 The actual markup has a link to the JS and CSS files, yet they do not
link
 to the actual files.

 Here is the basic setup of my 'BasePage.class'

 code

 public abstract class BasePage extends WebPage implements
 IHeaderContributor{

No need to implement IHeaderContributor.
o.a.w.Component does this for you in 1.5.x.


 protected BasePage() {
        initPage();
    }

 private void initPage() {
 this.setStatelessHint(true);
 //add a bunch of componentsŠ
 Add(some new Component);
 //end of my adding component code
 }//end of initPage

 public void renderHead(IHeaderResponse response) {

I see you do not call: super.renderHead(response).
For the base page it is not really needed but if you skip this call in
the children pages' #renderHead() then the following code wont be
executed and this will lead to the problem you describe.


        response.renderCSSReference(new
CssResourceReference(WebDummy.class,
 css/wicketIsAwesome.css), screen);
        response.renderJavaScriptReference(new
 JavaScriptResourceReference(WebDummy.class, js/javascriptRocks.js));
        response.renderJavaScriptReference(new
 JavaScriptResourceReference(WebDummy.class, js/lightbox.js));
        response.renderCSSReference(new
CssResourceReference(WebDummy.class,
 css/commonCss.css));
 //add to some page
        if (this instanceof AwesomeWicketPage) {
            response.renderCSSReference(new
 CssResourceReference(WebDummy.class, css/jqu.jqz.css));
            response.renderJavaScriptReference(new
 JavaScriptResourceReference(WebDummy.class, js/libjs-1.6.js));
            response.renderJavaScriptReference(new
 JavaScriptResourceReference(WebDummy.class, js/mylibsJs-core.js));
        }
 }//end of renderHead
 }//end of class
 /code

 This is my Directory Structure (hopefully this makes sense):
 -src (directory)
 ---main (directory)
 --java (directory)
 com.company (directory)
 ---com.company.common (directory)
 ---BasePage.class
 ---BasePage.html
 ---com.company.web (directory)
 ---WebDummy.class
 ---com.company.web.js  (directory)
 ---javascriptRocks.js
 ---lightbox.js
 ---libjs-1.6.js
 ---mylibsJs-core.js
 ---com.company.web.css (directory)
 ---wicketIsAwesome.css
 ---commonCss.css
 ---jqu.jqz.css


 Anyone?










--
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




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




-- 
thanks,

Vineet Semwal

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



Re: Wicket as Jboss Modules

2012-06-13 Thread Martin Grigorov
Hi,

Wicket uses ThreadLocal for the Application, Session and RequestCycle.
There are no JVM singletons.

Some people are against putting jars in the shared lib folder. I
personally see the benefit and I'd do it if I need to
If you use shared jars then make sure that none of the applications
provide these jars or another version of them because in this case you
will see some ClassLoader related problems, e.g.: ClassCastException:
o.a.w.Session class is not o.a.w.Session.

On Tue, Jun 12, 2012 at 11:04 PM, Martin Sachs sachs.mar...@gmail.com wrote:
 Hello,

 i think that is in general not a good idea. If you deploy the wicket-lib
 outside the war and run multiple Wicket-Applications, then you could not use
 all applications, because wicket stores (as far as i know) e.g. the
 application instance in a static field. There is one application per
 WAR-deployment with wicket, but if you use the libs from ear/lib or modules
 there will be only one application.

 best
 Martin

 Илья Нарыжный schrieb:

 Hello,

 I have several projects which use wicket and various wicket sun-modules.
 Every project (*.ear file) took about 10Mb and about 8Mb is for wicket
 libraries.
 Recently I have move my projects to Jboss AS 7 and now I'm thinking
 about putting all wicket related jars to JBOSS_HOME/modules.

 Have anyone tried that? Do you have some suggestions for Jboss module
 structure for this?
 It will be great to have

 IMPLICIT(https://docs.jboss.org/author/display/AS7/Implicit+module+dependencies+for+deployments)
 deploy of wicket related jars to the project.

 Thanks,

 Ilia

 -
 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




-- 
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



PageExpiredErrorPage not working.

2012-06-13 Thread vaibhav2012
Hi all,

I am trying to server a particular error page when session timeouts to my
users.
For this i configured the error page on my Application's init method.
But this thing is not working.

*One of my concern :* Does wicket server this PageExpiredErrorPage only in
case of PageExpiredException??
I went through the logs, but wicket didn't throw any PageExpiredException.

When session timeouts wicket simply logs it as Session unbound.
I am able to listen to this Session unbound by attaching my own
UnboundListener to the session.

Please provide some help so that i can accomplish my task.

Regards,

Vaibhav,
Wicket newbie.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/PageExpiredErrorPage-not-working-tp4649905.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 implement a decorator

2012-06-13 Thread Martin Grigorov
Hi,

This is possible but I'd recommend to stay away from IComponentResolvers.

You need IMarkupFilter that will register wicket:modBox as an auto
component and flag it (either set specific id or userData for the
ComponentTag).
Then your IComponentResolver impl can use that information and resolve
the component at render-time.
See the code of org.apache.wicket.markup.parser.filter.WicketMessageTagHandler.

Additionally check
org.apache.wicket.markup.html.TransparentWebMarkupContainer. You may
need similar functionality to resolve the parent.


For BorderBehavior check
org.apache.wicket.examples.forminput.FormInput.InputForm#InputForm(String).
It uses BeforeAndAfterBorder.
BorderBehavior is a behavior with a markup.
It is quite easy to accomplish what you need by creating a class for
each style, e.g. ModBoxStyleOneBehavior which has
ModBoxStyleOneBehavior.html with such content:

wicket:border
 div class=mod-style-1
   wicket:body/
 /div
/wicket:border


On Tue, Jun 12, 2012 at 11:18 PM, Jonathan Tougas jtou...@gmail.com wrote:
 I'm trying to figure out how to implement a decorator tag. Here's what I
 mean:

 I want:

 wicket:modBox style=1
  span wicket:id=modBoxText/span
 /wicket:modBox

 to render to:

 div class=mod-style-1
  spanFOO!/span
 /div

 with nothing more than the usual add( new Label( modBoxText, FOO! ) )
 in the panel class. Note that this is different than a border since there
 is no add() for the decorator. The goal of this is to create reusable ui
 elements that can be inserted into markup without requiring any wiring in
 the java class. From what I understand, this _should_ be possible.

 I tried to do this with an IComponentResolver by creating an instance of a
 border, but I quickly ran into trouble with the component hierarchy when I
 did this and tried to add components to the content of the decorator (such
 as span wicket:id=modBoxText/span). Here are the artifacts for this
 to get an idea:

 ModBoxBorderResolver.java
 public class ModBoxBorderResolver implements IComponentResolver {
 @Override
 public Component resolve( MarkupContainer container, MarkupStream
 markupStream, ComponentTag tag ) {

 if( tag instanceof WicketTag ) {
  String tagName = tag.getName();
  if( tag.getName().equalsIgnoreCase( modBox ) ) {
 return ModBoxBorder( modBox );
 }
 }
  return null;
 }
 }

 ModBoxBorder.java
 public class ModBoxBorder extends Border {
 ...
 }

 ModBoxBorder.html
 wicket:border xmlns:wicket=http://wicket.apache.org;
 div wicket:id=div class=${mod-style}
 wicket:body /
 /div
 /wicket:border

 I also notice BorderBehavior whihc might be another avenue, but I'm not
 sure exactly how I could get this to work simply by adding tags to the
 markup and an IComponentResolver.

 Has anyone done anything like this already? Perhaps there is something
 already in Wicket that I'm overlooking.



-- 
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



Re: Wicket as Jboss Modules

2012-06-13 Thread Igor Vaynberg
we have to be sure we do not use any static fields anywhere in the
code...it's not just the singletons that break this use case. eg we do not
want caches to be shared across applications because it's not performant
and can result in cross application object leakage.

-igor

On Tuesday, June 12, 2012, Martin Grigorov wrote:

 Hi,

 Wicket uses ThreadLocal for the Application, Session and RequestCycle.
 There are no JVM singletons.

 Some people are against putting jars in the shared lib folder. I
 personally see the benefit and I'd do it if I need to
 If you use shared jars then make sure that none of the applications
 provide these jars or another version of them because in this case you
 will see some ClassLoader related problems, e.g.: ClassCastException:
 o.a.w.Session class is not o.a.w.Session.

 On Tue, Jun 12, 2012 at 11:04 PM, Martin Sachs 
 sachs.mar...@gmail.comjavascript:;
 wrote:
  Hello,
 
  i think that is in general not a good idea. If you deploy the wicket-lib
  outside the war and run multiple Wicket-Applications, then you could not
 use
  all applications, because wicket stores (as far as i know) e.g. the
  application instance in a static field. There is one application per
  WAR-deployment with wicket, but if you use the libs from ear/lib or
 modules
  there will be only one application.
 
  best
  Martin
 
  Илья Нарыжный schrieb:
 
  Hello,
 
  I have several projects which use wicket and various wicket sun-modules.
  Every project (*.ear file) took about 10Mb and about 8Mb is for wicket
  libraries.
  Recently I have move my projects to Jboss AS 7 and now I'm thinking
  about putting all wicket related jars to JBOSS_HOME/modules.
 
  Have anyone tried that? Do you have some suggestions for Jboss module
  structure for this?
  It will be great to have
 
  IMPLICIT(
 https://docs.jboss.org/author/display/AS7/Implicit+module+dependencies+for+deployments
 )
  deploy of wicket related jars to the project.
 
  Thanks,
 
  Ilia
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.orgjavascript:;
  For additional commands, e-mail: users-h...@wicket.apache.orgjavascript:;
 
 
 
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.orgjavascript:;
  For additional commands, e-mail: users-h...@wicket.apache.orgjavascript:;
 



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

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




Re: PageExpiredErrorPage not working.

2012-06-13 Thread Martin Grigorov
Hi,

You may need to call
application.getPageSettings().setRecreateMountedPagesAfterExpiry(false).
See the javadoc of this setter and the respective getter for more info.

On Wed, Jun 13, 2012 at 9:14 AM, vaibhav2012 vaibhav.bit2...@gmail.com wrote:
 Hi all,

 I am trying to server a particular error page when session timeouts to my
 users.
 For this i configured the error page on my Application's init method.
 But this thing is not working.

 *One of my concern :* Does wicket server this PageExpiredErrorPage only in
 case of PageExpiredException??
 I went through the logs, but wicket didn't throw any PageExpiredException.

 When session timeouts wicket simply logs it as Session unbound.
 I am able to listen to this Session unbound by attaching my own
 UnboundListener to the session.

 Please provide some help so that i can accomplish my task.

 Regards,

 Vaibhav,
 Wicket newbie.

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/PageExpiredErrorPage-not-working-tp4649905.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

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



Re: Wicket as Jboss Modules

2012-06-13 Thread Martin Grigorov
Good point!
https://issues.apache.org/jira/browse/WICKET-4604

On Wed, Jun 13, 2012 at 9:31 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 we have to be sure we do not use any static fields anywhere in the
 code...it's not just the singletons that break this use case. eg we do not
 want caches to be shared across applications because it's not performant
 and can result in cross application object leakage.

 -igor

 On Tuesday, June 12, 2012, Martin Grigorov wrote:

 Hi,

 Wicket uses ThreadLocal for the Application, Session and RequestCycle.
 There are no JVM singletons.

 Some people are against putting jars in the shared lib folder. I
 personally see the benefit and I'd do it if I need to
 If you use shared jars then make sure that none of the applications
 provide these jars or another version of them because in this case you
 will see some ClassLoader related problems, e.g.: ClassCastException:
 o.a.w.Session class is not o.a.w.Session.

 On Tue, Jun 12, 2012 at 11:04 PM, Martin Sachs 
 sachs.mar...@gmail.comjavascript:;
 wrote:
  Hello,
 
  i think that is in general not a good idea. If you deploy the wicket-lib
  outside the war and run multiple Wicket-Applications, then you could not
 use
  all applications, because wicket stores (as far as i know) e.g. the
  application instance in a static field. There is one application per
  WAR-deployment with wicket, but if you use the libs from ear/lib or
 modules
  there will be only one application.
 
  best
  Martin
 
  Илья Нарыжный schrieb:
 
  Hello,
 
  I have several projects which use wicket and various wicket sun-modules.
  Every project (*.ear file) took about 10Mb and about 8Mb is for wicket
  libraries.
  Recently I have move my projects to Jboss AS 7 and now I'm thinking
  about putting all wicket related jars to JBOSS_HOME/modules.
 
  Have anyone tried that? Do you have some suggestions for Jboss module
  structure for this?
  It will be great to have
 
  IMPLICIT(
 https://docs.jboss.org/author/display/AS7/Implicit+module+dependencies+for+deployments
 )
  deploy of wicket related jars to the project.
 
  Thanks,
 
  Ilia
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.orgjavascript:;
  For additional commands, e-mail: 
  users-h...@wicket.apache.orgjavascript:;
 
 
 
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.orgjavascript:;
  For additional commands, e-mail: users-h...@wicket.apache.orgjavascript:;
 



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

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





-- 
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



Re: Nested form model refresh

2012-06-13 Thread Sandor Feher
Hi,

Works fine! Thank you so much for your help!

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Nested-form-model-refresh-tp4649877p4649910.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: PageExpiredErrorPage not working.

2012-06-13 Thread vaibhav2012
Hi Martin,

I called the function as u said.
But, still no success.

On session timeout wicket logs following lines:

[ContainerBackgroundProcessor[StandardEngine[Catalina]]] DEBUG
o.a.wicket.session.HttpSessionStore - Session unbound:
831D6D49C220E621761EC98C3B8943B6
[ContainerBackgroundProcessor[StandardEngine[Catalina]]] DEBUG
o.a.wicket.pageStore.DiskDataStore - Removing data for pages in session with
id '831D6D49C220E621761EC98C3B8943B6'

Is the problem coming because PageExpiredException is not thrown??

Can you provide some help on this ground?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/PageExpiredErrorPage-not-working-tp4649905p4649911.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: PageExpiredErrorPage not working.

2012-06-13 Thread Martin Grigorov
Hi,

When a session times out Wicket clears the associated data as you
noticed from the logs.

PageExpiredException is being thrown only if the user tries to use a
page after the expiration.
For example by clicking on a Link or AjaxLink in such page.

On Wed, Jun 13, 2012 at 10:10 AM, vaibhav2012 vaibhav.bit2...@gmail.com wrote:
 Hi Martin,

 I called the function as u said.
 But, still no success.

 On session timeout wicket logs following lines:

 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] DEBUG
 o.a.wicket.session.HttpSessionStore - Session unbound:
 831D6D49C220E621761EC98C3B8943B6
 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] DEBUG
 o.a.wicket.pageStore.DiskDataStore - Removing data for pages in session with
 id '831D6D49C220E621761EC98C3B8943B6'

 Is the problem coming because PageExpiredException is not thrown??

 Can you provide some help on this ground?

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/PageExpiredErrorPage-not-working-tp4649905p4649911.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

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



Re: Exception when Session expired

2012-06-13 Thread sylvain
Hi Martin,

Yes it's more correct to put this code page = getExpirationPage(). 

But my problem, when my session expire, I never pass in the onException.

Have you an idea why?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Exception-when-Session-expired-tp4649854p4649913.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: PageExpiredErrorPage not working.

2012-06-13 Thread vaibhav2012
Hi Martin,

Thanks for clearing my doubt.
But after session timeout, when i try to access any mounted page i am not
getting PageExpiredException.

I have bypassed the error page in my authorization strategy, and i dont feel
security settings are blocking this.

Please give some info.

-
Regards,

Vaibhav Gupta
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/PageExpiredErrorPage-not-working-tp4649905p4649914.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: PageExpiredErrorPage not working.

2012-06-13 Thread Martin Grigorov
Hi,

Without seeing some code I'm not able to tell you what is going wrong.

On Wed, Jun 13, 2012 at 10:31 AM, vaibhav2012 vaibhav.bit2...@gmail.com wrote:
 Hi Martin,

 Thanks for clearing my doubt.
 But after session timeout, when i try to access any mounted page i am not
 getting PageExpiredException.

 I have bypassed the error page in my authorization strategy, and i dont feel
 security settings are blocking this.

 Please give some info.

 -
 Regards,

 Vaibhav Gupta
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/PageExpiredErrorPage-not-working-tp4649905p4649914.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

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



Re: Exception when Session expired

2012-06-13 Thread Martin Grigorov
Read the conversation in thread PageExpiredErrorPage not working we
have at the moment.

On Wed, Jun 13, 2012 at 10:28 AM, sylvain
sylvain.co...@interview-efm.com wrote:
 Hi Martin,

 Yes it's more correct to put this code page = getExpirationPage().

 But my problem, when my session expire, I never pass in the onException.

 Have you an idea why?

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Exception-when-Session-expired-tp4649854p4649913.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

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



wicket-atmosphere NullPointerException at initialization

2012-06-13 Thread theAnthony
Hi,

I wanted to play around with wicket 6.0.0-beta2 and wicket-atmosphere, I
created a quickstart created a simple page which would display a number and
that number would come from a simple bean with a method scheduled to be
executed every X seconds which would push the new value to the EventBus. But
at initialization of the application, I get a NullPointerException in the
EventBus.

So I went back to the quickstart and made it as simple as possible. Just
initializing the EventBus:

mvn archetype:generate -DarchetypeGroupId=org.apache.wicket
-DarchetypeArtifactId=wicket-archetype-quickstart
-DarchetypeVersion=6.0.0-beta2 -DgroupId=com.company.ecom
-DartifactId=emm-client-push2
-DarchetypeRepository=https://repository.apache.org/ -DinteractiveMode=false

Once created, I added the dependency in the pom file:

dependency
groupIdorg.apache.wicket/groupId
artifactIdwicket-atmosphere/artifactId
version0.1/version
/dependency

And finally modified init method of the WicketApplication class:

public void init()
{
super.init();

// add your configuration here
new EventBus(this);
}

And when I launch the Start.java, here is the exception
WARN  - AbstractLifeCycle  - FAILED wicket.emm-client-push2:
java.lang.NullPointerException
java.lang.NullPointerException
at org.apache.wicket.atmosphere.EventBus.init(EventBus.java:85)
at com.bnpp.ecom.WicketApplication.init(WicketApplication.java:31)
at org.apache.wicket.Application.initApplication(Application.java:814)
at 
org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:379)
at 
org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:314)
at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:102)
at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at
org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:748)
at
org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:249)
at
org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1222)
at
org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:676)
at 
org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:455)
at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at
org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:90)
at org.eclipse.jetty.server.Server.doStart(Server.java:260)
at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at com.company.ecom.Start.main(Start.java:66)

I think I followed the instructions from the release note so I don't
understand what I'm missing. Any clue ?

Cheers

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-NullPointerException-at-initialization-tp4649917.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: PageExpiredErrorPage not working.

2012-06-13 Thread vaibhav2012
Hi,

I will try to create a quick start for this and will post soon.

-
Regards,

Vaibhav Gupta
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/PageExpiredErrorPage-not-working-tp4649905p4649918.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-atmosphere NullPointerException at initialization

2012-06-13 Thread Martin Grigorov
Hi,

Check what is different between your web.xml and atmosphere.xml and
the ones in wicket-examples.war.

The NPE is caused by not set org.atmosphere.cpr.BroadcasterFactory but
I'm not sure what exactly setups it.

On Wed, Jun 13, 2012 at 11:29 AM, theAnthony anthony.ric...@gmail.com wrote:
 Hi,

 I wanted to play around with wicket 6.0.0-beta2 and wicket-atmosphere, I
 created a quickstart created a simple page which would display a number and
 that number would come from a simple bean with a method scheduled to be
 executed every X seconds which would push the new value to the EventBus. But
 at initialization of the application, I get a NullPointerException in the
 EventBus.

 So I went back to the quickstart and made it as simple as possible. Just
 initializing the EventBus:

 mvn archetype:generate -DarchetypeGroupId=org.apache.wicket
 -DarchetypeArtifactId=wicket-archetype-quickstart
 -DarchetypeVersion=6.0.0-beta2 -DgroupId=com.company.ecom
 -DartifactId=emm-client-push2
 -DarchetypeRepository=https://repository.apache.org/ -DinteractiveMode=false

 Once created, I added the dependency in the pom file:

 dependency
        groupIdorg.apache.wicket/groupId
        artifactIdwicket-atmosphere/artifactId
        version0.1/version
 /dependency

 And finally modified init method of the WicketApplication class:

        public void init()
        {
                super.init();

                // add your configuration here
                new EventBus(this);
        }

 And when I launch the Start.java, here is the exception
 WARN  - AbstractLifeCycle          - FAILED wicket.emm-client-push2:
 java.lang.NullPointerException
 java.lang.NullPointerException
        at org.apache.wicket.atmosphere.EventBus.init(EventBus.java:85)
        at com.bnpp.ecom.WicketApplication.init(WicketApplication.java:31)
        at org.apache.wicket.Application.initApplication(Application.java:814)
        at 
 org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:379)
        at 
 org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:314)
        at 
 org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:102)
        at
 org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
        at
 org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:748)
        at
 org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:249)
        at
 org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1222)
        at
 org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:676)
        at 
 org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:455)
        at
 org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
        at
 org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:90)
        at org.eclipse.jetty.server.Server.doStart(Server.java:260)
        at
 org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
        at com.company.ecom.Start.main(Start.java:66)

 I think I followed the instructions from the release note so I don't
 understand what I'm missing. Any clue ?

 Cheers

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/wicket-atmosphere-NullPointerException-at-initialization-tp4649917.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

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



Progressbar problems

2012-06-13 Thread Sandor Feher
Hi,

I have two problems with my progressbar.

1. It does not show up if I use AjaxButton or AjaxSubmitLink. I dig the
archives, set setOutputMarkupPlaceholderTag(true) for progressbar but it did
not help.
   If I change it to input type=submit / then it shows up.

2. If I try to upload a file from a shared folder attached to network drive
then it shows up but does not show the progress nor the text below (uploaded
nn % of 999 Mbites )
  If I upload from my local drives then it works fine.

I really appreciate any help!

thnx, Sandor


http://pastebin.com/wPb6aBeZ




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Progressbar-problems-tp4649923.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: Progressbar problems

2012-06-13 Thread Martin Grigorov
Hi,

You may also try
https://github.com/wicketstuff/core/tree/master/jdk-1.6-parent/progressbar-parent
http://repo1.maven.org/maven2/org/wicketstuff/wicketstuff-progressbar/

On Wed, Jun 13, 2012 at 12:59 PM, Sandor Feher sfe...@bluesystem.hu wrote:
 Hi,

 I have two problems with my progressbar.

 1. It does not show up if I use AjaxButton or AjaxSubmitLink. I dig the
 archives, set setOutputMarkupPlaceholderTag(true) for progressbar but it did
 not help.
   If I change it to input type=submit / then it shows up.

 2. If I try to upload a file from a shared folder attached to network drive
 then it shows up but does not show the progress nor the text below (uploaded
 nn % of 999 Mbites )
  If I upload from my local drives then it works fine.

 I really appreciate any help!

 thnx, Sandor


 http://pastebin.com/wPb6aBeZ




 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Progressbar-problems-tp4649923.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

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



Re: wicket-atmosphere NullPointerException at initialization

2012-06-13 Thread heapifyman
I think I had the same problem and was able to overcome it by adding
atmosphere.xml file in src/main/webapp/META-INF and changing the web.xml.
Both I took from the wicket examples.

atmosphere.xml looks like this:
atmosphere-handlers
atmosphere-handler context-root=/*
class-name=org.atmosphere.handler.ReflectorServletProcessor
property name=filterClassName
value=org.apache.wicket.protocol.http.WicketFilter /
/atmosphere-handler
/atmosphere-handlers

web.xml defines atmosphere servlet instead of default wicket filter:
servlet
servlet-nameAtmosphereApplication/servlet-name
servlet-classorg.atmosphere.cpr.AtmosphereServlet/servlet-class
init-param
param-nameapplicationClassName/param-name
param-valueorg.heapifyman.wicketatmospheretest.AtmosphereApplication/param-value
/init-param
init-param
param-nameorg.atmosphere.useWebSocket/param-name
param-valuetrue/param-value
/init-param
init-param
param-nameorg.atmosphere.useNative/param-name
param-valuetrue/param-value
/init-param
init-param
param-nameorg.atmosphere.cpr.CometSupport.maxInactiveActivity/param-name
param-value3/param-value
/init-param
init-param
param-namefilterMappingUrlPattern/param-name
param-value/atmo/*/param-value
/init-param
init-param
param-nameorg.atmosphere.websocket.WebSocketProtocol/param-name
param-valueorg.atmosphere.websocket.protocol.EchoProtocol/param-value
/init-param
load-on-startup1/load-on-startup
/servlet

servlet-mapping
servlet-nameAtmosphereApplication/servlet-name
url-pattern/atmo/*/url-pattern
/servlet-mapping


2012/6/13 Martin Grigorov mgrigo...@apache.org

 Hi,

 Check what is different between your web.xml and atmosphere.xml and
 the ones in wicket-examples.war.

 The NPE is caused by not set org.atmosphere.cpr.BroadcasterFactory but
 I'm not sure what exactly setups it.

 On Wed, Jun 13, 2012 at 11:29 AM, theAnthony anthony.ric...@gmail.com
 wrote:
  Hi,
 
  I wanted to play around with wicket 6.0.0-beta2 and wicket-atmosphere, I
  created a quickstart created a simple page which would display a number
 and
  that number would come from a simple bean with a method scheduled to be
  executed every X seconds which would push the new value to the EventBus.
 But
  at initialization of the application, I get a NullPointerException in the
  EventBus.
 
  So I went back to the quickstart and made it as simple as possible. Just
  initializing the EventBus:
 
  mvn archetype:generate -DarchetypeGroupId=org.apache.wicket
  -DarchetypeArtifactId=wicket-archetype-quickstart
  -DarchetypeVersion=6.0.0-beta2 -DgroupId=com.company.ecom
  -DartifactId=emm-client-push2
  -DarchetypeRepository=https://repository.apache.org/-DinteractiveMode=false
 
  Once created, I added the dependency in the pom file:
 
  dependency
 groupIdorg.apache.wicket/groupId
 artifactIdwicket-atmosphere/artifactId
 version0.1/version
  /dependency
 
  And finally modified init method of the WicketApplication class:
 
 public void init()
 {
 super.init();
 
 // add your configuration here
 new EventBus(this);
 }
 
  And when I launch the Start.java, here is the exception
  WARN  - AbstractLifeCycle  - FAILED wicket.emm-client-push2:
  java.lang.NullPointerException
  java.lang.NullPointerException
 at org.apache.wicket.atmosphere.EventBus.init(EventBus.java:85)
 at com.bnpp.ecom.WicketApplication.init(WicketApplication.java:31)
 at
 org.apache.wicket.Application.initApplication(Application.java:814)
 at
 org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:379)
 at
 org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:314)
 at
 org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:102)
 at
 
 org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
 at
 
 org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:748)
 at
 
 org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:249)
 at
 
 org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1222)
 at
 
 org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:676)
 at
 org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:455)
 at
 
 org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
 at
 
 org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:90)
 at org.eclipse.jetty.server.Server.doStart(Server.java:260)
 at
 
 org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
 at com.company.ecom.Start.main(Start.java:66)
 
  I think I followed the instructions from the release note so I don't
  understand what I'm missing. Any clue ?
 
  Cheers
 
  --
  View this message in context:
 

FileUpload temp files never get removed also they get tracked

2012-06-13 Thread brazz
Hi,

I'm using the FileUpload Component. The component creates temporary files
uploadtmp. 
I set some breakpoints to see what happens.

In DiskFileItem i can see that the File is added to the FileCleaner:

FileCleaner.track(tempFile, this);

but the File never gets removed from Disk.
I also added the apache commons FileCleanerCleanup -Listener to my web.xml.

listener-class
org.apache.commons.fileupload.servlet.FileCleanerCleanup
/listener-class

Is this a bug or am i missing something?
If it's a bug, is there a workaround?

Thanks for any suggestions.


I'm using wicket 1.4.17


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/FileUpload-temp-files-never-get-removed-also-they-get-tracked-tp4649926.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: FileUpload temp files never get removed also they get tracked

2012-06-13 Thread Martin Grigorov
Hi,

I don't remember how 1.4.x works exactly in this code but for 1.5 we
improved it by creating an interface
org.apache.wicket.util.file.IFileCleaner which is configured in
org.apache.wicket.settings.IResourceSettings#setFileCleaner().

By default it uses Apache-Commons FileCleaningTracker which uses a
Thread to do its work. But now Google AppEngine users can provide
their own impl if needed too.

org.apache.wicket.protocol.http.WebApplication#internalDestroy() calls
IFileCleaner#destroy() so it should clean when the app is going down.

Put a breakpoint in
org.apache.wicket.util.file.FileCleaningTracker.Reaper#run() and see
what happens.

On Wed, Jun 13, 2012 at 2:56 PM, brazz alexander.li...@man.eu wrote:
 Hi,

 I'm using the FileUpload Component. The component creates temporary files
 uploadtmp.
 I set some breakpoints to see what happens.

 In DiskFileItem i can see that the File is added to the FileCleaner:

 FileCleaner.track(tempFile, this);

 but the File never gets removed from Disk.
 I also added the apache commons FileCleanerCleanup -Listener to my web.xml.

 listener-class
                org.apache.commons.fileupload.servlet.FileCleanerCleanup
 /listener-class

 Is this a bug or am i missing something?
 If it's a bug, is there a workaround?

 Thanks for any suggestions.


 I'm using wicket 1.4.17


 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/FileUpload-temp-files-never-get-removed-also-they-get-tracked-tp4649926.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

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



Re: wicket-atmosphere NullPointerException at initialization

2012-06-13 Thread Emond Papegaaij
You will need the atmosphere.xml, although I don't think you'll get an NPE 
when that file is missing. The NPE is probably caused by a misconfiguration in 
your web.xml. As suggested, the examples are a good starting point. The 
BroadcasterFactory is setup from the init method of the AtmosphereServlet. 
Perhaps you forgot to add AtmosphereServlet to your web.xml? AtmosphereServlet 
loads atmosphere.xml, which in turn fires up the WicketFilter.

Best regards,
Emond Papegaaij

On Wednesday 13 June 2012 13:54:54 heapifyman wrote:
 I think I had the same problem and was able to overcome it by adding
 atmosphere.xml file in src/main/webapp/META-INF and changing the web.xml.
 Both I took from the wicket examples.
 
 atmosphere.xml looks like this:
 atmosphere-handlers
 atmosphere-handler context-root=/*
 class-name=org.atmosphere.handler.ReflectorServletProcessor
 property name=filterClassName
 value=org.apache.wicket.protocol.http.WicketFilter /
 /atmosphere-handler
 /atmosphere-handlers
 
 web.xml defines atmosphere servlet instead of default wicket filter:
 servlet
 servlet-nameAtmosphereApplication/servlet-name
 servlet-classorg.atmosphere.cpr.AtmosphereServlet/servlet-class
 init-param
 param-nameapplicationClassName/param-name
 param-valueorg.heapifyman.wicketatmospheretest.AtmosphereApplication/para
 m-value /init-param
 init-param
 param-nameorg.atmosphere.useWebSocket/param-name
 param-valuetrue/param-value
 /init-param
 init-param
 param-nameorg.atmosphere.useNative/param-name
 param-valuetrue/param-value
 /init-param
 init-param
 param-nameorg.atmosphere.cpr.CometSupport.maxInactiveActivity/param-name
 param-value3/param-value
 /init-param
 init-param
 param-namefilterMappingUrlPattern/param-name
 param-value/atmo/*/param-value
 /init-param
 init-param
 param-nameorg.atmosphere.websocket.WebSocketProtocol/param-name
 param-valueorg.atmosphere.websocket.protocol.EchoProtocol/param-value
 /init-param
 load-on-startup1/load-on-startup
 /servlet
 
 servlet-mapping
 servlet-nameAtmosphereApplication/servlet-name
 url-pattern/atmo/*/url-pattern
 /servlet-mapping
 
 
 2012/6/13 Martin Grigorov mgrigo...@apache.org
 
  Hi,
  
  Check what is different between your web.xml and atmosphere.xml and
  the ones in wicket-examples.war.
  
  The NPE is caused by not set org.atmosphere.cpr.BroadcasterFactory but
  I'm not sure what exactly setups it.
  
  On Wed, Jun 13, 2012 at 11:29 AM, theAnthony anthony.ric...@gmail.com
  
  wrote:
   Hi,
   
   I wanted to play around with wicket 6.0.0-beta2 and wicket-atmosphere, I
   created a quickstart created a simple page which would display a number
  
  and
  
   that number would come from a simple bean with a method scheduled to be
   executed every X seconds which would push the new value to the EventBus.
  
  But
  
   at initialization of the application, I get a NullPointerException in
   the
   EventBus.
   
   So I went back to the quickstart and made it as simple as possible. Just
   initializing the EventBus:
   
   mvn archetype:generate -DarchetypeGroupId=org.apache.wicket
   -DarchetypeArtifactId=wicket-archetype-quickstart
   -DarchetypeVersion=6.0.0-beta2 -DgroupId=com.company.ecom
   -DartifactId=emm-client-push2
   -DarchetypeRepository=https://repository.apache.org/-DinteractiveMode=fa
   lse
   
   Once created, I added the dependency in the pom file:
   
   dependency
   
  groupIdorg.apache.wicket/groupId
  artifactIdwicket-atmosphere/artifactId
  version0.1/version
   
   /dependency
   
   And finally modified init method of the WicketApplication class:
  public void init()
  {
  
  super.init();
  
  // add your configuration here
  new EventBus(this);
  
  }
   
   And when I launch the Start.java, here is the exception
   WARN  - AbstractLifeCycle  - FAILED wicket.emm-client-push2:
   java.lang.NullPointerException
   java.lang.NullPointerException
   
  at org.apache.wicket.atmosphere.EventBus.init(EventBus.java:85)
  at
  com.bnpp.ecom.WicketApplication.init(WicketApplication.java:31)
  at
  
  org.apache.wicket.Application.initApplication(Application.java:814)
  
  at
  
  org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:379)
  
  at
  
  org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:314)
  
  at
  
  org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:102)
  
  at
  
  org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle
  .java:59) 
  at
  
  org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:74
  8) 
  at
  
  org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContex
  tHandler.java:249) 
  at
  
  org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:122
  2) 
  at
  
  

Re: FileUpload temp files never get removed also they get tracked

2012-06-13 Thread brazz
Thanks for your reply Martin!

After i declared the commons FileCleaner interface in my web.xml the file
was removed after my session timed out. Obviously i was just to impatient.
It also went through the breakpoint in the reaper thread. 
I thin this functionality is enough for my needs.

Thank you!



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/FileUpload-temp-files-never-get-removed-also-they-get-tracked-tp4649926p4649930.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: PageExpiredErrorPage not working.

2012-06-13 Thread Martin Grigorov
Hi,

Just replace BookmarkablePageLink with Link:

//  add(new BookmarkablePageLinkVoid(auth2, 
AuthenticatedPage2.class));

add(new LinkVoid(auth2 ) {

@Override
public void onClick()
{
setResponsePage(AuthenticatedPage2.class);
}
});

The difference is that with Link Wicket will try to find the instance
of AuthenticatedPage to be able to execute onClick() of the Link
inside this page.
With BookmarkablePageLink there is no call to AuthenticatedPage at all
and thus there is no lookup for the expired page.

On Wed, Jun 13, 2012 at 12:49 PM, vaibhav2012 vaibhav.bit2...@gmail.com wrote:
 Hi Martin,

 I am attaching a quick start sample application related to my scenario.
 The application is a secured web application.

 I have mounted a SignInPage and two authenticated pages
 AuthenticatedPage1 and AuthenticatedPage2.
 AuthenticatedPage1 and AuthenticatedPage2 can be accessed only after
 signing in.
 I have also made a SessionExpire page which should be shown in case of
 session timeout.

 I have implemented IAuthorizationStrategy in AuthStrategy class and have
 configured this in WebApplication's init() method.


 I have set the session timeout to 1 minute in web.xml file.

 *Scenario :*
 1) Run the application.
 2) Click on SignIn link in homepage.
 3) SignIn with any combination of username and password.
 4) Now click on AuthenticatedPage link and go that page.
 5) Wait for more than 1 minute for session to timeout.
 6) Now click on Second Authenticated Page link.
 At this point SessionExpire page should come up. This is the desired result.
 But it doesnt.
 Instead signin page comes up again.

 Please help me where i am going wrong.

 http://apache-wicket.1842946.n4.nabble.com/file/n4649921/SessionTest.rar
 SessionTest.rar



 -
 Regards,

 Vaibhav Gupta
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/PageExpiredErrorPage-not-working-tp4649905p4649921.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

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



Re: Progressbar problems

2012-06-13 Thread Sandor Feher
Hi,

Looks very nice. But how attach my uploadfield to 

// Get current progress from page field
@Override
protected Progression getProgression()
{
return new Progression(progress, Item  + 
item);
}

?

thnx, Sandor

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Progressbar-problems-tp4649923p4649932.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: Progressbar problems

2012-06-13 Thread Martin Grigorov
I see that this indeed is not something easy to achieve ... :-/

See the code in
org.apache.wicket.extensions.ajax.markup.html.form.upload.UploadStatusResource#getStatus()
It uses:
final HttpServletRequest req =
(HttpServletRequest)attributes.getRequest().getContainerRequest();
UploadInfo info = MultipartServletWebRequestImpl.getUploadInfo(req, upload);


Additionally I see that Wicket provides
org.apache.wicket.util.upload.ProgressListener but it is not easy at
all to set this listener with
org.apache.wicket.util.upload.FileUploadBase#setProgressListener().

Feel free to file a ticket to improve this.

On Wed, Jun 13, 2012 at 5:09 PM, Sandor Feher sfe...@bluesystem.hu wrote:
 Hi,

 Looks very nice. But how attach my uploadfield to

 // Get current progress from page field
                        @Override
                        protected Progression getProgression()
                        {
                                return new Progression(progress, Item  + 
 item);
                        }

 ?

 thnx, Sandor

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Progressbar-problems-tp4649923p4649932.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

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



Re: Wicket 1.5 and nested forms

2012-06-13 Thread Thomas Heigl
Hello,

In case anyone else is encountering this problem when migrating from 1.4 to
1.5, I solved it by overriding delegateSubmit in my form:

public static enum SubmitOrder {
 /** Submit form submitter before forms (1.5 Default) */
 OUTSIDE_IN,
 /** Submit form submitter after forms (1.4 Default) */
 INSIDE_OUT
 }

 private SubmitOrder submitOrder = SubmitOrder.OUTSIDE_IN;



@Override
 protected void delegateSubmit(IFormSubmitter submittingComponent) {
 switch (submitOrder) {
 case OUTSIDE_IN:
 super.delegateSubmit(submittingComponent);
 break;
 case INSIDE_OUT:
 super.delegateSubmit(null);
 if (submittingComponent != null) {
 submittingComponent.onSubmit();
 }
 break;
 }
 }


Cheers,

Thomas

On Wed, May 9, 2012 at 3:07 PM, Thomas Heigl tho...@umschalt.com wrote:

 Hey Martin,


 WICKET-3705 links to https://issues.apache.org/jira/browse/WICKET-1894
 which says that this order is changed in 1.4.15


 I upgraded to Wicket 1.5 from Wicket 1.4.20 and it still has been working
 with 1.4.20.

 This is the way how it works in 1.5/6.x. I'm not sure why it is not
 documented.
  But there are different opinions about it:
  https://issues.apache.org/jira/browse/WICKET-3705


 I just thought about it some more and I think the new behavior is quite
 counter intuitive. For instance my following usecase:

 final class CompoundForm extends BaseFormExample {
 public CompoundSearchRequestForm(String id, final IModelExample model) {
 super(id, model);
  add(new BaseForm(baseForm, model));
 add(new ConfigurationForm(configurationForm, model));
  add(new SettingsForm(settingsForm, model));
 add(new AjaxButton(save) {
  @Override
 protected void onSubmit(AjaxRequestTarget target, Form? form) {

  // do nothing - delegated to form's onSubmit
  }
 });
 }
 @Override
  protected void onSubmit() {
 super.onSubmit();
 listener.saveModel(getModelObject());
  }
 }


 I moved the buttons onSubmit logic to the form's logic to mimic Wicket 1.4
 behavior. This works, but the button is now pretty useless and just
 triggers a form submit. In the form's onSubmit on the other hand I don't
 have (direct) access to the AjaxRequestTarget so I'd have to split
 functionality into the two handlers and always think about which order they
 are called in.

 The problems get harder if you don't have complete control over the nested
 form structure. For instance, when you are using the Wizards from
 wicket-extensions. They always wrap their contents in a compound form. We
 use ajaxified versions of Wizards extensively and the new form submit flow
 makes them very hard to use. The next/finish/previous links of the wizard
 are now called before any of the actual forms inside the wizard had their
 onSubmit handler called. The buttons in fact *replace* the inner form
 before it has been submitted and I had to move the wizards state change
 logic to onConfigure to make it work again:

 @Override
 public void onActiveStepChanged(IWizardStep newStep) {
  // do nothing - logic moved to #onConfigure to prevent replacement of
 the form before validation of nested forms
 }
 @Override
 protected void onConfigure() {
  super.onConfigure();
 final IWizardStep activeStep = getActiveStep();
 getForm().replace(activeStep.getView(VIEW_ID, this, this));
  getForm().replace(activeStep.getHeader(HEADER_ID, this, this));
 }


 I worked around these problems but I'd greatly prefer a way to configure
 the form submit order somewhere. Ideally on the compound form or the ajax
 button.

 Thomas

 On Wed, May 9, 2012 at 1:24 PM, Martin Grigorov mgrigo...@apache.orgwrote:

 On Wed, May 9, 2012 at 2:22 PM, Martin Grigorov mgrigo...@apache.org
 wrote:
  Hi Thomas,
 
  On Wed, May 9, 2012 at 2:12 PM, Thomas Heigl tho...@umschalt.com
 wrote:
  Hello,
 
  I notices a strange behavior after upgrading to Wicket 1.5. Nested
 forms
  are submitted in a different order.
 
  I have structures like this:
 
  - Compound Form
  -- Subform 1
  -- Subform 2
  -- Subform 3
  - Submit Link/Button for Compound Form
 
 
  In Wicket 1.4 the order of calls to onSubmit was like this:
 
  1. Subforms
  2. Compound Form
  3. Submit Link/Button
 
  In multiple locations I had logic in the subforms' onSubmit handlers
 that
  do cleanup, re-attaching of models to entities etc. before my links
 submit
  handler is called and persists my model object.
 
  In Wicket 1.5 the submit link's handler that I use for my main logic is
  actually called before the subforms:
 
  1. Submit Link
  2. Subforms
  3. Compound Form
 
  I can fix this by moving all my compound form logic from the
 link/buttons
  onSubmit handler to the compound form's handler, but wanted to check
 first
  if this behavior is intentional?
  Is this the way to do it in Wicket 1.5?
 
  This is the way how it works in 1.5/6.x. I'm not sure why it is not
 documented.
  But there are different opinions about it:
  https://issues.apache.org/jira/browse/WICKET-3705

 WICKET-3705 links to https://issues.apache.org/jira/browse/WICKET-1894
 which says 

Re: Wicket 1.5 and nested forms

2012-06-13 Thread Stefan Moises
Thank you very much, Thomas, I was struggling with exactly this problem 
for a couple of hours yesterday... I think this should be changed back 
or at least be configurable in the next versions !


Cheers,
Stefan

Am 13.06.2012 17:14, schrieb Thomas Heigl:

Hello,

In case anyone else is encountering this problem when migrating from 1.4 to
1.5, I solved it by overriding delegateSubmit in my form:

public static enum SubmitOrder {

/** Submit form submitter before forms (1.5 Default) */
OUTSIDE_IN,
/** Submit form submitter after forms (1.4 Default) */
INSIDE_OUT
}

private SubmitOrder submitOrder = SubmitOrder.OUTSIDE_IN;



@Override

protected void delegateSubmit(IFormSubmitter submittingComponent) {
switch (submitOrder) {
case OUTSIDE_IN:
super.delegateSubmit(submittingComponent);
break;
case INSIDE_OUT:
super.delegateSubmit(null);
if (submittingComponent != null) {
submittingComponent.onSubmit();
}
break;
}
}


Cheers,

Thomas

On Wed, May 9, 2012 at 3:07 PM, Thomas Heigltho...@umschalt.com  wrote:


Hey Martin,



WICKET-3705 links to https://issues.apache.org/jira/browse/WICKET-1894
which says that this order is changed in 1.4.15


I upgraded to Wicket 1.5 from Wicket 1.4.20 and it still has been working
with 1.4.20.

This is the way how it works in 1.5/6.x. I'm not sure why it is not

documented.

But there are different opinions about it:
https://issues.apache.org/jira/browse/WICKET-3705


I just thought about it some more and I think the new behavior is quite
counter intuitive. For instance my following usecase:

final class CompoundForm extends BaseFormExample  {

public CompoundSearchRequestForm(String id, final IModelExample  model) {
super(id, model);
  add(new BaseForm(baseForm, model));
add(new ConfigurationForm(configurationForm, model));
  add(new SettingsForm(settingsForm, model));
add(new AjaxButton(save) {
  @Override
protected void onSubmit(AjaxRequestTarget target, Form?  form) {

  // do nothing -  delegated to form's onSubmit

  }
});
}
@Override
  protected void onSubmit() {
super.onSubmit();
listener.saveModel(getModelObject());
  }
}


I moved the buttons onSubmit logic to the form's logic to mimic Wicket 1.4
behavior. This works, but the button is now pretty useless and just
triggers a form submit. In the form's onSubmit on the other hand I don't
have (direct) access to the AjaxRequestTarget so I'd have to split
functionality into the two handlers and always think about which order they
are called in.

The problems get harder if you don't have complete control over the nested
form structure. For instance, when you are using the Wizards from
wicket-extensions. They always wrap their contents in a compound form. We
use ajaxified versions of Wizards extensively and the new form submit flow
makes them very hard to use. The next/finish/previous links of the wizard
are now called before any of the actual forms inside the wizard had their
onSubmit handler called. The buttons in fact *replace* the inner form
before it has been submitted and I had to move the wizards state change
logic to onConfigure to make it work again:

@Override

public void onActiveStepChanged(IWizardStep newStep) {
  // do nothing -  logic moved to #onConfigure to prevent replacement of
the form before validation of nested forms
}
@Override
protected void onConfigure() {
  super.onConfigure();
final IWizardStep activeStep = getActiveStep();
getForm().replace(activeStep.getView(VIEW_ID, this, this));
  getForm().replace(activeStep.getHeader(HEADER_ID, this, this));
}


I worked around these problems but I'd greatly prefer a way to configure
the form submit order somewhere. Ideally on the compound form or the ajax
button.

Thomas

On Wed, May 9, 2012 at 1:24 PM, Martin Grigorovmgrigo...@apache.orgwrote:


On Wed, May 9, 2012 at 2:22 PM, Martin Grigorovmgrigo...@apache.org
wrote:

Hi Thomas,

On Wed, May 9, 2012 at 2:12 PM, Thomas Heigltho...@umschalt.com

wrote:

Hello,

I notices a strange behavior after upgrading to Wicket 1.5. Nested

forms

are submitted in a different order.

I have structures like this:

- Compound Form

-- Subform 1
-- Subform 2
-- Subform 3
- Submit Link/Button for Compound Form


In Wicket 1.4 the order of calls to onSubmit was like this:

1. Subforms
2. Compound Form
3. Submit Link/Button

In multiple locations I had logic in the subforms' onSubmit handlers

that

do cleanup, re-attaching of models to entities etc. before my links

submit

handler is called and persists my model object.

In Wicket 1.5 the submit link's handler that I use for my main logic is
actually called before the subforms:

1. Submit Link
2. Subforms
3. Compound Form

I can fix this by moving all my compound form logic from the

link/buttons

onSubmit handler to the compound form's handler, but wanted to check

first

if this behavior is intentional?
Is this the way to do it in Wicket 1.5?

This is the way how it works in 1.5/6.x. I'm not sure why it is not

documented.

But there are different opinions about it:

add a component (submitLink) multiple times?

2012-06-13 Thread oliver.stef
How can I add a component (submitLink) multiple times?

like this:

ListString categories = Arrays.asList(English, Japanese, );  

for (String str : language) 
{
 form.add(new SubmitLink(Name,str)
{ 
@Override
public void onSubmit() { ...}
   }
}

and HTML:

#   

Any ideas?

Thanks!


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/add-a-component-submitLink-multiple-times-tp4649936.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: add a component (submitLink) multiple times?

2012-06-13 Thread oliver.stef
How can I add a component (submitLink) multiple times? 

like this: 

ListString categories = Arrays.asList(English, Japanese, );   

for (String str : language) 
{ 
 form.add(new SubmitLink(Name,str) 
{ 
@Override 
public void onSubmit() { ...} 
   } 
} 

and HTML: 
#   
  

Any ideas? 

Thanks! 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/add-a-component-submitLink-multiple-times-tp4649936p4649938.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: add a component (submitLink) multiple times?

2012-06-13 Thread oliver.stef
How can I add a component (submitLink) multiple times? 

like this: 

ListString categories = Arrays.asList(English, Japanese, );   

for (String str : language) 
{ 
 form.add(new SubmitLink(Name,str) 
{ 
@Override 
public void onSubmit() { ...} 
   } 
} 

and HTML: 
#   
  

Any ideas? 


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/add-a-component-submitLink-multiple-times-tp4649936p4649939.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: add a component (submitLink) multiple times?

2012-06-13 Thread Thomas Götz
I don't know exactly what you are trying to do, but you could have a look at 
RepeatingView.

   -Tom


On 13.06.2012 at 19:23 oliver.stef wrote:

 How can I add a component (submitLink) multiple times? 
 
 like this: 
 
 ListString categories = Arrays.asList(English, Japanese, );   
 
 for (String str : language) 
 { 
 form.add(new SubmitLink(Name,str) 
{ 
@Override 
public void onSubmit() { ...} 
   } 
 } 
 
 and HTML: 
 # 
 
 
 Any ideas? 


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



Re: add a component (submitLink) multiple times?

2012-06-13 Thread Michal Margiel
Hello,

No, your code is not correct.  You should use some kind of repeaters, like
ListView:

https://cwiki.apache.org/WICKET/listview-and-other-repeaters.html

2012/6/13 oliver.stef ova...@gmail.com

 How can I add a component (submitLink) multiple times?

 like this:

 ListString categories = Arrays.asList(English, Japanese, );

 for (String str : language)
 {
 form.add(new SubmitLink(Name,str)
{
@Override
public void onSubmit() { ...}
   }
 }

 and HTML:
 #


 Any ideas?


 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/add-a-component-submitLink-multiple-times-tp4649936p4649939.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




-- 
Pozdrawiam/Best regards
Michał Margiel

http://www.confitura.pl (dawniej Javarsovia)
http://www.linkedin.com/in/MichalMargiel
http://www.margiel.eu


AjaxCheckBox inconsistently showing state (value)

2012-06-13 Thread eugenebalt
I have an AjaxCheckBox; when selected, several components get hidden,
otherwise the extra components are shown.

It works, but several times, when selecting the AjaxCheckBox, the extra
components go away correctly, but the value of the AjaxCheckBox quickly
changes from selected *back* to non-selected. The final result of this Ajax
update is that the checkbox is shown un-selected even though it should be
selected.

On any subsequent clicks, the state is synchronized. This inconsistent state
never happens again.

What could it be? As far as I can tell, this AjaxCheckBox is not directly
getting updated from any other sources (it's not target.addComponent-added
from other Ajax actions). Thanks

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxCheckBox-inconsistently-showing-state-value-tp4649941.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: AjaxCheckBox inconsistently showing state (value)

2012-06-13 Thread eugenebalt
Actually, the solution I found is to do this in the AjaxCheckBox's
onUpdate():

*arg0.addComponent(this);*

This works - the checkbox always returns to the correct value after
switching it. But what could possibly lead to this? Why would there be a
situation where I need to addComponent(this)?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxCheckBox-inconsistently-showing-state-value-tp4649941p4649942.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: AjaxCheckBox inconsistently showing state (value)

2012-06-13 Thread eugenebalt
Problem resolved - there was another large Ajax update from another component
that was interfering and hadn't finished yet.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxCheckBox-inconsistently-showing-state-value-tp4649941p4649943.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: add a component (submitLink) multiple times?

2012-06-13 Thread Martin Grigorov
Hi,

Use a repeater like ListView or RepeatingView around them.

On Wed, Jun 13, 2012 at 8:23 PM, oliver.stef ova...@gmail.com wrote:
 How can I add a component (submitLink) multiple times?

 like this:

 ListString categories = Arrays.asList(English, Japanese, );

 for (String str : language)
 {
     form.add(new SubmitLink(Name,str)
    {
    @Override
    public void onSubmit() { ...}
   }
 }

 and HTML:
 #


 Any ideas?


 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/add-a-component-submitLink-multiple-times-tp4649936p4649939.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

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



using links in feedback panels

2012-06-13 Thread Carter, Isaac
Does anyone know if it's possible to have an error message in a feedback panel 
link to the error that caused it?   Such as the user has filled in a given 
number of fields and puts in the wrong data in one field...an error message is 
presented in a feedback paneluser  clicks on the error message and it takes 
them directly to the field that contains the error.  That's the scenario I have 
in mind.

Suggestions anyone?

Thanks,

Isaac Carter


This e-mail and any attachments are intended only for the use of the 
addressee(s) named herein and may contain proprietary information. If you are 
not the intended recipient of this e-mail or believe that you received this 
email in error, please take immediate action to notify the sender of the 
apparent error by reply e-mail; permanently delete the e-mail and any 
attachments from your computer; and do not disseminate, distribute, use, or 
copy this message and any attachments.


stateless resources vs. no cookies

2012-06-13 Thread Jan Loose

Hi,

I found this problem in Wicket 1.4.20 if cookies are disabled.

If there is used a stateless resource then no jsessionid is rendered. It  
is removed on the line 390 of the class WebRequestCodingStrategy. I hope  
this is OK.


Once the browser makes a request to this resource, then there is created a  
new session, because there is no jsessionid - neither defined by cookie  
nor defined by the URL.


The class RequestLogger, line 229 - from my point of view the method  
'requestTime' shouldn't work with the session in this case.
The class WicketFilter, line 1197 - if the resource is cacheable then the  
session is obtained, why? The problem is that there is no session because  
no jsessionid is defined.


What is the reason for this? Does anyone have any idea how to fix it/do a  
workaround?


Thank you very much,
Jan

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



Re: guestbook application with database update

2012-06-13 Thread jaffa
The graph database is a kind of NoSQL database that uses graph structures
with nodes, edges, and properties to represent and store information.
General graph databases that can store any graph are distinct from
specialized graph databases such as triplestores and network databases.
Thanks.
Regards,
http://www.academicwritinghelp.biz/essay-writing-help/ essay writing help 


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/guestbook-application-with-database-update-tp4316943p4649899.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



6.0.0-beta2 IClusterable

2012-06-13 Thread Rafał Krupiński
Hi

What happened to IClusterable interface? It's missing both from jar
and from wiki page on migration :-)
Is it OK to simply replace it with Serializable?

-- 
Pozdrawiam / Best Regards
Rafal Krupinski

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



PackageResourceBlockedException after migration to 6.0.0-beta2

2012-06-13 Thread Rafał Krupiński
I've just changed wicket dependency from 1.5.6 to 6.0.0-beta2 and
s/IClusterable/Serializable/
...and this is what I got:

Unexpected RuntimeException

Last cause: Access denied to (static) package resource
com/hashnot/nbp. See IPackageResourceGuard
Root cause:

org.apache.wicket.request.resource.PackageResource$PackageResourceBlockedException:
Access denied to (static) package resource com/hashnot/nbp. See
IPackageResourceGuard
at 
org.apache.wicket.request.resource.PackageResource.internalGetResourceStream(PackageResource.java:459)
[snip]



This is the situation:

mypackage.MyApplication{
 void init(){
  mountPage(nbp, MyPage.class)
  //other similar mounts
 }
}

mypackage.BasePage{
//base Page with links to all mounted pages
}

mypackage.nbp.MyPage extends BasePage{}

(and of course the markup)
All links between mounted pages are handled by BasePage class and its markup.

From the BasePage's point of view there is page mounted under nbp
and a subpackage nbp.

After I changed the mount from nbp to nbp-rates it started working,
so it looks like in case of conflicting mount-path and relative
package name there is a regression:
* in 1.5.x linking to X meant linking to mounted page
* in 6.0 it means linking to package


Can someone confirm it?
-- 
Pozdrawiam / Best Regards
Rafal Krupinski

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



Re: Wicket as Jboss Modules

2012-06-13 Thread Илья Нарыжный
Finally I did it!
As jboss module I created 2 modules: wicket and wicketstuff. Configuration:

?xml version=1.0 encoding=UTF-8?
module xmlns=urn:jboss:module:1.0 name=org.apache.wicket
   resources
   resource-root path=wicket-core-1.5.7.jar/
   resource-root path=wicket-request-1.5.7.jar/
   resource-root path=wicket-auth-roles-1.5.7.jar/
   resource-root path=wicket-extensions-1.5.7.jar/
   resource-root path=wicket-datetime-1.5.7.jar/
   resource-root path=wicket-util-1.5.7.jar/
   /resources
   dependencies
  module name=org.apache.commons.collections/
  module name=javaee.api/
  module name=org.jboss.logging/
  module name=org.jboss.as.web/
  module name=org.slf4j/
   /dependencies
/module

and

?xml version=1.0 encoding=UTF-8?
module xmlns=urn:jboss:module:1.0 name=org.wicketstuff
   resources
   resource-root path=wicketstuff-autocomplete-tagit-1.5.5.jar/
   resource-root path=wicketstuff-tinymce-1.5.5.jar/
   resource-root path=jazzy-0.5.2-rtext-1.4.1.jar/
   /resources
   dependencies
  module name=org.apache.commons.collections/
  module name=org.apache.wicket/
  module name=org.slf4j/
  !--module name=org.springframework export=true/--
   /dependencies
/module

But I found that wicketstuff-anotation can't be organized as a module
because in class org.wicketstuff.config.MatchingResources in method
getClass page class is constructed in current classloader. I would
like to recommend to rewrite this class in a way when classloader for
corresponding initial application is used.

Thanks,

Ilia

2012/6/13 Martin Grigorov mgrigo...@apache.org:
 Good point!
 https://issues.apache.org/jira/browse/WICKET-4604

 On Wed, Jun 13, 2012 at 9:31 AM, Igor Vaynberg igor.vaynb...@gmail.com 
 wrote:
 we have to be sure we do not use any static fields anywhere in the
 code...it's not just the singletons that break this use case. eg we do not
 want caches to be shared across applications because it's not performant
 and can result in cross application object leakage.

 -igor

 On Tuesday, June 12, 2012, Martin Grigorov wrote:

 Hi,

 Wicket uses ThreadLocal for the Application, Session and RequestCycle.
 There are no JVM singletons.

 Some people are against putting jars in the shared lib folder. I
 personally see the benefit and I'd do it if I need to
 If you use shared jars then make sure that none of the applications
 provide these jars or another version of them because in this case you
 will see some ClassLoader related problems, e.g.: ClassCastException:
 o.a.w.Session class is not o.a.w.Session.

 On Tue, Jun 12, 2012 at 11:04 PM, Martin Sachs 
 sachs.mar...@gmail.comjavascript:;
 wrote:
  Hello,
 
  i think that is in general not a good idea. If you deploy the wicket-lib
  outside the war and run multiple Wicket-Applications, then you could not
 use
  all applications, because wicket stores (as far as i know) e.g. the
  application instance in a static field. There is one application per
  WAR-deployment with wicket, but if you use the libs from ear/lib or
 modules
  there will be only one application.
 
  best
  Martin
 
  Илья Нарыжный schrieb:
 
  Hello,
 
  I have several projects which use wicket and various wicket sun-modules.
  Every project (*.ear file) took about 10Mb and about 8Mb is for wicket
  libraries.
  Recently I have move my projects to Jboss AS 7 and now I'm thinking
  about putting all wicket related jars to JBOSS_HOME/modules.
 
  Have anyone tried that? Do you have some suggestions for Jboss module
  structure for this?
  It will be great to have
 
  IMPLICIT(
 https://docs.jboss.org/author/display/AS7/Implicit+module+dependencies+for+deployments
 )
  deploy of wicket related jars to the project.
 
  Thanks,
 
  Ilia
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.orgjavascript:;
  For additional commands, e-mail: 
  users-h...@wicket.apache.orgjavascript:;
 
 
 
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.orgjavascript:;
  For additional commands, e-mail: 
  users-h...@wicket.apache.orgjavascript:;
 



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

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





 --
 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


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

Site crashes please help to solve the problem.

2012-06-13 Thread ikharatin
 java.io.NotSerializableException: singlepagecrudform.index$GirlInfo
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at java.util.ArrayList.writeObject(ArrayList.java:570)
at sun.reflect.GeneratedMethodAccessor417.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at 
java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
at 
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
at 
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at
org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1585)
at
org.apache.catalina.session.StandardSession.writeObjectData(StandardSession.java:1015)
at
org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:528)
at
org.apache.catalina.session.StandardManager.unload(StandardManager.java:469)
at
org.apache.catalina.session.StandardManager.stop(StandardManager.java:678)
at 
org.apache.catalina.core.StandardContext.stop(StandardContext.java:4882)
at
org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:936)
at
org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1359)
at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1330)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:326)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1098)
at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1110)
at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:468)
at 
org.apache.catalina.core.StandardService.stop(StandardService.java:604)
at org.apache.catalina.core.StandardServer.stop(StandardServer.java:788)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:662)
at org.apache.catalina.startup.Catalina.start(Catalina.java:629)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Jun 14, 2012 12:49:18 AM org.apache.catalina.session.StandardSession
writeObject
WARNING: Cannot serialize session attribute index for session
1571E239DFD6121C18FD70C232A265D4
java.io.NotSerializableException: singlepagecrudform.index$GirlInfo
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at java.util.ArrayList.writeObject(ArrayList.java:570)
at sun.reflect.GeneratedMethodAccessor417.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at 
java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
at 
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
at 
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at
org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1585)
at
org.apache.catalina.session.StandardSession.writeObjectData(StandardSession.java:1015)
at

Re: Site crashes please help to solve the problem.

2012-06-13 Thread Wiliam Bacchi
I don't know what java object index is, but it should implement 
Serializable.


Hope this help.

William Bacchi.

Il 14/06/2012 0.43, ikharatin ha scritto:

  java.io.NotSerializableException: singlepagecrudform.index$GirlInfo
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at java.util.ArrayList.writeObject(ArrayList.java:570)
at sun.reflect.GeneratedMethodAccessor417.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at 
java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
at 
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
at 
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at
org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1585)
at
org.apache.catalina.session.StandardSession.writeObjectData(StandardSession.java:1015)
at
org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:528)
at
org.apache.catalina.session.StandardManager.unload(StandardManager.java:469)
at
org.apache.catalina.session.StandardManager.stop(StandardManager.java:678)
at 
org.apache.catalina.core.StandardContext.stop(StandardContext.java:4882)
at
org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:936)
at
org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1359)
at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1330)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:326)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1098)
at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1110)
at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:468)
at 
org.apache.catalina.core.StandardService.stop(StandardService.java:604)
at org.apache.catalina.core.StandardServer.stop(StandardServer.java:788)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:662)
at org.apache.catalina.startup.Catalina.start(Catalina.java:629)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Jun 14, 2012 12:49:18 AM org.apache.catalina.session.StandardSession
writeObject
WARNING: Cannot serialize session attribute index for session
1571E239DFD6121C18FD70C232A265D4
java.io.NotSerializableException: singlepagecrudform.index$GirlInfo
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at java.util.ArrayList.writeObject(ArrayList.java:570)
at sun.reflect.GeneratedMethodAccessor417.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at 
java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
at 
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
at 
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at
org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1585)
at

Re: PageExpiredErrorPage not working.

2012-06-13 Thread vaibhav2012
Hi Martin,

Thanks alot :). That worked.

Just lil bit curious : I didn't see any PageExpiredException in the logs now
also. Why is that?

-
Regards,

Vaibhav Gupta
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/PageExpiredErrorPage-not-working-tp4649905p4649955.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



example to avoid pagemap locks

2012-06-13 Thread fachhoch
One of my page is a search page this sometimes gets stuck because the users
search criteria is time consuming and I get page map is still locked error.
To avoid this I want to modify this page to use a job to execute the search
in a thread and a timer to check every 5 second 's if search is complete and
option to cancel the search (job). If user does not like to wait.
Are there any examples of  this kind ?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/example-to-avoid-pagemap-locks-tp4649956.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