Re: Image Upload Using TinyMCE Within Wicket Framework

2010-05-04 Thread Michał Letyński

I had similar problem with all wicket-stuff examles ...
http://apache-wicket.1842946.n4.nabble.com/Building-tinymce-examples-from-wicketstuff-td2048254.html#a2048254
You must checkout only tinymce-parent and build it from there. When you 
have downloaded whole wicketstuff-core with parent pom you will get such 
errors with wrong paths.


W dniu 2010-05-01 03:07, 新希望软件 -- 俞宏伟  pisze:

image upload example run failuer, the application throwsNoClassDefFoundError
.

WicketMessage: Can't instantiate page using constructor public
wicket.contrib.examples.tinymce.ImageUploadTinyMCEPage()

Root cause:

java.lang.NoClassDefFoundError: wicket/contrib/tinymce/image/ImageUploadPanel
  at 
wicket.contrib.examples.tinymce.ImageUploadTinyMCEPage.init(ImageUploadTinyMCEPage.java:42)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

  at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
  at 
org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:192)
  at 
org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:57)

  at 
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:298)
  at 
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:320)

  at 
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:234)
  at 
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)

  at 
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250)
  at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
  at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)

  at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
  at 
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479)
  at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:312)

  at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
  at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
  at 
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)

  at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
  at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
  at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)

  at 
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
  at 
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
  at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)

  at org.mortbay.jetty.Server.handle(Server.java:326)
  at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
  at 
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)

  at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
  at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
  at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)

  at 
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
  at 
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

Complete stack:

org.apache.wicket.WicketRuntimeException: Can't instantiate page using
constructor public
wicket.contrib.examples.tinymce.ImageUploadTinyMCEPage()

  at 
org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:212)
  at 
org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:57)
  at 
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:298)

  at 
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:320)
  at 
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:234)

  at 
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
  at 
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250)
  at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)

  at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
  at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
  at 
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479)

java.lang.reflect.InvocationTargetException
  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  at 

Re: Image Upload Using TinyMCE Within Wicket Framework

2010-05-04 Thread Michał Letyński

Hi.
If you have images in tiny with external src it should work but if you 
have in src a wicket path you must change it (to component which will 
get the image look at IResourceListener)  before displainng image in 
label, multilinelabel, etc.



W dniu 2010-05-03 09:10, Robert Kimotho pisze:

When I submit a form with an emoticon from the fullfeatured tinymce, the
image doesn't get displayed in the destination
only the text.
any suggestions, I've been stuck here for a while now.

2010/5/1 新希望软件 -- 俞宏伟nhsoft@gmail.com

   

image upload example run failuer, the application
throwsNoClassDefFoundError
.

WicketMessage: Can't instantiate page using constructor public
wicket.contrib.examples.tinymce.ImageUploadTinyMCEPage()

Root cause:

java.lang.NoClassDefFoundError:
wicket/contrib/tinymce/image/ImageUploadPanel
 at
wicket.contrib.examples.tinymce.ImageUploadTinyMCEPage.init(ImageUploadTinyMCEPage.java:42)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)

 at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
 at
org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:192)
 at
org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:57)

 at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:298)
 at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:320)

 at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:234)
 at
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)

 at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)

 at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
 at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479)
 at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:312)

 at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
 at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
 at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)

 at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
 at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
 at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)

 at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
 at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
 at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)

 at org.mortbay.jetty.Server.handle(Server.java:326)
 at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
 at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)

 at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
 at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
 at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)

 at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
 at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

Complete stack:

org.apache.wicket.WicketRuntimeException: Can't instantiate page using
constructor public
wicket.contrib.examples.tinymce.ImageUploadTinyMCEPage()

 at
org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:212)
 at
org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:57)
 at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:298)

 at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:320)
 at
org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:234)

 at
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
 at
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)

 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
 at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
 at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479)

java.lang.reflect.InvocationTargetException
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
 

Re: Session Timeout - detect last visited page and redirect accordingly

2010-05-04 Thread Zilvinas Vilutis
I've added an ajax timer so session timeout never happens on an open browser.

Or you can always store your user state in the DB if you want, e.g.
the URL visited.

Žilvinas Vilutis

Mobile:   (+370) 652 38353
E-mail:   cika...@gmail.com



On Mon, May 3, 2010 at 4:59 PM, Tony Wu e90t...@gmail.com wrote:
 I have an application where on session timeout, I want to redirect to
 different pages based on what their last visited page was. Currently my app
 only redirects to the same page all the time through
 getApplicationSettings().setPageExpiredErrorPage(LoginPage.class). Is there
 any way to capture the prior page and redirect them accordingly?

 Thanks,
 Tony


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



TinyMCE + TextArea + Jackrabbit

2010-05-04 Thread Wilhelmsen Tor Iver
Using wicketstuff tinymce 1.4.1 attached to a TextArea, it seems I cannot get 
it to stop escaping the resulting HTML:

