[wicket 1.5rc2] How to enable RequestLogger?
Enabling with getRequestLoggerSettings().setRequestLoggerEnabled(true) doesnt show any requests. Seems that the Application.logEventTarget and Application.logResponseTarget are never invoked at all from the wicket-core, nevertheless the get overridden in WebApplication??? Any hints? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
[wicket 1.5] problems with frontend-proxy (apache)
Hi experts, i' migrating to 1.5 version and have problems with my working (1.4) apache-configuration. ProxyPass / http://a.b.c.d:11003/xxx/ ProxyPassReverse / http://a.b.c.d:11003/xxx/ ProxyPassReverseCookiePath /xxx/ / On my page i have a AbstractAjaxTimerBehavior. The first access to the page works and the page is shown. But if the AbstractAjaxTimerBehavior respons comes back, it contains a redirect to my internal tomcat url. http://a.b.c.d:11003/xxx/wicket/bookmarkable/org.apache.wicket.markup.html.pages.PageExpiredErrorPage Any ideas? Regards Jens - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
[Exception] Cannot create a session after the response has been committed
Hi experts, This kind of exception is logged a few times a day... What does it mean? Thanks Jens Zastrow 2010-07-03 17:52:57,858 org.apache.wicket.RequestCycle there was an error in the RequestLogger ending. java.lang.IllegalStateException: Cannot create a session after the response has been committed at org.apache.catalina.connector.Request.doGetSession(Request.java:2313) at org.apache.catalina.connector.Request.getSession(Request.java:2074) at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833) at org.apache.wicket.protocol.http.AbstractHttpSessionStore.getSessionId(AbstractHttpSessionStore.java:188) at org.apache.wicket.Session.bind(Session.java:420) at de.mj.ui.AbstractWicketApplication.initSession(AbstractWicketApplication.java:134) at com.fussball4all.ui.Application.initSession(Application.java:1216) at de.mj.ui.AbstractWicketApplication.newSession(AbstractWicketApplication.java:118) at org.apache.wicket.Session.findOrCreate(Session.java:230) at org.apache.wicket.Session.findOrCreate(Session.java:213) at org.apache.wicket.Session.get(Session.java:252) at org.apache.wicket.protocol.http.RequestLogger.requestTime(RequestLogger.java:216) at org.apache.wicket.RequestCycle.detach(RequestCycle.java:1163) at de.mj.ui.UserAwareWebRequestCycle.detach(UserAwareWebRequestCycle.java:55) at com.fussball4all.ui.F4AllWebRequestCycle.detach(F4AllWebRequestCycle.java:45) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1454) 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) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: NEW wicket-powered football portal lauched... http://football4all.net
it's also still a beta-version ! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: NEW wicket-powered football portal lauched... http://football4all.net
sorry the URL is http://football4all.net Am 16.06.2010 00:56, schrieb Jens Zastrow: :-) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- dipl. inform jens zastrow phone | +49.152.04840108 mail | m...@jens-zastrow.de web | http://jens-zastrow.de xing | http://www.xing.com/profile/Jens_Zastrow - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
NEW wicket-powered football portal lauched... http://football4all.net
:-) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RequestLogger 'Detach'-problem with recordSessionSize
Hi wicket-experts, Using the default RequestLogger which calculates the session-size by serializing the page-objects leads to problems since the models are not detached while doing this step. The source-code of the RequestCycle shows that the Session/Page gets detached AFTER the requestcycle-code, thus the Serialize-step tries to store a lot of non-detached models which doest work in my case. Is this by Design? Thank Jens [RequestCycle.java] // if we have a request logger, update that now try { IRequestLogger requestLogger = getApplication().getRequestLogger(); if (requestLogger != null) { requestLogger.requestTime((System.currentTimeMillis() - startTime)); } } catch (RuntimeException re) { log.error("there was an error in the RequestLogger ending.", re); } // let the session cleanup after a request, flushing changes etc. if (sessionExists()) { try { getSession().requestDetached(); } catch (RuntimeException re) { log.error("there was an error detaching the request from the session " + session + ".", re); } } -- dipl. inform jens zastrow phone | +49.152.04840108 mail | m...@jens-zastrow.de web | http://jens-zastrow.de xing | http://www.xing.com/profile/Jens_Zastrow - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AutoCompleteTextField uses wrong encoding?
For Wicket, try setting this *: getRequestCycleSettings().setResponseRequestEncoding("UTF-8"); getMarkupSettings().setDefaultMarkupEncoding("UTF-8"); in your Application#init If you don't set the default markup encoding explicitly, the default for it is the 'os provided encoding' (see: IMarkupSettings#getDefaultMarkupEncoding) If Tomcat, add URIEncoding="UTF-8" to your connector. Am 10.05.2010 15:49, schrieb Eike Kettner: Hi Matt some long time ago I had a similiar problem with AjaxEditableLabel. I used tomcat and there you need to configure the connector using "useBodyEncodingForURI=true" to make tomcat use utf8 for encoding ajax requests. eike On 10.05.2010 15:27, Matthias Keller wrote: Hi I'm using an autocompletefield and it works fine so far. Except that when entering special characters, they don't get encoded correctly. The query String is correct and sends the special character in encoded UTF-8: GET http://localhost:9080/.../...&q=%C3%B6&random=... %C3%B6 is UTF8 for "ö" But in: org.apache.wicket.extensions.ajax.markup.html.autocomplete.AbstractAutoCompleteBehavior.respond(AjaxRequestTarget) The following line final String val = requestCycle.getRequest().getParameter("q"); returns an incorrect string: "ö" which would be the %C3%B6 in ISO-8859-1 (which happens to be my platform encoding)... Thus the input parameter to my getChoices() call contains strange characters in this case... It appears that the request isn't read out as UTF-8 somehow.. Since I don't know the AJAX internals, it's hard to find the culprit for me I'm using Wicket 1.4.8 Matt -- dipl. inform jens zastrow phone | +49.152.04840108 mail | m...@jens-zastrow.de web | http://jens-zastrow.de xing | http://www.xing.com/profile/Jens_Zastrow - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AjaxEditableLabel unicode issue
Hi, We switched from a http to a ajp based tomcat-connector and didnt configured the URIEncoding="UTF-8" properly. Thanks a lot, everything is working now. Am 11.05.2010 13:34, schrieb Steve Swinsburg: Hi, Is this after the value has been submitted and perhaps stored in a database, then retrieved and displayed again? If so, is your database setup as UTF-8? Also, if using Tomcat, is the connector setup as UTF-8 also? For Wicket, try setting this *: getRequestCycleSettings().setResponseRequestEncoding("UTF-8"); getMarkupSettings().setDefaultMarkupEncoding("UTF-8"); in your Application#init If you don't set the default markup encoding explicitly, the default for it is the 'os provided encoding' (see: IMarkupSettings#getDefaultMarkupEncoding) If Tomcat, add URIEncoding="UTF-8" to your connector. See if that helps. cheers, Steve * came up on list back in early 2009. On 11/05/2010, at 9:16 PM, Jens Zastrow wrote: Hi, I cannot enter/save unicode chars with a AjaxEditableLabel (e.g. german/arabic). Enter: 'ü' Value: 'ü' All unicode-chars seems to be converted to utf-8 since the single char ü is converter to double-bytes? Thanks Jens - 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 -- dipl. inform jens zastrow phone | +49.152.04840108 mail | m...@jens-zastrow.de web | http://jens-zastrow.de xing | http://www.xing.com/profile/Jens_Zastrow - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AjaxEditableLabel unicode issue
Hi, I cannot enter/save unicode chars with a AjaxEditableLabel (e.g. german/arabic). Enter: 'ü' Value: 'ü' All unicode-chars seems to be converted to utf-8 since the single char ü is converter to double-bytes? Thanks Jens - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
[wiQuery] Custom Link to wiQuery Page doest not initialize target page
Hi experts, The following code (Link-example-code) breaks all of my wiQuery-enabled Pages. add(new Link("link", listItem.getModel()) { public void onClick() { setResponsePage(new MyPage()); } } The specified MyPage() ist entered, but without initializing the "wiQuery-Subsystem". Only after page 'reload' with browser-button everything (js etc.) is loaded and initialized. This only happens with Links, not with BookmarkablePagelinks. I'm using wicket 1.4.8 und wiquery 1.0.1. Anybody facing the same problem? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Initial page - state question
Hi Igor, The same happens now if i use Bookmarkable PageLinks (maybe i miss-configured something) Example: http://localhost:8080/user/id/4711 Is it always nessesary to make the redirect or only at the first page-access? Thanks Jens Am 30.12.2009 17:48, schrieb Igor Vaynberg: while not being an "official" solution it works. -igor On Wed, Dec 30, 2009 at 8:09 AM, Jens Zastrow wrote: Hi wicket-experts, If i access my wicket page by an url containing the wicket-page version-informations all ajax-modificatins (tree-selections, form-input) are still available after pressing the 'reload' button. Example: http://localhost:8080/?wicket:interface=:2 Unfortunly this does hold for the first-page of my app, which is invoked by a plain url http://localhost:8080/ - without any page-version information. The 'reload' button now has the effect that all the ajax-modifications are gone. I know why that happens and that the behavior is correct. But is there a way the solve this in a "wicket-way"? My current workaround is a redirect which - i guess - is not the "official" solution to this? Thanks Jens - 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 -- dipl. inform jens zastrow phone | +49.152.04840108 mail | m...@jens-zastrow.de web | http://jens-zastrow.de xing | http://www.xing.com/profile/Jens_Zastrow - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Initial page - state question
Hi wicket-experts, If i access my wicket page by an url containing the wicket-page version-informations all ajax-modificatins (tree-selections, form-input) are still available after pressing the 'reload' button. Example: http://localhost:8080/?wicket:interface=:2 Unfortunly this does hold for the first-page of my app, which is invoked by a plain url http://localhost:8080/ - without any page-version information. The 'reload' button now has the effect that all the ajax-modifications are gone. I know why that happens and that the behavior is correct. But is there a way the solve this in a "wicket-way"? My current workaround is a redirect which - i guess - is not the "official" solution to this? Thanks Jens - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Page inheritance problem
The "SuperDiv" component is just a WebMarkupContainer I just tried to find the getTransparentResolver() method, but without success... Igor Vaynberg schrieb: -- dipl. inform jens zastrow phone | +49.152.04840108 mail | m...@jens-zastrow.de web | http://jens-zastrow.de xing | http://www.xing.com/profile/Jens_Zastrow - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Page inheritance problem
Hmmm... this effectivly not uses the thing for the "inner"-subclass-components. If i do so, from the Java-side its really bad to invoke "subclass-methods from super-contructors". Can the invocation of the getThatPanelIWantAlwaysButAtCertainLocation() method be deferred somehow?? Regards Jens Jens, Your super class could declare an abstract protected void getThatPanelIWantSometimes() method that the children can then implement to return whatever they like and then the ball's back in the parent's court. Regards - Cemal jWeekend OO & Java Technologies, Wicket Training and Development http://jWeekend.com jWeekend schrieb: -- dipl. inform jens zastrow phone | +49.152.04840108 mail | m...@jens-zastrow.de web | http://jens-zastrow.de xing | http://www.xing.com/profile/Jens_Zastrow - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Page inheritance problem
Hi experts, I have a Page class with serves as base html-template for the derived pages. (e.g. http://www.javalobby.org/java/forums/t69357.html) For some special needs, subclass-markup should be placed in some element managed by wicket and not at the root. base.html My workaround currently is, that the Base-class provides a getSuperDiv() method, wich must be used from the subpages to add their content to. SubPage(String) { super(...); // NOW, wrong: add( new Label("hello","Hello")); // CORRECT getSuperDiv().add( new Label("hello","Hello")); } Anybody, knows some more clean solution to this? Maybe the root-Container for the subpages can be set somehow. Thanks Jens - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [Ajax/TabbedPanel] Issue deleting all tabs + ajax-update
ok i'm a little bit confused :-( I didt want to invoke 'tabs.remove()' during a onRender(), but during the onClick() method of by AjaxFallbackLink - like in your example. Using a normal Link the TabbedPanel doesnt throw the exception. Try your example with the AjaxTabbedPane and a AjaxFallbackLink. Then in onClick() you have to add the the the AjaxRequestTarget, which later leads to the ArrayIndexOutOfBoundsException. Pedro Santos schrieb: -- dipl. inform jens zastrow phone | +49.152.04840108 mail | m...@jens-zastrow.de web | http://jens-zastrow.de xing | http://www.xing.com/profile/Jens_Zastrow - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [Ajax/TabbedPanel] Issue deleting all tabs + ajax-update
Did you mean the the tab from the TabbedPanel or the whole TabbedPane from my page? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
[Ajax/TabbedPanel] Issue deleting all tabs + ajax-update
Hi, The TabbedPanel internaly uses a Loop to render the tab-components. During a normla GET request the Loop.onPopulate() method ensures that all the loop-childs are removed before adding them again to support a possible change of teh underlying Integer-model. Loop.onPopulate() @Override protected final void onPopulate() { // Remove any previous loop contents removeAll(); // Get number of iterations final int iterations = getIterations(); if (iterations > 0) { // Create LoopItems for each iteration for (int iteration = 0; iteration < iterations; iteration++) { // Create item for loop iteration LoopItem item = newItem(iteration); // Add and populate item add(item); populateItem(item); } } } The TabbedPanel creates the following LoopItem which access the ITab-List directly. return new LoopItem(tabIndex) { private static final long serialVersionUID = 1L; @Override protected void onComponentTag(ComponentTag tag){...} @Override public boolean isVisible() { // direct access of the tab return getTabs().get(tabIndex).isVisible(); } }; The problem now is, if the tabs-list is modfied for example deleted, the onPopulate() method NEEDs to be invoked before the LoopItem.isVisible() the ensure that the old-Loop-childs (LoopItem) are deleted. This does not happen (Why?) if the TabbedPanel is added/updated in an ajax-call, resulting in ArrayIndexOufBounds-Exception in the LoopItem.isVisible() Method. (tabs.get(tabIndex)). My workaround currently is to invoke the onPopulate() manually during deletion (by beforeRender()). ((MarkupContainer)temporalTabs.get("tabs-container")).get("tabs").beforeRender(); Any Ideas, how to force the onPopulate() get called - maybe invoking modelChanged() on some component??? Thanks Jens - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
[wicket-stuff] project sitemap-xml - empty jar' files
Hi all, I already created a jira but without any feedback http://wicketstuff.org/jira/browse/ACTIVEWIDGETS-3 We want to use the sitemap-xml project but the jars in the maven-repository are empty. I checked out 1.4.1 sitemap-xml source-code from the svn... The problem exists because the directory structure (main/java) doesnt follow the default-maven-layout (src/main/java) and the pom.xml isnt reconfigured to match the (main/java) structure. I hope sombody of the sitemap-xml-source commiters will read this. Thanks Jens - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Problem passing anonym-classes-models to pages
Hi Martijn, Think of the following use-case. There is reusable PersonSelectionPage which should select one person from a list. These page should be usable from some other pages which have entities which can be assigned a person to. A IModel will be passed to the PersonSelectionPage, which invokes later model.setObject(Person) after successfull selection. The specialized "assignment" code now is contained in the setObject(Person) method. IModel pm = new IModel() { public void setObject() { // do something clever here } } setResponsePage( new PersonSelectionPage(pm, getPage()) ); The PersonSelectionPage also gets the "return-to-page" as parameter, to be able to go-back (never got this working with redirectToInterceptPage+continueToOriginalDestination) Is such a usage out of the best-practices/idea of wicket? Jens Martijn Dashorst schrieb: Don't pass IModels around, use the model values they represent. Unless of course, you know what you are doing. For example, if you share a Model between two pages, it actually becomes two different instances after being passed on: one in the first page PageA (serialized with PageA), and one in the response page PageB (serialized with PageB). When you try to check whether PageA.getModel() == PageB.getModel() then you'll discover that they are not the same (might be equal, but not the same instance). Anonymous IModels should never be passed around. In our apps we always let each page wrap the domain classes in their own IModel copy (for example an HibernateModel). Martijn On Wed, May 27, 2009 at 1:22 PM, Jens Zastrow wrote: Hi, I use a lot of "anonym-classes-models" which a want to pass to Page instances (no need for be bookmarkable) class HomePage() { // some Models here IModel model = new LoadableDetachableModel(); // some Buttons-eventhandler public onClick() { IModel m = new AbstractReadOnlyModel() { public String getObject() { return "hello page". } } setResponsePage( new HelloPage(m) ); } // public void detach() { model.detach(); } As i discovered now, this seems not to fit conceptually. 1. using anonym model-classes javac always generates a reference to to enclosing class-instance, here 2. during detachment of page the model will ne detached correctly (clearing transient all objects) 3. after detachment the page is going to be serialized, which the effect that the reference to the page is serialized as well, without detaching thier models. Are there any "best-practices" related to this issue? Maybe pushing the on the "page-map-stack" forking ? Thanks Jens Zastrow - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- dipl. inform jens zastrow phone | +49.152.04840108 mail | m...@jens-zastrow.de web | http://jens-zastrow.de xing | http://www.xing.com/profile/Jens_Zastrow - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Problem passing anonym-classes-models to pages
Hi, I use a lot of "anonym-classes-models" which a want to pass to Page instances (no need for be bookmarkable) class HomePage() { // some Models here IModel model = new LoadableDetachableModel(); // some Buttons-eventhandler public onClick() { IModel m = new AbstractReadOnlyModel() { public String getObject() { return "hello page". } } setResponsePage( new HelloPage(m) ); } // public void detach() { model.detach(); } As i discovered now, this seems not to fit conceptually. 1. using anonym model-classes javac always generates a reference to to enclosing class-instance, here 2. during detachment of page the model will ne detached correctly (clearing transient all objects) 3. after detachment the page is going to be serialized, which the effect that the reference to the page is serialized as well, without detaching thier models. Are there any "best-practices" related to this issue? Maybe pushing the on the "page-map-stack" forking ? Thanks Jens Zastrow - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org