Re: Can't open modal popups in ie8 or under

2011-12-30 Thread northar
Yes, tested with 1.5-snapshot now (not extensively), and it seems to work. My
project manager will be glad 


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Can-t-open-modal-popups-in-ie8-or-under-tp4241461p4245134.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



WicketMessage: Method onFormSubmitted of interface org.apache.wicket.markup.html.form.IFormSubmitListener targeted at [ [Component id = form]] on component [ [Component id = form]] threw an exception

2011-12-30 Thread Rahman USTA
Hi, i wanna add an item to DropDownChoice's List after form submitted. i
used for example,



private ListString *cities*=Arrays.asList(İstanbul,Ankara,Kayseri);

   final DropDownChoiceString cityList=new
DropDownChoiceString(sehirListesi, Model.of(İstanbul),
new PropertyModelList? extends String(this,cities));

then

Form form=new Form(form){
@Override
public void onSubmit() {

*cities*.add(İzmir);
info(Form başarıyla gönderildi);

}
};

but, i get this exceptions.


Unexpected RuntimeException

Last cause: null
WicketMessage: Method onFormSubmitted of interface
org.apache.wicket.markup.html.form.IFormSubmitListener targeted at [
[Component id = form]] on component [ [Component id = form]] threw an
exception

 Stacktrace

Root cause:

java.lang.UnsupportedOperationException
 at java.util.AbstractList.add(AbstractList.java:131)
 at java.util.AbstractList.add(AbstractList.java:91)
 at com.usta.HomePage$1.onSubmit(HomePage.java:74)
 at org.apache.wicket.markup.html.form.Form$10.component(Form.java:1189)
 at org.apache.wicket.markup.html.form.Form$10.component(Form.java:1184)
 at 
org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:273)
 at org.apache.wicket.util.visit.Visits.visitPostOrder(Visits.java:244)
 at org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1182)
 at org.apache.wicket.markup.html.form.Form.process(Form.java:838)
 at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:762)
 at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:692)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at 
org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:260)
 at 
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:216)
 at 
org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:248)
 at 
org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:234)
 at 
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:750)
 at 
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
 at 
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:252)
 at 
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:209)
 at 
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280)
 at 
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
 at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)
 at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1326)
 at 
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:479)
 at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
 at 
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:520)
 at 
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
 at 
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:940)
 at 
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:409)
 at 
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)
 at 
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:874)
 at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
 at 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
 at org.eclipse.jetty.server.Server.handle(Server.java:349)
 at 
org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:441)
 at 
org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:921)
 at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:784)
 at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:223)
 at 
org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:50)
 at 
org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:245)
 at 
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)
 at 
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)
 at java.lang.Thread.run(Thread.java:662)

Complete stack:

org.apache.wicket.WicketRuntimeException: Method onFormSubmitted of
interface org.apache.wicket.markup.html.form.IFormSubmitListener
targeted at [ [Component id = form]] on component [ [Component id =
form]] threw an exception
 at 
org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:270)
 

Re: unit testing cookies after redirect

2011-12-30 Thread kamiseq
hej,
SO it seems that errors I got was because of my bad testing.

I created simple test in new project and it now works.

 the only problem is that
1. wicket tester process request twice after startPage - the first
time the page is rendered and cookies are saved into AddCookieAction.
then request is processed second time and this time all actions are
invoked and cookie is finally added to second response. Is this
because wicket is always redirecting browser with render request??
2. after request is fully processed the original request and response
are saved as lastRequest and lastResonse (llok at
recordRequestResponse in WicketBaseTester). cookies are in
tester.getLastResponse().getCookies()
3. the thing which is not intuitive is the fact that after one request
is fully processed the new request (and response) is created but
cookies from last response are not rewritten to it. cookies will be
added when new request will be processed by tester on next startPage.

I think that's it, hope I got this right this time ;] and it may help someone

pozdrawiam
Paweł Kamiński

kami...@gmail.com
pkaminski@gmail.com
__

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



Re: WicketMessage: Method onFormSubmitted of interface org.apache.wicket.markup.html.form.IFormSubmitListener targeted at [ [Component id = form]] on component [ [Component id = form]] threw an except

2011-12-30 Thread Chantal Ackermann


On Fri, 2011-12-30 at 12:46 +0100, Rahman USTA wrote:
 Hi, i wanna add an item to DropDownChoice's List after form submitted. i
 used for example,
 
 
 
 private ListString *cities*=Arrays.asList(İstanbul,Ankara,Kayseri);

The Exception is thrown because Arrays.asList returns a List
implementation that does not offer an add() implementation. (This is
allowed by the List API.) (This is not a Wicket issue.)

Change the above line to:

pivate ListString cities = new ArrayListString();
java.util.Collections.addAll(cities, İstanbul,Ankara,Kayseri);

Cheers,
Chantal


 
final DropDownChoiceString cityList=new
 DropDownChoiceString(sehirListesi, Model.of(İstanbul),
 new PropertyModelList? extends String(this,cities));
 
 then
 
 Form form=new Form(form){
 @Override
 public void onSubmit() {
 
 *cities*.add(İzmir);
 info(Form başarıyla gönderildi);
 
 }
 };
 
 but, i get this exceptions.
 
 
 Unexpected RuntimeException
 
 Last cause: null
 WicketMessage: Method onFormSubmitted of interface
 org.apache.wicket.markup.html.form.IFormSubmitListener targeted at [
 [Component id = form]] on component [ [Component id = form]] threw an
 exception
 
  Stacktrace
 
 Root cause:
 
 java.lang.UnsupportedOperationException
  at java.util.AbstractList.add(AbstractList.java:131)
  at java.util.AbstractList.add(AbstractList.java:91)
  at com.usta.HomePage$1.onSubmit(HomePage.java:74)
  at org.apache.wicket.markup.html.form.Form$10.component(Form.java:1189)
  at org.apache.wicket.markup.html.form.Form$10.component(Form.java:1184)
  at 
 org.apache.wicket.util.visit.Visits.visitPostOrderHelper(Visits.java:273)
  at org.apache.wicket.util.visit.Visits.visitPostOrder(Visits.java:244)
  at org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1182)
  at org.apache.wicket.markup.html.form.Form.process(Form.java:838)
  at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:762)
  at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:692)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at 
 org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:260)
  at 
 org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:216)
  at 
 org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:248)
  at 
 org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:234)
  at 
 org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:750)
  at 
 org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
  at 
 org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:252)
  at 
 org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:209)
  at 
 org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280)
  at 
 org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
  at 
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)
  at 
 org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1326)
  at 
 org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:479)
  at 
 org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
  at 
 org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:520)
  at 
 org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
  at 
 org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:940)
  at 
 org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:409)
  at 
 org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)
  at 
 org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:874)
  at 
 org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
  at 
 org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
  at org.eclipse.jetty.server.Server.handle(Server.java:349)
  at 
 org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:441)
  at 
 org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:921)
  at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:784)
  at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:223)
  at 
 org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:50)
  at 
 org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:245)
  at 
 

Re: unit testing cookies after redirect

2011-12-30 Thread Martin Grigorov
On Fri, Dec 30, 2011 at 2:02 PM, kamiseq kami...@gmail.com wrote:
 hej,
 SO it seems that errors I got was because of my bad testing.

 I created simple test in new project and it now works.

  the only problem is that
 1. wicket tester process request twice after startPage - the first
 time the page is rendered and cookies are saved into AddCookieAction.
 then request is processed second time and this time all actions are
 invoked and cookie is finally added to second response. Is this
 because wicket is always redirecting browser with render request??
 2. after request is fully processed the original request and response
 are saved as lastRequest and lastResonse (llok at
 recordRequestResponse in WicketBaseTester). cookies are in
 tester.getLastResponse().getCookies()
 3. the thing which is not intuitive is the fact that after one request
 is fully processed the new request (and response) is created but
 cookies from last response are not rewritten to it. cookies will be
 added when new request will be processed by tester on next startPage.

this is fixed in 1.5-snapshot


 I think that's it, hope I got this right this time ;] and it may help someone

 pozdrawiam
 Paweł Kamiński

 kami...@gmail.com
 pkaminski@gmail.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: my book updated for Wicket 1.5.x

2011-12-30 Thread Martin Grigorov
Thanks Kent!

On Thu, Dec 29, 2011 at 12:40 PM, Kent Tong k...@cpttm.org.mo wrote:
 Hi,

 I've updated my book for Wicket 1.5.x. You may check it out or download the
 first two chapters at http://agileskills2.org/EWDW

 Thanks!


 -
 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: Hide page version query parameters

2011-12-30 Thread martin.dilger
hi,
you could try to change your render strategy to redirect to render, that
would dismiss the page
parameters version.

regards

martin dilger

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Hide-page-version-query-parameters-tp4163099p4246959.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: Hide page version query parameters

2011-12-30 Thread Martin Grigorov
On Fri, Dec 30, 2011 at 11:43 PM, martin.dilger
martin.dil...@googlemail.com wrote:
 hi,
 you could try to change your render strategy to redirect to render, that
 would dismiss the page
 parameters version.

This is not correct.
The page id is encoded in the url only for stateful pages. Make your
page stateless and it wont be there.


 regards

 martin dilger

 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Hide-page-version-query-parameters-tp4163099p4246959.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