TextAreaString textArea = new 
TextAreaString(threadSubjectTextInput, new ModelString());
textArea.setEscapeModelStrings(false);
TinyMCESettings settings = new TinyMCESettings();
settings.setToolbarLocation(TinyMCESettings.Location.top);
TinyMceBehavior behavior = new TinyMceBehavior(settings);
textArea.add(behavior);

Obtaining value:
String article = 
getForm().get(threadSubjectTextInput).getDefaultModelObjectAsString();

Setting property on JCR node:

articleNode.setProperty(articleText, article);

Rendering the output from the Jackrabbit Node:

   articleItem.add(new Label(forumArticle, 
article.getArticleText()).setEscapeModelStrings(false));

Is there some other code which might escape the HTML?

Med vennlig hilsen

TOR IVER WILHELMSEN
Senior systemutvikler
Arrive AS
T (+47) 48 16 06 18
E-post: toriv...@arrive.no
http://www.arrive.no
http://servicedesk.arrive.no





Re: Image Upload Using TinyMCE Within Wicket Framework

2010-05-04 Thread Robert Kimotho
You are right I have a wicket path in src and it looks like this
'resources/wicket.contrib.tinymce.InPlaceEditBehavior/tiny_mce/plugins/emotions/img/smiley-cool.gif'
this is what you get submitted to the server, but the image does not get
displayed.
Can you guide me to using the IResourceListener or getting the emoticon
displayed at the client side.

Regards,
Kimotho.

2010/5/4 Michał Letyński mletyn...@consol.pl

 Hi.
 If you have images in tiny with external src it should work but if you have
 in src a wicket path you must change it (to component which will get the
 image look at IResourceListener)  before displainng image in label,
 multilinelabel, etc.


 W dniu 2010-05-03 09:10, Robert Kimotho pisze:

  When I submit a form with an emoticon from the fullfeatured tinymce, the
 image doesn't get displayed in the destination
 only the text.
 any suggestions, I've been stuck here for a while now.

 2010/5/1 新希望软件 -- 俞宏伟nhsoft@gmail.com



 image upload example run failuer, the application
 throwsNoClassDefFoundError
 .

 WicketMessage: Can't instantiate page using constructor public
 wicket.contrib.examples.tinymce.ImageUploadTinyMCEPage()

 Root cause:

 java.lang.NoClassDefFoundError:
 wicket/contrib/tinymce/image/ImageUploadPanel
 at

 wicket.contrib.examples.tinymce.ImageUploadTinyMCEPage.init(ImageUploadTinyMCEPage.java:42)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
 Method)

 at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
 at

 org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:192)
 at

 org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:57)

 at

 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:298)
 at

 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:320)

 at

 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:234)
 at

 org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)

 at

 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)

 at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
 at
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:479)
 at

 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:312)

 at

 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
 at
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
 at

 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)

 at
 org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
 at
 org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
 at
 org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)

 at

 org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
 at

 org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
 at
 org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)

 at org.mortbay.jetty.Server.handle(Server.java:326)
 at
 org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
 at

 org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)

 at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
 at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
 at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)

 at

 org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
 at

 org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

 Complete stack:

 org.apache.wicket.WicketRuntimeException: Can't instantiate page using
 constructor public
 wicket.contrib.examples.tinymce.ImageUploadTinyMCEPage()

 at

 org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:212)
 at

 org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:57)
 at

 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:298)

 at

 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:320)
 at

 org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:234)

 at

 org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
 at

 

Re: root context, IE, home page is not found

2010-05-04 Thread Martin Grotzke
Hi,

we also just experienced issues with this, and the fix of WICKET-2600
still causes problems (as already described in this post):

For the redirect to . tomcat produces a Location header like
http://www.example.org/. (notice the trailing dot), which causes IE to
do request exactly this url, for which no page ist mounted. Therefore
the 404 page not found.

Is there a special reason why . was chosen here?

What do you think about an alternative handling like this:

if (redirectUrl.startsWith(./)) {
  if (redirectUrl.length() == 2)) {
WebRequest request = (WebRequest) requestCycle.getRequest();
String contextPath = request.getHttpServletRequest().getContextPath(); // 
e.g. /myapp
String servletPath = request.getServletPath(); // e.g. /
redirectUrl = contextPath + servletPath;
  }
  else {
redirectUrl.substring( 2 )
  }
}

Cheers,
Martin


On Sat, 2010-05-01 at 10:47 +0200, Erik van Oosten wrote:
 This might be related to https://issues.apache.org/jira/browse/WICKET-2600?
 
 Regards,
  Erik.
 
 
 Op 29-04-10 16:57, Jimi wrote:
  I would also like to know if there is any solution (bug fix or workaround) 
  to
  this bug. Currently each time a IE-user logs out from my web application he
  gets this ugly 404-error page, stating The requested resource (/.) is not
  available.
 
  I use Wicket 1.4.7 and the web application is deployed as ROOT context on
  Tomcat 6.0.26.
 
  Is there no solution for this?
 
  Regards
  /Jimi
 
 
 

-- 
Martin Grotzke
http://www.javakaffee.de/blog/


