Re: Problem with using wicket as a filter
Hi again, in addition to what I've already said I want to point out what I've found out by profiling two really simply applications serving just a page without any dynamic content, one using a wicket page and one using a JSP. The test was about having a small http client invoking that page with 10 concurrent threads for 1 minute. When using the jsp version the server uses about 1 second of CPU time, all about serving the content, while with wicket the CPU time is about 90 seconds (more than 1 minute because it's multithreaded). 1% of those 90 seconds is spent in actually serving the content, the other 99% it's used in figuring out the mapping (as described in the previous post). -Roberto -- View this message in context: http://www.nabble.com/Problem-with-using-wicket-as-a-filter-tp20171597p20183293.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with using wicket as a filter
can you put a breakpoint in ProxyDirContext and check what name is being looked up? Roberto Fasciolo wrote: Hi again, in addition to what I've already said I want to point out what I've found out by profiling two really simply applications serving just a page without any dynamic content, one using a wicket page and one using a JSP. The test was about having a small http client invoking that page with 10 concurrent threads for 1 minute. When using the jsp version the server uses about 1 second of CPU time, all about serving the content, while with wicket the CPU time is about 90 seconds (more than 1 minute because it's multithreaded). 1% of those 90 seconds is spent in actually serving the content, the other 99% it's used in figuring out the mapping (as described in the previous post). -Roberto -- View this message in context: http://www.nabble.com/Problem-with-using-wicket-as-a-filter-tp20171597p20183446.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Static injection not working (wicket-guice)
Hi Edgar, can you share some details with me about what you're trying to accomplish? You can write me privately, this doesn't sound like a wicket issue so better not load the wicket-users list with the topic. Kristof On Wed, Oct 22, 2008 at 8:02 AM, Edgar Merino [EMAIL PROTECTED] wrote: Hello, I've been trying to inject a service to some classes that are not wicket components, I've asked here and was suggested to use static injection: InjectorHolder.getInjector().inject(this); however this is not working with guice, I always get an illegalstateexception, injectorholder has not been assigned an injector. I've tried ((GuiceInjectorHolder) (RequestCycle.get().getApplication().getMetaData(GuiceInjectorHolder.INJECTOR_KEY))).getInjector().injectMembers(this); however that gives me serialization problems, since wicket is not creating a proxy for my service. I'm on my way to give salve a try but I'm having some problems there too (waiting for a response from the Discussion group), what suggestions can you make? Thanks in advance, Edgar Merino - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with using wicket as a filter
Well, I think I could but that's a tomcat internal class, so I should recompile the entire tomcat source tree and then run those tests against that. I'd rather try configuring wicket as a servlet and see if the problem is still there, but I'd like to know that are the drawbacks of doing it in that way. Of course I can also try the terrible kludge of just mapping an empty servlet to the address of the wicket page and see if the situation would improve, but I wouldn't really like to bring that orrible kludge to any production system. If you think it would help I can provide you both the test wars I've used. Thanks, -Roberto Serkan Camurcuoglu wrote: can you put a breakpoint in ProxyDirContext and check what name is being looked up? -- View this message in context: http://www.nabble.com/Problem-with-using-wicket-as-a-filter-tp20171597p20183861.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Encoding lsot when submitting a form on Tomcat 4.1.37
I switched to using UTF-8 and all looks fine in the html. There's still a problem with validation messages from property files, but I guess that is a different issue, thanks for your help! :) On Mon, Oct 13, 2008 at 7:12 PM, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: Hi Kenneth I've seen on some occasions that IE 6 will loose content type if you specify UTF-8 as I remember it.. And yeah why not use utf-8 ? Kenneth Holm Nielsen wrote: Hehe, yeah I know, I forgot to mention that I also override init in Application like so: protected void init() { this.getMarkupSettings().setDefaultMarkupEncoding(ISO-8859-1); I guess I'll just have to inform the customer that the chosen framework does not support latin-1. On Mon, Oct 13, 2008 at 3:23 PM, Johan Compagner [EMAIL PROTECTED] wrote: You shouldnt set the response like that i think. Please use the request setting default encoding. So that wicket also knows what you are using when the form comes back in (form submit) Why use that iso encoding, please, all the people of this world, start using only utf8 everywhere and drop all those other stupid encodings. On 10/13/08, Kenneth Holm Nielsen [EMAIL PROTECTED] wrote: I'm using the wicket distribution for java 1.4 on a Tomcat 4.1.37, my encoding to ISO-8859-1 is working fine until I submit a form. The text 'æbleø' is presented fine until I submit, afterwards the encoding for the entire document is lost and the text becomes 'æbleÃ', in a BasePage.java that all pages implement I have configured the response with ISO-8859-1 encoding. protected void configureResponse() { final String encoding = text/html; charset=ISO-8859-1; getResponse().setContentType(encoding); } On the BasePage.html I have added the following. ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; html lang=da head title wicket:id=pagetitle/title meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1 The intial request, before submitting the form, has the correct Response headers. url = http://localhost:8080/PGUI/?wicket:interface=:3 Server: Apache-Coyote/1.1 Content-Type: text/html;charset=ISO-8859-1 Content-Length: 2241 Date: Mon, 13 Oct 2008 09:36:00 GMT but the Response from a submit does not set the content-type: url = http://localhost:8080/PGUI/?wicket:interface=:3:form::IFormSubmitListener :: Server: Apache-Coyote/1.1 Location: http://localhost:8080/PGUI/?wicket:interface=:3 Content-Length: 0 Date: Mon, 13 Oct 2008 09:36:00 GMT In the conf/server.xml in tomcat I've even added 'URIEncoding=*ISO-8859-1*' to the connector on port 8080. Despite all these hints, the browsers IE 7 and firefox 3, won't recognize the encoding. What am I missing? -- regards, Kenneth Holm Nielsen khAn Computing http://www.kennethhn.dk http://www.kennethhn.blogspot.com http://www.linkedin.com/in/kennethhn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- regards, Kenneth Holm Nielsen khAn Computing Phone.: +45 26 96 73 28 http://www.kennethhn.dk http://www.kennethhn.blogspot.com http://www.linkedin.com/in/kennethhn
Re: Problem with using wicket as a filter
you don't need to recompile tomcat, it's enough to mount tomcat's sources to your ide, or you can use the command line jdb debugger.. Roberto Fasciolo wrote: Well, I think I could but that's a tomcat internal class, so I should recompile the entire tomcat source tree and then run those tests against that. I'd rather try configuring wicket as a servlet and see if the problem is still there, but I'd like to know that are the drawbacks of doing it in that way. Of course I can also try the terrible kludge of just mapping an empty servlet to the address of the wicket page and see if the situation would improve, but I wouldn't really like to bring that horrible kludge to any production system. If you think it would help I can provide you both the test wars I've used. Thanks, -Roberto Serkan Camurcuoglu wrote: can you put a breakpoint in ProxyDirContext and check what name is being looked up? -- View this message in context: http://www.nabble.com/Problem-with-using-wicket-as-a-filter-tp20171597p20184165.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Stateless AJAX links
what doesnt work? it will throw a page expire now and that works. It should work now just as normal links. On Sun, Oct 26, 2008 at 7:06 PM, aditsu [EMAIL PROTECTED] wrote: aditsu wrote: Furthermore, BookmarkableListenerInterfaceRequestTarget.processEvents simply assumes that the page is not null after calling getPage(requestCycle) Oops, correction. This has changed between 1.4-m2 and m3, now it checks and throws a PageExpiredException. Either way, it won't work. Adrian -- View this message in context: http://www.nabble.com/Stateless-AJAX-links-tp20031309p20175686.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Stateless AJAX links
Because how else would you render the resulting page? It's an ajax request that makes changes to the current page (without going to another page). What does that have to do with redirecting? redirect is only relevant if you redirect to a page If it is a normal ajax request that just renders some components then redirect boolean is used at all. Then you just have an AjaxRequestTarget that does its work. Do you really want to replace the complete dom with a new page without the browser doing a normal get? Then the url thats in the browser wouldnt point at all anymore to the right page (if a user would do refresh in a browser) No, I just replace part of the dom of the current page. If the user refreshes the page, he/she will see the original page again (like it was before the changes). So you are just rendering a few components then the rendering/response phase shouldnt touch the redirect at all see above you just have a AjaxRequestTarget Maybe because the request phase is different for you because you try to have an stateless page and that is something that wicket doesnt support for ajax. if you click an ajax link and you want to show a different page then yes a redirect to that page has to happen else we have to replace the complete document with the new page, dont know if we really support that and if that will go fine in all the browsers. Yeah, *if* I want to show a different page. (By the way, a 302 redirect won't help in that case, but I see that it automatically uses another way for ajax requests). However I *don't* want to show a different page. see above, AjaxRequestTarget should then handle the response and that one doesnt look at the redirect and the redirect boolean is only relevant for the Response not the request. - Is there any better way to do what I am trying to do? yes why have ajax links that could be just normal links if you want to have a stateless page. That could work, but I'd rather not render and send the whole updated page to the browser, when most of it doesn't change. How would that be better? then just use statefull pages I dont get why you have partial updated pages, that are constantly created as the original again because you want stateless pages. Dont you want to keep that partial updated page in memory? I guess you dont have any callbacks in the things you update? that is just text/images?
Re: No session requested when playing MP3 resource link
Sorry to be a pain but i cant seem to work out how to do that, is it a setting in the web.xml? Also I'm not sure I want to disable cookies for the whole app, is it possible to just add a session id to the specific resourcelink? igor.vaynberg wrote: well, what you can do is disable session cookie tracking on your servlet container. that way sessionid will be written into every url. -igor On Fri, Oct 24, 2008 at 11:00 AM, chris888 [EMAIL PROTECTED] wrote: thanks for the lightning fast reply I'm guessing that the media player does not know about the browsers cookie so cant send it. How can I tell for sure if it is or not? On the browser requests object I see that a session id is requested and requestedSessionCookie is true When the media player requests they are null and false igor.vaynberg wrote: the jsessionid should be there only during the first request. after the first request the container switches to using the session cookie. is the cookie set on the android end? is it being sent back? -igor On Fri, Oct 24, 2008 at 10:48 AM, chris888 [EMAIL PROTECTED] wrote: Hi, I have a fairly simple wicket page that displays a list of links that are DynamicWebResource links to MP3 streams. This works fine on most platforms I am running on (the link either plays in the browser or media player opens to play the link) but on Android I find that when the media player opens it makes requests on a different session and by tracing back through the code I see that the requestedSessionID on the request is null. Is there a way to put the jsessionId on the ResourceLink URL? might that possibly allow wicket to pick up the correct session? Or any other suggestions very welcome Cheers :) -- View this message in context: http://www.nabble.com/No-session-requested-when-playing-MP3-resource-link-tp20154778p20154778.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/No-session-requested-when-playing-MP3-resource-link-tp20154778p20155020.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/No-session-requested-when-playing-MP3-resource-link-tp20154778p20184996.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Illegal State Exception on DefaultTeeModel.removeNodeFromParent
Hi all, if I call removeNodeFromParent for the last (and only) child node of a parent node on second or deeper level in a TreeTable, Wicket throws an IllegalStateException like this: ERROR - RequestCycle - Cannot remove [MarkupContainer [Component id = 11, page = No Page, path = 11.AbstractTree$TreeItem]] from null parent! java.lang.IllegalStateException: Cannot remove [MarkupContainer [Component id = 11, page = No Page, path = 11.AbstractTree$TreeItem]] from null parent! at org.apache.wicket.Component.remove(Component.java:2204) at org.apache.wicket.markup.html.tree.AbstractTree.removeItem(AbstractTree.java:1441) at org.apache.wicket.markup.html.tree.AbstractTree.treeNodesRemoved(AbstractTree.java:832) at javax.swing.tree.DefaultTreeModel.fireTreeNodesRemoved(DefaultTreeModel.java:530) at javax.swing.tree.DefaultTreeModel.nodesWereRemoved(DefaultTreeModel.java:310) at javax.swing.tree.DefaultTreeModel.removeNodeFromParent(DefaultTreeModel.java:244) It runs well if child node is not the last child of parent. Before calling removeNodeFromParent() the instance method TreeNode.getParent() always returns the valid instance of DefaultMutableTreeNode. So tree seems to be intact for me... Any hints? Best regards Hannes Schubert - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: No session requested when playing MP3 resource link
OK forget that I just tried disabling cookies on the browser and it worked OK. So now I would really like to try just adding the sesion id to the link URL, can I do this by manipulating the webmarkupcontainer? do you think it would work if i am mixing cookie and url session tracking? I tried adding a valuemap to the resourcelink but it then wants a shared resourcereference rather than a resource and I'm not sure thats the route to go down as that would add a parameter after the '?' and i think I need it before, here is the markup generated with cookies disabled in the browser ;jsessionid=E47FF1C037EFEAA8BC6408308A5270DA?wicket:interface=:0:messagelistrow:1:playmessagelink::IResourceListener:: Unknown Below is the code that creates the list of links, (the VxsWASMessageResource extends DynamicWebResource that returns a stream in the getResourceState) VxsMessageIterator iter = pageList.iterator(); RepeatingView rv = new RepeatingView(messagelistrow); add(rv); int count = 0; do { VxsVoiceMessage message = (VxsVoiceMessage)iter.next(); WebMarkupContainer parent = new WebMarkupContainer(rv.newChildId()); rv.add(parent); // Add the resource link ResourceLink link = new ResourceLink(playmessagelink, new VxsWASMessageResource(pageList.indexOf(message))); parent.add(link); link.add(new Label(fromlabel, message.getFromAddress().getPersonal())); count++; } while (iter.hasNext() count 6); Any ideas how to get the session id in there? igor.vaynberg wrote: well, what you can do is disable session cookie tracking on your servlet container. that way sessionid will be written into every url. -igor On Fri, Oct 24, 2008 at 11:00 AM, chris888 [EMAIL PROTECTED] wrote: thanks for the lightning fast reply I'm guessing that the media player does not know about the browsers cookie so cant send it. How can I tell for sure if it is or not? On the browser requests object I see that a session id is requested and requestedSessionCookie is true When the media player requests they are null and false igor.vaynberg wrote: the jsessionid should be there only during the first request. after the first request the container switches to using the session cookie. is the cookie set on the android end? is it being sent back? -igor On Fri, Oct 24, 2008 at 10:48 AM, chris888 [EMAIL PROTECTED] wrote: Hi, I have a fairly simple wicket page that displays a list of links that are DynamicWebResource links to MP3 streams. This works fine on most platforms I am running on (the link either plays in the browser or media player opens to play the link) but on Android I find that when the media player opens it makes requests on a different session and by tracing back through the code I see that the requestedSessionID on the request is null. Is there a way to put the jsessionId on the ResourceLink URL? might that possibly allow wicket to pick up the correct session? Or any other suggestions very welcome Cheers :) -- View this message in context: http://www.nabble.com/No-session-requested-when-playing-MP3-resource-link-tp20154778p20154778.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/No-session-requested-when-playing-MP3-resource-link-tp20154778p20155020.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/No-session-requested-when-playing-MP3-resource-link-tp20154778p20186110.html Sent from the Wicket - User mailing list archive at Nabble.com.
Re: No session requested when playing MP3 resource link
As Igor stated, you just have to enforce the servlet containers url rewrite facility. It will just happen automatically. chris888 wrote: OK forget that I just tried disabling cookies on the browser and it worked OK. So now I would really like to try just adding the sesion id to the link URL, can I do this by manipulating the webmarkupcontainer? do you think it would work if i am mixing cookie and url session tracking? I tried adding a valuemap to the resourcelink but it then wants a shared resourcereference rather than a resource and I'm not sure thats the route to go down as that would add a parameter after the '?' and i think I need it before, here is the markup generated with cookies disabled in the browser ;jsessionid=E47FF1C037EFEAA8BC6408308A5270DA?wicket:interface=:0:messagelistrow:1:playmessagelink::IResourceListener:: Unknown Below is the code that creates the list of links, (the VxsWASMessageResource extends DynamicWebResource that returns a stream in the getResourceState) VxsMessageIterator iter = pageList.iterator(); RepeatingView rv = new RepeatingView(messagelistrow); add(rv); int count = 0; do { VxsVoiceMessage message = (VxsVoiceMessage)iter.next(); WebMarkupContainer parent = new WebMarkupContainer(rv.newChildId()); rv.add(parent); // Add the resource link ResourceLink link = new ResourceLink(playmessagelink, new VxsWASMessageResource(pageList.indexOf(message))); parent.add(link); link.add(new Label(fromlabel, message.getFromAddress().getPersonal())); count++; } while (iter.hasNext() count 6); Any ideas how to get the session id in there? igor.vaynberg wrote: well, what you can do is disable session cookie tracking on your servlet container. that way sessionid will be written into every url. -igor On Fri, Oct 24, 2008 at 11:00 AM, chris888 [EMAIL PROTECTED] wrote: thanks for the lightning fast reply I'm guessing that the media player does not know about the browsers cookie so cant send it. How can I tell for sure if it is or not? On the browser requests object I see that a session id is requested and requestedSessionCookie is true When the media player requests they are null and false igor.vaynberg wrote: the jsessionid should be there only during the first request. after the first request the container switches to using the session cookie. is the cookie set on the android end? is it being sent back? -igor On Fri, Oct 24, 2008 at 10:48 AM, chris888 [EMAIL PROTECTED] wrote: Hi, I have a fairly simple wicket page that displays a list of links that are DynamicWebResource links to MP3 streams. This works fine on most platforms I am running on (the link either plays in the browser or media player opens to play the link) but on Android I find that when the media player opens it makes requests on a different session and by tracing back through the code I see that the requestedSessionID on the request is null. Is there a way to put the jsessionId on the ResourceLink URL? might that possibly allow wicket to pick up the correct session? Or any other suggestions very welcome Cheers :) -- View this message in context: http://www.nabble.com/No-session-requested-when-playing-MP3-resource-link-tp20154778p20154778.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/No-session-requested-when-playing-MP3-resource-link-tp20154778p20155020.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684
Re: No session requested when playing MP3 resource link
Do you have any idea how i do that with Tomcat? I'm also reticent to do that unless I can do it for just android so I must be able to do it programatically based on the user agent or something Nino.Martinez wrote: As Igor stated, you just have to enforce the servlet containers url rewrite facility. It will just happen automatically. chris888 wrote: OK forget that I just tried disabling cookies on the browser and it worked OK. So now I would really like to try just adding the sesion id to the link URL, can I do this by manipulating the webmarkupcontainer? do you think it would work if i am mixing cookie and url session tracking? I tried adding a valuemap to the resourcelink but it then wants a shared resourcereference rather than a resource and I'm not sure thats the route to go down as that would add a parameter after the '?' and i think I need it before, here is the markup generated with cookies disabled in the browser ;jsessionid=E47FF1C037EFEAA8BC6408308A5270DA?wicket:interface=:0:messagelistrow:1:playmessagelink::IResourceListener:: Unknown Below is the code that creates the list of links, (the VxsWASMessageResource extends DynamicWebResource that returns a stream in the getResourceState) VxsMessageIterator iter = pageList.iterator(); RepeatingView rv = new RepeatingView(messagelistrow); add(rv); int count = 0; do { VxsVoiceMessage message = (VxsVoiceMessage)iter.next(); WebMarkupContainer parent = new WebMarkupContainer(rv.newChildId()); rv.add(parent); // Add the resource link ResourceLink link = new ResourceLink(playmessagelink, new VxsWASMessageResource(pageList.indexOf(message))); parent.add(link); link.add(new Label(fromlabel, message.getFromAddress().getPersonal())); count++; } while (iter.hasNext() count 6); Any ideas how to get the session id in there? igor.vaynberg wrote: well, what you can do is disable session cookie tracking on your servlet container. that way sessionid will be written into every url. -igor On Fri, Oct 24, 2008 at 11:00 AM, chris888 [EMAIL PROTECTED] wrote: thanks for the lightning fast reply I'm guessing that the media player does not know about the browsers cookie so cant send it. How can I tell for sure if it is or not? On the browser requests object I see that a session id is requested and requestedSessionCookie is true When the media player requests they are null and false igor.vaynberg wrote: the jsessionid should be there only during the first request. after the first request the container switches to using the session cookie. is the cookie set on the android end? is it being sent back? -igor On Fri, Oct 24, 2008 at 10:48 AM, chris888 [EMAIL PROTECTED] wrote: Hi, I have a fairly simple wicket page that displays a list of links that are DynamicWebResource links to MP3 streams. This works fine on most platforms I am running on (the link either plays in the browser or media player opens to play the link) but on Android I find that when the media player opens it makes requests on a different session and by tracing back through the code I see that the requestedSessionID on the request is null. Is there a way to put the jsessionId on the ResourceLink URL? might that possibly allow wicket to pick up the correct session? Or any other suggestions very welcome Cheers :) -- View this message in context: http://www.nabble.com/No-session-requested-when-playing-MP3-resource-link-tp20154778p20154778.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/No-session-requested-when-playing-MP3-resource-link-tp20154778p20155020.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Stateless AJAX links
aditsu wrote: Anyway, everything is working now, but I wanted some answers to those questions. I am very interested in what you have achieved here. Is there any chance you could summarise what you had to do to get stateless AJAX links to work? Perhaps just a post to this topic or even a wiki page? Thanks, John -- View this message in context: http://www.nabble.com/Stateless-AJAX-links-tp20031309p20187534.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: No session requested when playing MP3 resource link
OK I see that in tomcat I can disable cookies for the entire web app by a setting int the context.xml. This is no good for me as I cant disable cookies on such a global scale as the other apps we have running will want to use cookies Can I not manipulate the Link object in some way to include the session id? chris888 wrote: Do you have any idea how i do that with Tomcat? I'm also reticent to do that unless I can do it for just android so I must be able to do it programatically based on the user agent or something Nino.Martinez wrote: As Igor stated, you just have to enforce the servlet containers url rewrite facility. It will just happen automatically. chris888 wrote: OK forget that I just tried disabling cookies on the browser and it worked OK. So now I would really like to try just adding the sesion id to the link URL, can I do this by manipulating the webmarkupcontainer? do you think it would work if i am mixing cookie and url session tracking? I tried adding a valuemap to the resourcelink but it then wants a shared resourcereference rather than a resource and I'm not sure thats the route to go down as that would add a parameter after the '?' and i think I need it before, here is the markup generated with cookies disabled in the browser ;jsessionid=E47FF1C037EFEAA8BC6408308A5270DA?wicket:interface=:0:messagelistrow:1:playmessagelink::IResourceListener:: Unknown Below is the code that creates the list of links, (the VxsWASMessageResource extends DynamicWebResource that returns a stream in the getResourceState) VxsMessageIterator iter = pageList.iterator(); RepeatingView rv = new RepeatingView(messagelistrow); add(rv); int count = 0; do { VxsVoiceMessage message = (VxsVoiceMessage)iter.next(); WebMarkupContainer parent = new WebMarkupContainer(rv.newChildId()); rv.add(parent); // Add the resource link ResourceLink link = new ResourceLink(playmessagelink, new VxsWASMessageResource(pageList.indexOf(message))); parent.add(link); link.add(new Label(fromlabel, message.getFromAddress().getPersonal())); count++; } while (iter.hasNext() count 6); Any ideas how to get the session id in there? igor.vaynberg wrote: well, what you can do is disable session cookie tracking on your servlet container. that way sessionid will be written into every url. -igor On Fri, Oct 24, 2008 at 11:00 AM, chris888 [EMAIL PROTECTED] wrote: thanks for the lightning fast reply I'm guessing that the media player does not know about the browsers cookie so cant send it. How can I tell for sure if it is or not? On the browser requests object I see that a session id is requested and requestedSessionCookie is true When the media player requests they are null and false igor.vaynberg wrote: the jsessionid should be there only during the first request. after the first request the container switches to using the session cookie. is the cookie set on the android end? is it being sent back? -igor On Fri, Oct 24, 2008 at 10:48 AM, chris888 [EMAIL PROTECTED] wrote: Hi, I have a fairly simple wicket page that displays a list of links that are DynamicWebResource links to MP3 streams. This works fine on most platforms I am running on (the link either plays in the browser or media player opens to play the link) but on Android I find that when the media player opens it makes requests on a different session and by tracing back through the code I see that the requestedSessionID on the request is null. Is there a way to put the jsessionId on the ResourceLink URL? might that possibly allow wicket to pick up the correct session? Or any other suggestions very welcome Cheers :) -- View this message in context: http://www.nabble.com/No-session-requested-when-playing-MP3-resource-link-tp20154778p20154778.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context:
Controlling tinyMCE component
The tinyMCE component has two themes - simple and advanced. When in simple - there is only one toolbar, when in advanced - three. 1. How can I remove toolbars? I could not find such an API. 2. How do I remove separators so that I can rearrange freely the buttons? Kind regards: al_shopov - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Editable drop down component
There are several drop down components in wicket and wicket extensions, but I did not find an editable drop down (something that would compose a text input + some java script for the functionality). Is there such a component or do I need to write on on my own? Kind regards: al_shopov - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Stateless AJAX links
John Patterson wrote: aditsu wrote: Anyway, everything is working now, but I wanted some answers to those questions. I am very interested in what you have achieved here. Is there any chance you could summarise what you had to do to get stateless AJAX links to work? Perhaps just a post to this topic or even a wiki page? My first post in this thread pretty much describes what I did. You can find it at http://www.nabble.com/Stateless-AJAX-links-td20031309.html Feel free to ask for details where it's not clear. Adrian -- View this message in context: http://www.nabble.com/Stateless-AJAX-links-tp20031309p20189364.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with using wicket as a filter
As expected, the name that is looked up is the part of the page URL that is after the context root (for example for a page located at http://localhost:8080/wickettest/page/Page1k it's /page/Page1k). Serkan Camurcuoglu wrote: can you put a breakpoint in ProxyDirContext and check what name is being looked up? -- View this message in context: http://www.nabble.com/Problem-with-using-wicket-as-a-filter-tp20171597p20189464.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: generate javascript file together with html page
Michael Sparer wrote: take a look at headercontributors e.g. http://chillenious.wordpress.com/2006/05/03/wicket-header-contributions-with-behaviors/ This will only generate the reference to the javascript in the html page. However, now when the browser tries to request this javascript file, I want the request to go to the same Page object that created the html, so that it renders the javascript file. Assume FooPage.java. A request FooPage.html creates a call to FooPage. It then contributes FooPage.js to the header and then I want a request to FooPage.js to go back to FooPage so it creates the javascript file by using the same hierarchy of components. Ittay regards, Michael Ittay Dror wrote: Hi, I'd like to create a page with lots of javascript code. For reasons of maintenance, I'd like the Page object to generate the html with reference to a javascript file with the same name and .js extension so when the browser tries to load this file the same Page object then renders (by using behaviors) the javascript content. (by saying 'object renders' I mean the normal wicket style rendering of delegating to the contained component hierarchies). Any pointers would be appreciated. Ittay -- View this message in context: http://www.nabble.com/generate-javascript-file-together-with-html-page-tp20188258p20189490.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Editable drop down component
something like the AutoCompleteTextField? Alexander Shopov wrote: There are several drop down components in wicket and wicket extensions, but I did not find an editable drop down (something that would compose a text input + some java script for the functionality). Is there such a component or do I need to write on on my own? Kind regards: al_shopov - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/Editable-drop-down-component-tp20189222p20189533.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: No session requested when playing MP3 resource link
That didn't work but prepending the jsessionid to the URL did, I made my own version of resource link and prepended the id in the getURL() method protected final CharSequence getURL() { CharSequence temp = urlFor(IResourceListener.INTERFACE); PrependingStringBuffer prep = new PrependingStringBuffer(temp.toString()); prep.prepend(;jsessionid= + this.getSession().getId()); return prep.toString(); } Probably not much use to most people but nice to know it works anyway, hopefully google will fix android and I can remove it as its a bit of a dirty hack really (not holding my breath on that one though) Nino.Martinez wrote: Add an attribute appender? I dont think tomcat cares where the jsessionid identifier are placed.. chris888 wrote: OK I see that in tomcat I can disable cookies for the entire web app by a setting int the context.xml. This is no good for me as I cant disable cookies on such a global scale as the other apps we have running will want to use cookies Can I not manipulate the Link object in some way to include the session id? chris888 wrote: Do you have any idea how i do that with Tomcat? I'm also reticent to do that unless I can do it for just android so I must be able to do it programatically based on the user agent or something Nino.Martinez wrote: As Igor stated, you just have to enforce the servlet containers url rewrite facility. It will just happen automatically. chris888 wrote: OK forget that I just tried disabling cookies on the browser and it worked OK. So now I would really like to try just adding the sesion id to the link URL, can I do this by manipulating the webmarkupcontainer? do you think it would work if i am mixing cookie and url session tracking? I tried adding a valuemap to the resourcelink but it then wants a shared resourcereference rather than a resource and I'm not sure thats the route to go down as that would add a parameter after the '?' and i think I need it before, here is the markup generated with cookies disabled in the browser ;jsessionid=E47FF1C037EFEAA8BC6408308A5270DA?wicket:interface=:0:messagelistrow:1:playmessagelink::IResourceListener:: Unknown Below is the code that creates the list of links, (the VxsWASMessageResource extends DynamicWebResource that returns a stream in the getResourceState) VxsMessageIterator iter = pageList.iterator(); RepeatingView rv = new RepeatingView(messagelistrow); add(rv); int count = 0; do { VxsVoiceMessage message = (VxsVoiceMessage)iter.next(); WebMarkupContainer parent = new WebMarkupContainer(rv.newChildId()); rv.add(parent); // Add the resource link ResourceLink link = new ResourceLink(playmessagelink, new VxsWASMessageResource(pageList.indexOf(message))); parent.add(link); link.add(new Label(fromlabel, message.getFromAddress().getPersonal())); count++; } while (iter.hasNext() count 6); Any ideas how to get the session id in there? igor.vaynberg wrote: well, what you can do is disable session cookie tracking on your servlet container. that way sessionid will be written into every url. -igor On Fri, Oct 24, 2008 at 11:00 AM, chris888 [EMAIL PROTECTED] wrote: thanks for the lightning fast reply I'm guessing that the media player does not know about the browsers cookie so cant send it. How can I tell for sure if it is or not? On the browser requests object I see that a session id is requested and requestedSessionCookie is true When the media player requests they are null and false igor.vaynberg wrote: the jsessionid should be there only during the first request. after the first request the container switches to using the session cookie. is the cookie set on the android end? is it being sent back? -igor On Fri, Oct 24, 2008 at 10:48 AM, chris888 [EMAIL PROTECTED] wrote: Hi, I have a fairly simple wicket page that displays a list of links that are DynamicWebResource links to MP3 streams. This works fine on most platforms I am running on (the link either plays in the browser or media player opens to play the link) but on Android I find that when the media player opens it makes requests on a different session
birthday dropdown with month/leap year variances
Hi all, I am creating a set of dropdown choices for a user to enter their birthday on a profile. One for day of the month, one for month of the year, and one for year. However I want to be able to take into account months that have differing numbers of days, (ie some 30, some 31, some 28, every now and the 29 etc) which is all dependent on the month and if its a leap year or not. Does anyone have a component/fragment of code that handles this already to save reinventing the wheel? cheers, Steve smime.p7s Description: S/MIME cryptographic signature
Re: generate javascript file together with html page
Sound like what you need is a DynamicWebResource. Regards, Erik. Ittay Dror wrote: Michael Sparer wrote: take a look at headercontributors e.g. http://chillenious.wordpress.com/2006/05/03/wicket-header-contributions-with-behaviors/ This will only generate the reference to the javascript in the html page. However, now when the browser tries to request this javascript file, I want the request to go to the same Page object that created the html, so that it renders the javascript file. Assume FooPage.java. A request FooPage.html creates a call to FooPage. It then contributes FooPage.js to the header and then I want a request to FooPage.js to go back to FooPage so it creates the javascript file by using the same hierarchy of components. Ittay -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: birthday dropdown with month/leap year variances
Maybe you can just rely on Calendars, which provides Calendar#getMaximum(Calendar.DAY_OF_MONTH) It is not really reinventing the wheel, just using the available api and combine Steve Swinsburg a écrit : Hi all, I am creating a set of dropdown choices for a user to enter their birthday on a profile. One for day of the month, one for month of the year, and one for year. However I want to be able to take into account months that have differing numbers of days, (ie some 30, some 31, some 28, every now and the 29 etc) which is all dependent on the month and if its a leap year or not. Does anyone have a component/fragment of code that handles this already to save reinventing the wheel? cheers, Steve - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: birthday dropdown with month/leap year variances
A simple way would be to use http://wicketstuff.org/wicket13/dates/ with the settings used on http://developer.yahoo.com/yui/examples/calendar/calnavigator.html Ryan Gravener http://ryangravener.com/flex | http://twitter.com/ryangravener On Mon, Oct 27, 2008 at 12:08 PM, Steve Swinsburg [EMAIL PROTECTED] wrote: Hi all, I am creating a set of dropdown choices for a user to enter their birthday on a profile. One for day of the month, one for month of the year, and one for year. However I want to be able to take into account months that have differing numbers of days, (ie some 30, some 31, some 28, every now and the 29 etc) which is all dependent on the month and if its a leap year or not. Does anyone have a component/fragment of code that handles this already to save reinventing the wheel? cheers, Steve
RE: Controlling tinyMCE component
The Wicket TinyMCE API (referring to the latest 1.3 snapshot release) is indeed not as feature rich as one could have wanted. But in the end the Wicket TinyMCE API just generates the javascript code to initialize TinyMCE (see the TinyMCE website). So, for example, to disable the second toolbar row you can overwrite the toJavaScript method of the TinyMCESettings object and do something like this: String buffer = super.toJavaScript(mode, components); buffer += ,\n\ttheme_advanced_buttons2 : \\; Sverre -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Verzonden: maandag 27 oktober 2008 15:49 Aan: users@wicket.apache.org Onderwerp: Controlling tinyMCE component The tinyMCE component has two themes - simple and advanced. When in simple - there is only one toolbar, when in advanced - three. 1. How can I remove toolbars? I could not find such an API. 2. How do I remove separators so that I can rearrange freely the buttons? Kind regards: al_shopov - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Editable drop down component
Theres also the object auto complete in wicketstuff... [EMAIL PROTECTED] wrote: There are several drop down components in wicket and wicket extensions, but I did not find an editable drop down (something that would compose a text input + some java script for the functionality). Is there such a component or do I need to write on on my own? Kind regards: al_shopov - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: generate javascript file together with html page
Erik van Oosten wrote: Sound like what you need is a DynamicWebResource. yes, sound like this can do it. but can i start a rendering cycle here so that i get the bytes required at the end? Regards, Erik. Ittay Dror wrote: Michael Sparer wrote: take a look at headercontributors e.g. http://chillenious.wordpress.com/2006/05/03/wicket-header-contributions-with-behaviors/ This will only generate the reference to the javascript in the html page. However, now when the browser tries to request this javascript file, I want the request to go to the same Page object that created the html, so that it renders the javascript file. Assume FooPage.java. A request FooPage.html creates a call to FooPage. It then contributes FooPage.js to the header and then I want a request to FooPage.js to go back to FooPage so it creates the javascript file by using the same hierarchy of components. Ittay -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/generate-javascript-file-together-with-html-page-tp20188258p20191181.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: generate javascript file together with html page
I did not use this thing yet, but I believe that you will have to provide enough information to the DynamicWebResource so that it can generate what ever it needs to generate by itself. In an extreme case that could be simply a reference to the containing page, but that sounds quite dangerous to me. Regards, Erik. Ittay Dror wrote: Erik van Oosten wrote: Sound like what you need is a DynamicWebResource. yes, sound like this can do it. but can i start a rendering cycle here so that i get the bytes required at the end? -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: generate javascript file together with html page
I'm sure I don't understand your question, but in a futile attempt to answer it anyway: html head wicket:link script src=FooPage.js/script /wicket:link /head body /body /html Martijn On Mon, Oct 27, 2008 at 4:03 PM, Ittay Dror [EMAIL PROTECTED] wrote: Michael Sparer wrote: take a look at headercontributors e.g. http://chillenious.wordpress.com/2006/05/03/wicket-header-contributions-with-behaviors/ This will only generate the reference to the javascript in the html page. However, now when the browser tries to request this javascript file, I want the request to go to the same Page object that created the html, so that it renders the javascript file. Assume FooPage.java. A request FooPage.html creates a call to FooPage. It then contributes FooPage.js to the header and then I want a request to FooPage.js to go back to FooPage so it creates the javascript file by using the same hierarchy of components. Ittay regards, Michael Ittay Dror wrote: Hi, I'd like to create a page with lots of javascript code. For reasons of maintenance, I'd like the Page object to generate the html with reference to a javascript file with the same name and .js extension so when the browser tries to load this file the same Page object then renders (by using behaviors) the javascript content. (by saying 'object renders' I mean the normal wicket style rendering of delegating to the contained component hierarchies). Any pointers would be appreciated. Ittay -- View this message in context: http://www.nabble.com/generate-javascript-file-together-with-html-page-tp20188258p20189490.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.4 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: generate javascript file together with html page
Martijn Dashorst wrote: I'm sure I don't understand your question, but in a futile attempt to answer it anyway: thanks for the effort ;) my point is that the javascript file is also generated. e.g., the code in it creates javascript objects that are attached to the html elements in the containing page. of course, i can attach behaviors to those components that will render the javascript inline the page, but it seems to me this will be harder to read (if the javascript objects interact with each other) and so maintain. html head wicket:link script src=FooPage.js/script /wicket:link /head body /body /html Martijn On Mon, Oct 27, 2008 at 4:03 PM, Ittay Dror [EMAIL PROTECTED] wrote: Michael Sparer wrote: take a look at headercontributors e.g. http://chillenious.wordpress.com/2006/05/03/wicket-header-contributions-with-behaviors/ This will only generate the reference to the javascript in the html page. However, now when the browser tries to request this javascript file, I want the request to go to the same Page object that created the html, so that it renders the javascript file. Assume FooPage.java. A request FooPage.html creates a call to FooPage. It then contributes FooPage.js to the header and then I want a request to FooPage.js to go back to FooPage so it creates the javascript file by using the same hierarchy of components. Ittay regards, Michael Ittay Dror wrote: Hi, I'd like to create a page with lots of javascript code. For reasons of maintenance, I'd like the Page object to generate the html with reference to a javascript file with the same name and .js extension so when the browser tries to load this file the same Page object then renders (by using behaviors) the javascript content. (by saying 'object renders' I mean the normal wicket style rendering of delegating to the contained component hierarchies). Any pointers would be appreciated. Ittay -- View this message in context: http://www.nabble.com/generate-javascript-file-together-with-html-page-tp20188258p20189490.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.4 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/generate-javascript-file-together-with-html-page-tp20188258p20192198.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ajax form components principles
if you dont want the model updated why are you using a ajaxformcomponentupdatingbehavior? -igor On Sun, Oct 26, 2008 at 6:04 PM, Dreamage [EMAIL PROTECTED] wrote: Hi, Suppose I have a form with an ajax checkbox inside it. Whenever I check/uncheck the checkbox, the associated model is updated. The problem is that if the the checkbox uses a propertymodel targetting a object from my database (using a datachable model to retrieve it), then the object is modified in the database and I haven't submit the form yet. If the form have a cancel button, my object could still be modified if I used the checkbox before using cancel. I read somewhere that ajax components should not modify the object until form post (can't remember where), so should I use a temporary model as the ajax checkbox model and apply the value to my database object when the form is submitted ? If yes, where should I place this code or is there a better way to do this ? Thanks -- View this message in context: http://www.nabble.com/Ajax-form-components-principles-tp20180246p20180246.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with using wicket as a filter
using a filter has certain advantage, which are all outlined in the discussion thread on this list we had when deciding to switch to the filter. just search the archives. this sounds like a bug in tomcat, why dont you take it to their list? the way that jetty works is that it installs a default catch-all servlet in order for filters to run at all, so you might have to do the same thing. -igor On Sun, Oct 26, 2008 at 2:26 AM, Roberto Fasciolo [EMAIL PROTECTED] wrote: Hi, I was profiling my application running on tomcat and I've found out that a lot of CPU time is spent in ProxyDirContext.lookup(String). After investigating the tomcat source code I've found that that method is invoked when tomcat is trying to figure out what it should invoke basing on the received URL. Our application has the WicketFilter mapped to /* and no servlet defined, so my guess is that tomcat finds immediately the filter but then it tries to look for a servlet matching the required page's URL. Based on the wiki in wicket 1.3 the recommended way of mapping it is by using the filter instead of the servlet, but what's the drawback of using the servlet (if being careful with mappings so that static contents are served by tomcat)? Thanks in advance, -Roberto -- View this message in context: http://www.nabble.com/Problem-with-using-wicket-as-a-filter-tp20171597p20171597.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Stateless AJAX links
Hi, I thought about what you said, and debugged some more. Here's what I found out: Johan Compagner wrote: RequestCycle.isRedirect() is right, because that is a call that tells us must i redirect of i get a page redirect and with ajax this is always the case. Problem is that the BookmarkablePageRequestTarget.getPage(RC) should only create a page when it is not a redirect And that also correct. Actually, neither BehaviorRequestTarget nor AjaxRequestTarget ever check for redirect. As long as the target is not changed to something else, the redirect setting is ignored. AFAICT, the redirect-for-ajax thing is there so that *if* the *final* request target is something other than AjaxRequestTarget, it will cause a redirect. E.g. if in my handler method I set the response page to a bookmarkable page, then it should do a redirect indeed (that is, a javascript redirect, not an http 302). The problem is that my initial target is BookmarkableListenerInterfaceRequestTarget, before changing to AjaxRequestTarget, and wicket doesn't expect that. It sees a non-ajax target for an ajax request, so it just blindly says this is a redirect, when actually I'm not gonna do that. So I think isRedirect should NOT check for ajax unless it's at the RESPOND step. In the PROCESS_EVENTS step it should only check for the redirect flag. That would probably solve my problem and at the same time it would start to make sense. What do you think? Adrian -- View this message in context: http://www.nabble.com/Stateless-AJAX-links-tp20031309p20193967.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: generate javascript file together with html page
What about a texttemplate? For the js? I wrote something about it here: http://ninomartinez.wordpress.com/2008/09/09/apache-wicket-javascript-integration/ But it might be overkill. Ittay Dror wrote: Martijn Dashorst wrote: I'm sure I don't understand your question, but in a futile attempt to answer it anyway: thanks for the effort ;) my point is that the javascript file is also generated. e.g., the code in it creates javascript objects that are attached to the html elements in the containing page. of course, i can attach behaviors to those components that will render the javascript inline the page, but it seems to me this will be harder to read (if the javascript objects interact with each other) and so maintain. html head wicket:link script src=FooPage.js/script /wicket:link /head body /body /html Martijn On Mon, Oct 27, 2008 at 4:03 PM, Ittay Dror [EMAIL PROTECTED] wrote: Michael Sparer wrote: take a look at headercontributors e.g. http://chillenious.wordpress.com/2006/05/03/wicket-header-contributions-with-behaviors/ This will only generate the reference to the javascript in the html page. However, now when the browser tries to request this javascript file, I want the request to go to the same Page object that created the html, so that it renders the javascript file. Assume FooPage.java. A request FooPage.html creates a call to FooPage. It then contributes FooPage.js to the header and then I want a request to FooPage.js to go back to FooPage so it creates the javascript file by using the same hierarchy of components. Ittay regards, Michael Ittay Dror wrote: Hi, I'd like to create a page with lots of javascript code. For reasons of maintenance, I'd like the Page object to generate the html with reference to a javascript file with the same name and .js extension so when the browser tries to load this file the same Page object then renders (by using behaviors) the javascript content. (by saying 'object renders' I mean the normal wicket style rendering of delegating to the contained component hierarchies). Any pointers would be appreciated. Ittay -- View this message in context: http://www.nabble.com/generate-javascript-file-together-with-html-page-tp20188258p20189490.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.4 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Stateless AJAX links
we dont know that really if it is the respond step And normally that getPage() isnt called in wicket when not in a Response step what you do is currently not supported by wicket having an ajax behavior request to a stateless page (through a BookmarkableListenerInterfaceRequestTarget) so i guess the fix is in processEvents is not doing this: else if (page == null) { page = getPage(requestCycle); } but else if (page == null) { page = newPage(getPageClass(), requestCycle); } johan On Mon, Oct 27, 2008 at 7:51 PM, aditsu [EMAIL PROTECTED] wrote: Hi, I thought about what you said, and debugged some more. Here's what I found out: Johan Compagner wrote: RequestCycle.isRedirect() is right, because that is a call that tells us must i redirect of i get a page redirect and with ajax this is always the case. Problem is that the BookmarkablePageRequestTarget.getPage(RC) should only create a page when it is not a redirect And that also correct. Actually, neither BehaviorRequestTarget nor AjaxRequestTarget ever check for redirect. As long as the target is not changed to something else, the redirect setting is ignored. AFAICT, the redirect-for-ajax thing is there so that *if* the *final* request target is something other than AjaxRequestTarget, it will cause a redirect. E.g. if in my handler method I set the response page to a bookmarkable page, then it should do a redirect indeed (that is, a javascript redirect, not an http 302). The problem is that my initial target is BookmarkableListenerInterfaceRequestTarget, before changing to AjaxRequestTarget, and wicket doesn't expect that. It sees a non-ajax target for an ajax request, so it just blindly says this is a redirect, when actually I'm not gonna do that. So I think isRedirect should NOT check for ajax unless it's at the RESPOND step. In the PROCESS_EVENTS step it should only check for the redirect flag. That would probably solve my problem and at the same time it would start to make sense. What do you think? Adrian -- View this message in context: http://www.nabble.com/Stateless-AJAX-links-tp20031309p20193967.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ajax form components principles
Because I want to trigger a show/hide for a textfield when the checkbox is checked/unchecked. -- View this message in context: http://www.nabble.com/Ajax-form-components-principles-tp20180246p20198345.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ajax form components principles
Anyway the point is that when using ajax components, the associated model is updated but the form may not be submitted yet, so how would you implement a cancel button to undo the ajax model updates ? Do we have to do all this by hand (storing ajax model updates in temporary variables and applying the values to the real models in the onSubmit method of the form) or is there another way ? -- View this message in context: http://www.nabble.com/Ajax-form-components-principles-tp20180246p20198434.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ajax form components principles
You can use wicketopia's ProxyModelManager, if you want: https://wicketopia.svn.sourceforge.net/svnroot/wicketopia/trunk/wicketopia/src/main/java/org/wicketopia/model/proxy/ProxyModelManager.java This way, you bind your components to proxied models. When you're ready to really write the values into the real models, you can call commit() on the manager and it'll take care of pushing the values from the proxied models into the actual models. On Mon, Oct 27, 2008 at 7:14 PM, Dreamage [EMAIL PROTECTED] wrote: Anyway the point is that when using ajax components, the associated model is updated but the form may not be submitted yet, so how would you implement a cancel button to undo the ajax model updates ? Do we have to do all this by hand (storing ajax model updates in temporary variables and applying the values to the real models in the onSubmit method of the form) or is there another way ? -- View this message in context: http://www.nabble.com/Ajax-form-components-principles-tp20180246p20198434.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ajax form components principles
you are using ajaxformcomponentupdatingbehavior which is made specifically for updating components. nothing is stopping you from using ajaxeventbehavior to bypass default form processing and do whatever you want however you want. what we offer here are the defaults, they do not use any special api that you do not have access to. if the default doesnt work how you want then roll your own. you might think that the default is backwards, but consider this: you are the first person to think its backwards in well over a couple of years that wicket had ajax support. -igor On Mon, Oct 27, 2008 at 4:14 PM, Dreamage [EMAIL PROTECTED] wrote: Anyway the point is that when using ajax components, the associated model is updated but the form may not be submitted yet, so how would you implement a cancel button to undo the ajax model updates ? Do we have to do all this by hand (storing ajax model updates in temporary variables and applying the values to the real models in the onSubmit method of the form) or is there another way ? -- View this message in context: http://www.nabble.com/Ajax-form-components-principles-tp20180246p20198434.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
GMap2 - GInfoWindow
I'm not sure who maintains GMap2 (Martin F?) - but I just created a class that allows me to show an info window when a GMarker is clicked. This could actually be abstracted to allow other calls on a GMarker fairly easily. Two questions: 1 - is there a better way already built in? (I couldn't find one) 2 - can you use this class or a better method to include this functionality in GMap2? Thanks for the GMap2 contribution!! (Class pasted below) -- Jeremy Thomerson http://www.wickettraining.com public class GInfoWindow extends AbstractBehavior { private static final long serialVersionUID = 1L; private GMap2 mMap; private final IModelString mHtmlModel; private final GMarker mMarker; public GInfoWindow(GMarker marker, String html) { mMarker = marker; mHtmlModel = new ModelString(html); } public GInfoWindow(GMarker marker, IModelString html) { mMarker = marker; mHtmlModel = html; } @Override public void bind(Component? component) { super.bind(component); if ((component instanceof GMap2) == false) { throw new IllegalStateException(must be added to a gmap2); } mMap = (GMap2) component; } @Override public void renderHead(IHeaderResponse response) { super.renderHead(response); CharSequence html = JavascriptUtils.escapeQuotes(mHtmlModel.getObject()); String call = overlays[ + mMarker.getId() + ].bindInfoWindowHtml(' + html + ', null); response.renderOnDomReadyJavascript(mMap.getJSinvoke(call)); } }
JFreeChart component
Hi, I recently developed a component that displays a chart generated from JFreeChart and includes the associated image map that allows the chart to generate tooltips and respond to user clicks, via an Ajax link. I thought this maybe useful to other people so I've included the files here. To use simply construct the MappedChart with you JFreeChart and provide an implementation of the onClickCallback function to respond to user clicks. Jonny http://www.nabble.com/file/p20200322/MappedChart.java MappedChart.java http://www.nabble.com/file/p20200322/MapArea.java MapArea.java http://www.nabble.com/file/p20200322/DynamicImageMap.java DynamicImageMap.java http://www.nabble.com/file/p20200322/ChartImage.java ChartImage.java http://www.nabble.com/file/p20200322/MappedChart.html MappedChart.html -- View this message in context: http://www.nabble.com/JFreeChart-component-tp20200322p20200322.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ajax form components principles
Thanks jwcarman, thats a very good track. I'll look into it. jwcarman wrote: You can use wicketopia's ProxyModelManager, if you want: https://wicketopia.svn.sourceforge.net/svnroot/wicketopia/trunk/wicketopia/src/main/java/org/wicketopia/model/proxy/ProxyModelManager.java This way, you bind your components to proxied models. When you're ready to really write the values into the real models, you can call commit() on the manager and it'll take care of pushing the values from the proxied models into the actual models. -- View this message in context: http://www.nabble.com/Ajax-form-components-principles-tp20180246p20200715.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Changing model of TextField with DDC
I have a search page that lets the use enter the search term in a TextField and select the field to search with a DDC. Using onSelectionChanged I am able to create a new TextField pointing to the new model that was selected in the DDC and everything works as expected. However, if I do not want to use javascript and the roundtrip for onSelectionChanged what would be the best way to implement this? Here is the onSelectionChanged method for clarification: protected void onSelectionChanged(Object o) { super.onSelectionChanged(o); field = new TextField(test,new PropertyModel(HomePage.this,o.toString())); if(val.equals(test3)) { field.add(NumberValidator.RangeValidator.range(100,200)); } f.addOrReplace(field); } Thanks, Ryan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Controlling tinyMCE component
So, for example, to disable the second toolbar row you can overwrite the toJavaScript method of the TinyMCESettings object and do something like Thanx, Seems just the right approach. The toJavaScript way will allow me to do even further customizations. Kind regards: al_shopov - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Editable drop down component
В 17:27 +0100 на 27.10.2008 (пн), Nino Saturnino Martinez Vazquez Wael написа: Theres also the object auto complete in wicketstuff... OK. I will look into both wicketstuff autocomplete and AutoCompleteTextField. On retrospect - my question is quite a beginners' one. Apart from Component reference here: http://wicketstuff.org/wicket13/compref/ is there another repository of short descriptions of components? Kind regards: al_shopov - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]