signature.asc
Description: This is a digitally signed message part


SV: TinyMCE + TextArea + Jackrabbit

2010-05-04 Thread Wilhelmsen Tor Iver
 Using wicketstuff tinymce 1.4.1 attached to a TextArea, it seems I
 cannot get it to stop escaping the resulting HTML:
 
 TextAreaString textArea = new
 TextAreaString(threadSubjectTextInput, new ModelString());
 textArea.setEscapeModelStrings(false);
 TinyMCESettings settings = new TinyMCESettings();
 settings.setToolbarLocation(TinyMCESettings.Location.top);
 TinyMceBehavior behavior = new TinyMceBehavior(settings);
 textArea.add(behavior);

Forget it, it was code from a copy  paste developer, worked when I added the 
escape call to the other copy of this code... 

- Tor Iver

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



Dynamic checkbox form

2010-05-04 Thread hill180
Just need to be pointed in the Right direction.

I have a form of check boxed created by dynamic list.  What is the
best way to get the Boolean value if the checkbox was selected.

Thanks...

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



Re: Session Timeout - detect last visited page and redirect accordingly

2010-05-04 Thread Jeremy Thomerson
Yea, but if it's in the DB, then you also need a cookie for auto-login,
because if they aren't logged in, how will you tie them to the row in the
DB?  And if their session is expired, they won't be logged in.

--
Jeremy Thomerson
http://www.wickettraining.com



On Tue, May 4, 2010 at 3:01 AM, Zilvinas Vilutis cika...@gmail.com wrote:

 I've added an ajax timer so session timeout never happens on an open
 browser.

 Or you can always store your user state in the DB if you want, e.g.
 the URL visited.

 Žilvinas Vilutis

 Mobile:   (+370) 652 38353
 E-mail:   cika...@gmail.com



 On Mon, May 3, 2010 at 4:59 PM, Tony Wu e90t...@gmail.com wrote:
  I have an application where on session timeout, I want to redirect to
  different pages based on what their last visited page was. Currently my
 app
  only redirects to the same page all the time through
  getApplicationSettings().setPageExpiredErrorPage(LoginPage.class). Is
 there
  any way to capture the prior page and redirect them accordingly?
 
  Thanks,
  Tony
 

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




Re: jqery not getting called after ajax refresh

2010-05-04 Thread fachhoch

I got a new problem with this.  The browser loses focus.

Please suggest what   I can do to retain focus at selected element.  here
again my jquery 



$(document).ready(function(){
   
$(a.showHidePrograms).live('click', function(){
   var $div= 
$(this).parent().next(div); 
   
if($div.attr(class) == 'hide'){

$div.attr(class,show);
   }else{
  
$div.attr(class,hide);
   }
   
$(this).focus(); 
   });
});



I tried adding .focus()  method but did not work.

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/jqery-not-getting-called-after-ajax-refresh-tp1872270p2125879.html
Sent from the Wicket - User 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



Wicket-Spring 1.4.8 runs into exception in unit test

2010-05-04 Thread Per Newgro

Hi *,

today i updated wicket from 1.4.7 to 1.4.8. I found a hardcoded 
dependency to wicket-spring 1.4.1 in my pom.
I updated it to 1.4.8 to. Now i get in my page test the following 
exception in setup. But what does it mean? Where
can i change something to make this work. Until now i didn't found a 
starting point. Maybe someone solved this

already. - Unit test layout is related to world-known wicket-example.

org.apache.wicket.WicketRuntimeException: There is no application 
attached to current thread main

at org.apache.wicket.Application.get(Application.java:179)
at 
org.apache.wicket.injection.web.InjectorHolder.setInjector(InjectorHolder.java:88)
at 
org.apache.wicket.spring.injection.annot.test.AnnotApplicationContextMock.init(AnnotApplicationContextMock.java:61)

at my.chaman.frontend.wicket.MockContext.init(MockContext.java:11)
at 
my.chaman.frontend.wicket.ApplicationForTesting.init(ApplicationForTesting.java:11)
at 
my.chaman.frontend.wicket.pricetype.edit.pricetypetext.PriceTypeTextPageTest.setUp(PriceTypeTextPageTest.java:29)

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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)

at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)


Cheers
Per


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



Re: statefulness, and multiple tabs

2010-05-04 Thread Igor Vaynberg
dont think a conversation scope will be of much help to you. wicket
does support it via jboss' cdi implementation, but i think you are
better off stashing all the changes into some dto and applying them
when the save button is pressed.

-igor

On Mon, May 3, 2010 at 12:13 PM, Ray Weidner
ray.weidner.develo...@gmail.com wrote:
 I have a question about how to approach a certain kind of problem.  Let me
 first explain what I'm doing, and then what the problem is with that.

 For the web app I'm creating, a user can, using a web form, edit data which
 is backed by a model that fetches the persistent object being  modified.
  When the OK button is clicked, the changes are committed, and then show up
 in the database.  So far, so good.

 While editing a given record called Issue, the user may choose to edit other
 records that it references (AffectedParty, in this case).  To do this, we
 switch to the new page without performing any commit.  When the referenced
 record is updated, the user returns to the original Issue record.  So far,
 nothing has been committed.  All changes will committed when editing is
 complete for the Issue record.

 The problem occurs when users open multiple tabs to multiple Issues.  In
 this case, my persistence framework (Hibernate) is using one session for all
 updates, so a commit to one will affect all the others.  This can cause all
 kinds of complex problems when the user is editing multiple unrelated
 records at the same time.

 I would like this application to be able to support working on multiple
 records at once.  One place this can be fixed is in the persistence layer,
 by associating unrelated records with separate Sessions.  However, this can
 get complicated, fast.  Another thing that I might try is to detach the
 record from Hibernate at the end of each page being rendered, and reattach
 it at the time of update.  Right now, this seems like the most reasonable
 solution.

 Is there a standard Wicket solution for this problem?  A friend of mine who
 uses Seam suggested that I check out whether or not Wicket supports
 conversations, a concept with which I'm only partly familiar (they're like
 transactions, but can comprise multiple individual transactions...right?).
  So far, it looks to me like Wicket doesn't directly support this concept,
 and I'm not even sure how it would help me, anyway.

 Any suggestions?


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



Panel without HTML

2010-05-04 Thread Brian Mulholland
I don't have this situation right now, it's mostly curiosity, but I've
had these requirements at times in the past.  If I had a panel whose
appearance was highly dynamic, say perhaps because it was driven by
some personalization or data, can a Wicket panel add components that
don't have a corresponding tag in HTML?

So I would just have a tag for where the wicket panel renders, but the
panel might consist of an unknown combination of other controls so
that I could not have a static HTML template for it.  How might I
handle that in wicket?

Brian Mulholland

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



Re: Panel without HTML

2010-05-04 Thread Igor Vaynberg
somewhere somehow you have to provide markup. so your dynamic panel
will consist of other dynamic panels added at runtime, so your parent
panel can have this markup

wicket:panelwicket:container
wicket:id=children/wicket:container/wicket:panel

the children component being some repeater such as a RepeatingView
which will instantiate and add the dynamic selection of child panels.

-igor

On Tue, May 4, 2010 at 10:23 AM, Brian Mulholland
blmulholl...@gmail.com wrote:
 I don't have this situation right now, it's mostly curiosity, but I've
 had these requirements at times in the past.  If I had a panel whose
 appearance was highly dynamic, say perhaps because it was driven by
 some personalization or data, can a Wicket panel add components that
 don't have a corresponding tag in HTML?

 So I would just have a tag for where the wicket panel renders, but the
 panel might consist of an unknown combination of other controls so
 that I could not have a static HTML template for it.  How might I
 handle that in wicket?

 Brian Mulholland

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



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



Re: Math captcha with Wicket?

2010-05-04 Thread Thomas Götz
Thanks for your input, Igor! Looks nice, but I'd also like to have that 
as a rendered image, rather than plain text (security risk?).


   -Tom

Igor Vaynberg wrote:

off the top of my head


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



Re: jqery not getting called after ajax refresh

2010-05-04 Thread Jeremy Thomerson
if this is happening in an ajax request, you can use
AjaxRequestTarget.focusComponent(foo);

--
Jeremy Thomerson
http://www.wickettraining.com



On Tue, May 4, 2010 at 11:24 AM, fachhoch fachh...@gmail.com wrote:


 I got a new problem with this.  The browser loses focus.

 Please suggest what   I can do to retain focus at selected element.  here
 again my jquery



  $(document).ready(function(){

 $(a.showHidePrograms).live('click', function(){
var
 $div= $(this).parent().next(div);

 if($div.attr(class) == 'hide'){

  $div.attr(class,show);
   }else{

  $div.attr(class,hide);
   }

 $(this).focus();
   });
});



 I tried adding .focus()  method but did not work.

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/jqery-not-getting-called-after-ajax-refresh-tp1872270p2125879.html
 Sent from the Wicket - User 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: jqery not getting called after ajax refresh

2010-05-04 Thread fachhoch

No this is not in ajaxrequest.  It  is just jquery.
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/jqery-not-getting-called-after-ajax-refresh-tp1872270p2126099.html
Sent from the Wicket - User 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: statefulness, and multiple tabs

2010-05-04 Thread Zilvinas Vilutis
I think you may be able to separate those things into transactions
using spring annotation based transactions?

So then you can handle your transactions being created / flushed by a
method scope - so the data will be flushed to DB when the method
invokation is finished.

You can read more at:
http://static.springsource.org/spring/docs/2.0.4/reference/transaction.html


Žilvinas Vilutis

Mobile:   (+370) 652 38353
E-mail:   cika...@gmail.com



On Mon, May 3, 2010 at 12:13 PM, Ray Weidner
ray.weidner.develo...@gmail.com wrote:
 I have a question about how to approach a certain kind of problem.  Let me
 first explain what I'm doing, and then what the problem is with that.

 For the web app I'm creating, a user can, using a web form, edit data which
 is backed by a model that fetches the persistent object being  modified.
  When the OK button is clicked, the changes are committed, and then show up
 in the database.  So far, so good.

 While editing a given record called Issue, the user may choose to edit other
 records that it references (AffectedParty, in this case).  To do this, we
 switch to the new page without performing any commit.  When the referenced
 record is updated, the user returns to the original Issue record.  So far,
 nothing has been committed.  All changes will committed when editing is
 complete for the Issue record.

 The problem occurs when users open multiple tabs to multiple Issues.  In
 this case, my persistence framework (Hibernate) is using one session for all
 updates, so a commit to one will affect all the others.  This can cause all
 kinds of complex problems when the user is editing multiple unrelated
 records at the same time.

 I would like this application to be able to support working on multiple
 records at once.  One place this can be fixed is in the persistence layer,
 by associating unrelated records with separate Sessions.  However, this can
 get complicated, fast.  Another thing that I might try is to detach the
 record from Hibernate at the end of each page being rendered, and reattach
 it at the time of update.  Right now, this seems like the most reasonable
 solution.

 Is there a standard Wicket solution for this problem?  A friend of mine who
 uses Seam suggested that I check out whether or not Wicket supports
 conversations, a concept with which I'm only partly familiar (they're like
 transactions, but can comprise multiple individual transactions...right?).
  So far, it looks to me like Wicket doesn't directly support this concept,
 and I'm not even sure how it would help me, anyway.

 Any suggestions?


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



Re: Panel without HTML

2010-05-04 Thread Zilvinas Vilutis
You can do it with ListView's - you can make a list of panels and
add your own custom panel in each iteration.

Žilvinas Vilutis

Mobile:   (+370) 652 38353
E-mail:   cika...@gmail.com



On Tue, May 4, 2010 at 10:36 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 somewhere somehow you have to provide markup. so your dynamic panel
 will consist of other dynamic panels added at runtime, so your parent
 panel can have this markup

 wicket:panelwicket:container
 wicket:id=children/wicket:container/wicket:panel

 the children component being some repeater such as a RepeatingView
 which will instantiate and add the dynamic selection of child panels.

 -igor

 On Tue, May 4, 2010 at 10:23 AM, Brian Mulholland
 blmulholl...@gmail.com wrote:
 I don't have this situation right now, it's mostly curiosity, but I've
 had these requirements at times in the past.  If I had a panel whose
 appearance was highly dynamic, say perhaps because it was driven by
 some personalization or data, can a Wicket panel add components that
 don't have a corresponding tag in HTML?

 So I would just have a tag for where the wicket panel renders, but the
 panel might consist of an unknown combination of other controls so
 that I could not have a static HTML template for it.  How might I
 handle that in wicket?

 Brian Mulholland

 -
 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



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



Re: jqery not getting called after ajax refresh

2010-05-04 Thread robert.mcguinness

print out some unique attribute of the element that last regains focus to
console.debug, maybe http://api.jquery.com/focusin/ will help.  

- roberto
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/jqery-not-getting-called-after-ajax-refresh-tp1872270p2126168.html
Sent from the Wicket - User 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: Panel without HTML

2010-05-04 Thread Martin Makundi
Hi!

Also here is a way:

http://webcache.googleusercontent.com/search?q=cache:D3a_O4kK4t0J:www.wickettraining.com/ws-sites/minis-parent/minis/xref/org/wicketstuff/minis/apanel/APanel.html+%22apanel%22+wicketcd=1hl=fict=clnkgl=ficlient=firefox-a

2010/5/4 Zilvinas Vilutis cika...@gmail.com:
 You can do it with ListView's - you can make a list of panels and
 add your own custom panel in each iteration.

 Žilvinas Vilutis

 Mobile:   (+370) 652 38353
 E-mail:   cika...@gmail.com



 On Tue, May 4, 2010 at 10:36 AM, Igor Vaynberg igor.vaynb...@gmail.com 
 wrote:
 somewhere somehow you have to provide markup. so your dynamic panel
 will consist of other dynamic panels added at runtime, so your parent
 panel can have this markup

 wicket:panelwicket:container
 wicket:id=children/wicket:container/wicket:panel

 the children component being some repeater such as a RepeatingView
 which will instantiate and add the dynamic selection of child panels.

 -igor

 On Tue, May 4, 2010 at 10:23 AM, Brian Mulholland
 blmulholl...@gmail.com wrote:
 I don't have this situation right now, it's mostly curiosity, but I've
 had these requirements at times in the past.  If I had a panel whose
 appearance was highly dynamic, say perhaps because it was driven by
 some personalization or data, can a Wicket panel add components that
 don't have a corresponding tag in HTML?

 So I would just have a tag for where the wicket panel renders, but the
 panel might consist of an unknown combination of other controls so
 that I could not have a static HTML template for it.  How might I
 handle that in wicket?

 Brian Mulholland

 -
 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



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



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



Re: Panel without HTML

2010-05-04 Thread James Carman
Wicketopia does some of this kind of stuff, but it's based on
class/property metadata.  Basically, it auto-creates forms for you on
the fly based on annotations you put on the field values.

You *could* also use Velocity to dynamically generate your markup at
runtime, also.  That's an interesting approach that I thought about
trying but never really got around to it.  It should work, though.

On Tue, May 4, 2010 at 1:23 PM, Brian Mulholland blmulholl...@gmail.com wrote:
 I don't have this situation right now, it's mostly curiosity, but I've
 had these requirements at times in the past.  If I had a panel whose
 appearance was highly dynamic, say perhaps because it was driven by
 some personalization or data, can a Wicket panel add components that
 don't have a corresponding tag in HTML?

 So I would just have a tag for where the wicket panel renders, but the
 panel might consist of an unknown combination of other controls so
 that I could not have a static HTML template for it.  How might I
 handle that in wicket?

 Brian Mulholland

 -
 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



DateTextField and DatePicker returning wrong date

2010-05-04 Thread taygolf

Hey guys,

I guess I am confused on how DateTextField and DatePicker work

Here is my code

DateTextField dateTextField = new DateTextField(textField, new
PropertyModelDate(this, value), new PatternDateConverter(MM/dd/,
false));
DatePicker dp = new DatePicker(){
public boolean enableMonthYearSelection(){
return true;
}
};
dateTextField.add(dp);

What is happening is that value is being set to server time and the actual
date that I have selected is being displayed on the screen. So if I select
05/20/2010 that is what shows up in the dateTextField on the screen but the
actual value that is going to the server is 05/19/2010 because the server is
GMT and I am Central.

I thought by setting the timezone difference to false I would get the actual
date selected which is what I want but that does not seem to be the case. I
get the same value on the screen and in the server no matter if the value is
set to true or false.

Am I doing something wrong or is this a bug?

I am using wicket 1.4.8

Thanks

T
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DateTextField-and-DatePicker-returning-wrong-date-tp2126267p2126267.html
Sent from the Wicket - User 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



SEVERE:Pagemap null is still locked by: Thread

2010-05-04 Thread Ayodeji Aladejebi
SEVERE: org.apache.wicket.WicketRuntimeException: After 1 minute the Pagemap
null is still locked by: Thread[http-8084-7,5,main], giving up trying to get
the page for path: 2
Begin of stack trace of Thread[http-8084-7,5,main]
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)

 org.apache.tomcat.util.net.AprEndpoint$Worker.await(AprEndpoint.java:1511)

 org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1536)
java.lang.Thread.run(Thread.java:619)
End of stack trace of Thread[http-8084-7,5,main]
org.apache.wicket.protocol.http.request.InvalidUrlException:
org.apache.wicket.WicketRuntimeException: After 1 minute the Pagemap null is
still locked by: Thread[http-8084-7,5,main], giving up trying to get the
page for path: 2
Begin of stack trace of Thread[http-8084-7,5,main]
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:485)

 org.apache.tomcat.util.net.AprEndpoint$Worker.await(AprEndpoint.java:1511)

 org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1536)
java.lang.Thread.run(Thread.java:619)
End of stack trace of Thread[http-8084-7,5,main]

-- Any tips

I


Re: SEVERE:Pagemap null is still locked by: Thread

2010-05-04 Thread Igor Vaynberg
dont execute code that takes 1+ minutes to finish inside a web thread

-igor

On Tue, May 4, 2010 at 2:40 PM, Ayodeji Aladejebi aladej...@gmail.com wrote:
 SEVERE: org.apache.wicket.WicketRuntimeException: After 1 minute the Pagemap
 null is still locked by: Thread[http-8084-7,5,main], giving up trying to get
 the page for path: 2
        Begin of stack trace of Thread[http-8084-7,5,main]
        java.lang.Object.wait(Native Method)
        java.lang.Object.wait(Object.java:485)

  org.apache.tomcat.util.net.AprEndpoint$Worker.await(AprEndpoint.java:1511)

  org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1536)
        java.lang.Thread.run(Thread.java:619)
        End of stack trace of Thread[http-8084-7,5,main]
 org.apache.wicket.protocol.http.request.InvalidUrlException:
 org.apache.wicket.WicketRuntimeException: After 1 minute the Pagemap null is
 still locked by: Thread[http-8084-7,5,main], giving up trying to get the
 page for path: 2
        Begin of stack trace of Thread[http-8084-7,5,main]
        java.lang.Object.wait(Native Method)
        java.lang.Object.wait(Object.java:485)

  org.apache.tomcat.util.net.AprEndpoint$Worker.await(AprEndpoint.java:1511)

  org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1536)
        java.lang.Thread.run(Thread.java:619)
        End of stack trace of Thread[http-8084-7,5,main]

 -- Any tips

 I


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



Re: SEVERE:Pagemap null is still locked by: Thread

2010-05-04 Thread Ayodeji Aladejebi
or more like a thread must not block for that long?

On Tue, May 4, 2010 at 11:01 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 dont execute code that takes 1+ minutes to finish inside a web thread

 -igor

 On Tue, May 4, 2010 at 2:40 PM, Ayodeji Aladejebi aladej...@gmail.com
 wrote:
  SEVERE: org.apache.wicket.WicketRuntimeException: After 1 minute the
 Pagemap
  null is still locked by: Thread[http-8084-7,5,main], giving up trying to
 get
  the page for path: 2
 Begin of stack trace of Thread[http-8084-7,5,main]
 java.lang.Object.wait(Native Method)
 java.lang.Object.wait(Object.java:485)
 
 
  org.apache.tomcat.util.net.AprEndpoint$Worker.await(AprEndpoint.java:1511)
 
   org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1536)
 java.lang.Thread.run(Thread.java:619)
 End of stack trace of Thread[http-8084-7,5,main]
  org.apache.wicket.protocol.http.request.InvalidUrlException:
  org.apache.wicket.WicketRuntimeException: After 1 minute the Pagemap null
 is
  still locked by: Thread[http-8084-7,5,main], giving up trying to get the
  page for path: 2
 Begin of stack trace of Thread[http-8084-7,5,main]
 java.lang.Object.wait(Native Method)
 java.lang.Object.wait(Object.java:485)
 
 
  org.apache.tomcat.util.net.AprEndpoint$Worker.await(AprEndpoint.java:1511)
 
   org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1536)
 java.lang.Thread.run(Thread.java:619)
 End of stack trace of Thread[http-8084-7,5,main]
 
  -- Any tips
 
  I
 

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




--


change or replace css file on page reload

2010-05-04 Thread Joe Fawzy
Hi all
i was wondering how could i change a css file on every page reload
i thought of using header contribution in onBeforeRender() ,  but it seams
to add the new the new css file
what i need is to replace a certain css on every render of a certain page

actually i can dynamically generate the css file using velocity or
freemarker ,but the question is how to replace the old css with the new one

thanks
Joe


Re: change or replace css file on page reload

2010-05-04 Thread Igor Vaynberg
see IHeaderContributor

-igor

On Tue, May 4, 2010 at 4:50 PM, Joe Fawzy joewic...@gmail.com wrote:
 Hi all
 i was wondering how could i change a css file on every page reload
 i thought of using header contribution in onBeforeRender() ,  but it seams
 to add the new the new css file
 what i need is to replace a certain css on every render of a certain page

 actually i can dynamically generate the css file using velocity or
 freemarker ,but the question is how to replace the old css with the new one

 thanks
 Joe


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



Re: Wicket-Spring 1.4.8 runs into exception in unit test

2010-05-04 Thread Jeremy Thomerson
Is your unit test setting up the application before it starts (i.e. in the
setUp method if you're using junit?).  If you can't figure it out, create a
quickstart that demonstrates it, and attach that to a JIRA.

--
Jeremy Thomerson
http://www.wickettraining.com



On Tue, May 4, 2010 at 11:42 AM, Per Newgro per.new...@gmx.ch wrote:

 Hi *,

 today i updated wicket from 1.4.7 to 1.4.8. I found a hardcoded dependency
 to wicket-spring 1.4.1 in my pom.
 I updated it to 1.4.8 to. Now i get in my page test the following exception
 in setup. But what does it mean? Where
 can i change something to make this work. Until now i didn't found a
 starting point. Maybe someone solved this
 already. - Unit test layout is related to world-known wicket-example.

 org.apache.wicket.WicketRuntimeException: There is no application attached
 to current thread main
at org.apache.wicket.Application.get(Application.java:179)
at
 org.apache.wicket.injection.web.InjectorHolder.setInjector(InjectorHolder.java:88)
at
 org.apache.wicket.spring.injection.annot.test.AnnotApplicationContextMock.init(AnnotApplicationContextMock.java:61)
at my.chaman.frontend.wicket.MockContext.init(MockContext.java:11)
at
 my.chaman.frontend.wicket.ApplicationForTesting.init(ApplicationForTesting.java:11)
at
 my.chaman.frontend.wicket.pricetype.edit.pricetypetext.PriceTypeTextPageTest.setUp(PriceTypeTextPageTest.java:29)
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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at
 org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at
 org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at
 org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at
 org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
at
 org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at
 org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
at
 org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

 Cheers
 Per


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




Re: SEVERE:Pagemap null is still locked by: Thread

2010-05-04 Thread Jeremy Thomerson
What do you mean?  The page map is locked because another request is still
running.  If you have anything that takes a noticeable amount of time
(several seconds or more) to process, put it in a separate thread and
redirect to a waiting page.

--
Jeremy Thomerson
http://www.wickettraining.com



On Tue, May 4, 2010 at 5:27 PM, Ayodeji Aladejebi aladej...@gmail.comwrote:

 or more like a thread must not block for that long?

 On Tue, May 4, 2010 at 11:01 PM, Igor Vaynberg igor.vaynb...@gmail.com
 wrote:

  dont execute code that takes 1+ minutes to finish inside a web thread
 
  -igor
 
  On Tue, May 4, 2010 at 2:40 PM, Ayodeji Aladejebi aladej...@gmail.com
  wrote:
   SEVERE: org.apache.wicket.WicketRuntimeException: After 1 minute the
  Pagemap
   null is still locked by: Thread[http-8084-7,5,main], giving up trying
 to
  get
   the page for path: 2
  Begin of stack trace of Thread[http-8084-7,5,main]
  java.lang.Object.wait(Native Method)
  java.lang.Object.wait(Object.java:485)
  
  
 
  org.apache.tomcat.util.net.AprEndpoint$Worker.await(AprEndpoint.java:1511)
  
  
  org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1536)
  java.lang.Thread.run(Thread.java:619)
  End of stack trace of Thread[http-8084-7,5,main]
   org.apache.wicket.protocol.http.request.InvalidUrlException:
   org.apache.wicket.WicketRuntimeException: After 1 minute the Pagemap
 null
  is
   still locked by: Thread[http-8084-7,5,main], giving up trying to get
 the
   page for path: 2
  Begin of stack trace of Thread[http-8084-7,5,main]
  java.lang.Object.wait(Native Method)
  java.lang.Object.wait(Object.java:485)
  
  
 
  org.apache.tomcat.util.net.AprEndpoint$Worker.await(AprEndpoint.java:1511)
  
  
  org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1536)
  java.lang.Thread.run(Thread.java:619)
  End of stack trace of Thread[http-8084-7,5,main]
  
   -- Any tips
  
   I
  
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 


 --



Re: Wicket-Spring 1.4.8 runs into exception in unit test

2010-05-04 Thread Ben Tilford
Did you upgrade to spring 3?

I ran into an issue with the testng spring test not creating the application
context before  wicket tester tried to use it (iirc @BeforeTest executed
before the super classes @BeforeClass)  Ended up switching anything
annotated with @BeforeTest to @BeforeMethod.

I assume junit has similar annotations.

On Tue, May 4, 2010 at 11:15 PM, Jeremy Thomerson jer...@wickettraining.com
 wrote:

 Is your unit test setting up the application before it starts (i.e. in the
 setUp method if you're using junit?).  If you can't figure it out, create a
 quickstart that demonstrates it, and attach that to a JIRA.

 --
 Jeremy Thomerson
 http://www.wickettraining.com



 On Tue, May 4, 2010 at 11:42 AM, Per Newgro per.new...@gmx.ch wrote:

  Hi *,
 
  today i updated wicket from 1.4.7 to 1.4.8. I found a hardcoded
 dependency
  to wicket-spring 1.4.1 in my pom.
  I updated it to 1.4.8 to. Now i get in my page test the following
 exception
  in setup. But what does it mean? Where
  can i change something to make this work. Until now i didn't found a
  starting point. Maybe someone solved this
  already. - Unit test layout is related to world-known wicket-example.
 
  org.apache.wicket.WicketRuntimeException: There is no application
 attached
  to current thread main
 at org.apache.wicket.Application.get(Application.java:179)
 at
 
 org.apache.wicket.injection.web.InjectorHolder.setInjector(InjectorHolder.java:88)
 at
 
 org.apache.wicket.spring.injection.annot.test.AnnotApplicationContextMock.init(AnnotApplicationContextMock.java:61)
 at my.chaman.frontend.wicket.MockContext.init(MockContext.java:11)
 at
 
 my.chaman.frontend.wicket.ApplicationForTesting.init(ApplicationForTesting.java:11)
 at
 
 my.chaman.frontend.wicket.pricetype.edit.pricetypetext.PriceTypeTextPageTest.setUp(PriceTypeTextPageTest.java:29)
 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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
 at
 
 org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
 at
 
 org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
 at
 
 org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
 at
 
 org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
 at
 
 org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
 at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
 at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
 at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
 at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
 at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
 at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
 at
 
 org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
 at
 
 org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
 at
 
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
 at
 
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
 at
 
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
 at
 
 org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
 
  Cheers
  Per
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 



TabbelPanel doesnt work in appengine

2010-05-04 Thread Murat Yücel
Hi All

I am making a small application which is running at appengine. The
code was running fine until i desided to use TabbedPanel.
I have searched on google and it seems like other people have the same
issue. People has reported issues at google appengine,
but cant this not be solved in wicket scope?

Or does anyone have a workaround to this issue? Or should i just not
use TabbedPanel :)...

I can send the whole stacktrace but this is a part of it:
Caused by: java.security.AccessControlException: access denied
(java.io.SerializablePermission enableSubstitution)
at 
java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
at 
java.security.AccessController.checkPermission(AccessController.java:546)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at 
com.google.appengine.tools.development.DevAppServerFactory$CustomSecurityManager.checkPermission(DevAppServerFactory.java:166)
at 
java.io.ObjectOutputStream.enableReplaceObject(ObjectOutputStream.java:592)
at 
org.apache.wicket.util.lang.Objects$ReplaceObjectOutputStream.init(Objects.java:183)

/Murat

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