Listview containing links not working, when created through AJAX update
I have an application which worked in Wicket 1.5.x, but something seems to be broken, after updating to 6.1.1. I have a table listing machines on the left side. When an item is clicked, I update a table on the right using AJAX. This updated table contains a lot of AjaxLinks, but none of the them works. Clicking them triggers nothing. Nothing happens in my Firebug console. Looking at the ajax-response in Firebug, I see no header-contribution element in the response. I would expect, to see lines like this, in the header-contribution of the ajax-response, but nothing: Wicket.Ajax.ajax({u:./?3-4.IBehaviorListener.0-tabs-panel-list-computerli st.table-computerlist.table_body-computerlist.table.row-0-computerlist.table .row.link,e:click,c:idcd1});; Is this a bug, or have I missed something while upgrading from 1.5. til 6.1.1? Best regards Ais
Re: Only the first TextField in a repetition gets correct OnChangeAjaxBehavior with 1.5.1
Hello again, I still have this problem... (been working on other things) I've tracked the problem back to the request parameters simply not containing the expected values. This input name seems correct since I changed the market weight attribute of the second instrument: instruments:1:marketWeight But the HashMap containing parameter values ONLY contain this: {instruments:0:marketWeight=[17.602]} This results in me getting null as FormComponent input. Anyone know what I've done wrong? /Anders On 2011-10-13 13:46, Anders Peterson wrote: Here the (simplified) code that creates the ListViev, TextFields and Label. /Anders On 13 okt 2011, at 12:40, Anders Peterson wrote: Hi, Upgrading to wicket 1.5.1 from 1.4.18 my ajax updates stopped working. I have a page with a form. Inside the form there is a repetition (ListView) that among other things creates a text field for each item (ListItem). Each of those text fields has an OnChangeAjaxBehavior set that should update a label. The label should continously display the total sum of the numbers in the text fields. With wicket 1.4.18 (and previous versions) this worked fine. With 1.5.1 only the first text field in the repetition gets the correct ajax behavior - it works the way I want it, and the way it worked with 1.4.*. The other text fields are dead, except for focus set/removed. While typing in any of the other text fields nothing is updated (the ajax debug window shows no activity). When focus is removed I get a NullPointerException regardless of what I've changed. Is this a (known) bug, or is there a difference between 1.4 and 1.5 that I've missed? /Anders - 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
Solved: Only the first TextField in a repetition gets correct OnChangeAjaxBehavior with 1.5.1
The problem was in the html file. I used to have this: input name=marketWeight type=text id=marketWeight size=6 maxlength=6 wicket:id=marketWeight / Needed to change that to: input type=text size=6 maxlength=6 wicket:id=marketWeight / marketWeight is the component with the ajax behaviour, and it was in a ListView so I had several of them. I guess something related to replacing the name/id of a component changed from 1.4 to 1.5. /Anders On 2011-12-16 14:15, Anders Peterson wrote: Hello again, I still have this problem... (been working on other things) I've tracked the problem back to the request parameters simply not containing the expected values. This input name seems correct since I changed the market weight attribute of the second instrument: instruments:1:marketWeight But the HashMap containing parameter values ONLY contain this: {instruments:0:marketWeight=[17.602]} This results in me getting null as FormComponent input. Anyone know what I've done wrong? /Anders On 2011-10-13 13:46, Anders Peterson wrote: Here the (simplified) code that creates the ListViev, TextFields and Label. /Anders On 13 okt 2011, at 12:40, Anders Peterson wrote: Hi, Upgrading to wicket 1.5.1 from 1.4.18 my ajax updates stopped working. I have a page with a form. Inside the form there is a repetition (ListView) that among other things creates a text field for each item (ListItem). Each of those text fields has an OnChangeAjaxBehavior set that should update a label. The label should continously display the total sum of the numbers in the text fields. With wicket 1.4.18 (and previous versions) this worked fine. With 1.5.1 only the first text field in the repetition gets the correct ajax behavior - it works the way I want it, and the way it worked with 1.4.*. The other text fields are dead, except for focus set/removed. While typing in any of the other text fields nothing is updated (the ajax debug window shows no activity). When focus is removed I get a NullPointerException regardless of what I've changed. Is this a (known) bug, or is there a difference between 1.4 and 1.5 that I've missed? /Anders - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Only the first TextField in a repetition gets correct OnChangeAjaxBehavior with 1.5.1
Hi, Upgrading to wicket 1.5.1 from 1.4.18 my ajax updates stopped working. I have a page with a form. Inside the form there is a repetition (ListView) that among other things creates a text field for each item (ListItem). Each of those text fields has an OnChangeAjaxBehavior set that should update a label. The label should continously display the total sum of the numbers in the text fields. With wicket 1.4.18 (and previous versions) this worked fine. With 1.5.1 only the first text field in the repetition gets the correct ajax behavior - it works the way I want it, and the way it worked with 1.4.*. The other text fields are dead, except for focus set/removed. While typing in any of the other text fields nothing is updated (the ajax debug window shows no activity). When focus is removed I get a NullPointerException regardless of what I've changed. Is this a (known) bug, or is there a difference between 1.4 and 1.5 that I've missed? /Anders - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Only the first TextField in a repetition gets correct OnChangeAjaxBehavior with 1.5.1
Here the (simplified) code that creates the ListViev, TextFields and Label. /Anders final MyPageForm tmpForm = new MyPageForm(ID.FORM); this.add(tmpForm); final ContextLabelNumber tmpTotalWeightsLabel = new ContextLabelNumber(ID.TOTAL_WEIGHTS, new PropertyModelNumber(this.getPortfolio(), ID.TOTAL_WEIGHTS), StandardType.PERCENT); tmpTotalWeightsLabel.setOutputMarkupId(true); final ListViewBLMarketInstrument tmpMarketInstrumentListView = new ListViewBLMarketInstrument(ID.INSTRUMENTS, this.getPortfolio().getMarketInstruments()) { @Override public void populateItem(final ListItemBLMarketInstrument aListItem) { final BLMarketInstrument tmpMarketInstrument = aListItem.getModelObject(); final ContextTextFieldNumber tmpMarketWeightTextField = new ContextTextFieldNumber(ID.MARKET_WEIGHT, tmpMarketInstrument, StandardType.PERCENT); aListItem.add(tmpMarketWeightTextField); tmpMarketWeightTextField.add(new OnChangeAjaxBehavior() { @Override protected void onUpdate(final AjaxRequestTarget someTarget) { someTarget.add(tmpTotalWeightsLabel); } }); } }; tmpMarketInstrumentListView.setReuseItems(true); tmpForm.add(tmpMarketInstrumentListView); tmpForm.add(tmpTotalWeightsLabel); On 13 okt 2011, at 12:40, Anders Peterson wrote: Hi, Upgrading to wicket 1.5.1 from 1.4.18 my ajax updates stopped working. I have a page with a form. Inside the form there is a repetition (ListView) that among other things creates a text field for each item (ListItem). Each of those text fields has an OnChangeAjaxBehavior set that should update a label. The label should continously display the total sum of the numbers in the text fields. With wicket 1.4.18 (and previous versions) this worked fine. With 1.5.1 only the first text field in the repetition gets the correct ajax behavior - it works the way I want it, and the way it worked with 1.4.*. The other text fields are dead, except for focus set/removed. While typing in any of the other text fields nothing is updated (the ajax debug window shows no activity). When focus is removed I get a NullPointerException regardless of what I've changed. Is this a (known) bug, or is there a difference between 1.4 and 1.5 that I've missed? /Anders - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket 1.5 shared image resource and modal windows.
But even when I follow the guidelines from the wicketstuff images examples, I get the WARN - ResourceReferenceRegistry - Resource reference not added to registry. reference.canBeRegistered() == false Why cannot a shared reference be registered? A On Mon, Jul 4, 2011 at 10:41 PM, Anders Smestad anders.smes...@gmail.com wrote: Done: https://issues.apache.org/jira/browse/WICKET-3869 A On Mon, Jul 4, 2011 at 7:46 PM, Martin Grigorov mgrigo...@apache.org wrote: See how http://wicketstuff.org/wicket/images/ creates the images. If you can create a quickstart application that shows the problem then attach it to a ticket. On Mon, Jul 4, 2011 at 6:42 PM, Anders Smestad anders.smes...@gmail.com wrote: Hi. I have a simple (test) page with an ajax link that displays a modal window when clicked. The modal window contains some text and an image-link. The image is added to a link as link.add(new Image(image, sharedResourceReference); When displaying the modal window, everything displays correctly, but firstly, there is a warning in the log that says: WARN - ResourceReferenceRegistry - Resource reference not added to registry. reference.canBeRegistered() == false Then, not every time, but often, the stacktrace included at the bottom of this message appears in the log when using Internet Explorer. Using the network inspector tool (F12) in internet explorer shows that the image is first requested once, then the request is aborted (result: (Aborted)), then the same image is requested another time, this time it receives a 200 and the image is downloaded. None of these problems materialize when using other browsers than internet explorer. The image is a symbol for a link, and is a static image that will not change between redeployments of the application. What is the proper way to use such images. I have tried different approaches, * Using the wicket:link in markup * Using PackageResourceReference from java code * Using SharedResourceReference as described above * Registring the Image to the Application.get().getSharedResources().add(name, ...); and dereferencing it using new SharedResourceReference(name), then adding it to the link. It seems that either the image link gets rendered with the -ts00.ext (timestamp) extension, or the ?wicket:antiCache is appended, both seems unnecessary since it is a static image which could very well be cached on the browser. The SharedResourceReference seems like it would be the right class to use, but when adding the image to the page, the .canBeRegistered() == false is displayed. So finally, this is the question: What is the correct way to include static images, css and javascript resources in wicket, it seems there are multiple ways to do this, but none seems to do what I want. I also the resources to be contained with the component it is used with. Thanks in advance! A Stacktrace from log when using Internet Explorer. ERROR - DefaultExceptionMapper - Connection lost, give up responding. org.apache.wicket.protocol.http.servlet.ResponseIOException: org.mortbay.jetty.EofException at org.apache.wicket.protocol.http.servlet.ServletWebResponse.write(ServletWebResponse.java:120) at org.apache.wicket.protocol.http.HeaderBufferingWebResponse.write(HeaderBufferingWebResponse.java:168) at org.apache.wicket.request.resource.PackageResource$1.writeData(PackageResource.java:239) at org.apache.wicket.request.resource.AbstractResource.respond(AbstractResource.java:448) at org.apache.wicket.request.handler.resource.ResourceRequestHandler.respond(ResourceRequestHandler.java:77) at org.apache.wicket.request.handler.resource.ResourceReferenceRequestHandler.respond(ResourceReferenceRequestHandler.java:92) at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:717) at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:63) at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212) at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:253) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:160) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:216) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1112) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:363) at org.mortbay.jetty.security.ConstraintsSecurityHandler.handle(ConstraintsSecurityHandler.java:220) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:822) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:305
Re: Wicket 1.5 shared image resource and modal windows.
I see. So how do you usually include common images in your application? Say for instance you have a form button functionality, but you want it displayed as an image instead of the standard html button. Here we have used a button with an image, but the image gets rendered with the wicket:antiCache appended to the img src, but since this is a static image, it doesn't make much sense to have it anti-cached. Thanks again. A On Tue, Jul 5, 2011 at 10:22 AM, Martin Grigorov mgrigo...@apache.org wrote: We should revise this code. At least this shouldn't be a warning. I see it as debug. But as I said I need to look in this code first before I can comment. I personally don't use SharedResourceReferences in my app and thus never faced this issue. On Tue, Jul 5, 2011 at 10:13 AM, Anders Smestad anders.smes...@gmail.com wrote: But even when I follow the guidelines from the wicketstuff images examples, I get the WARN - ResourceReferenceRegistry - Resource reference not added to registry. reference.canBeRegistered() == false Why cannot a shared reference be registered? A On Mon, Jul 4, 2011 at 10:41 PM, Anders Smestad anders.smes...@gmail.com wrote: Done: https://issues.apache.org/jira/browse/WICKET-3869 A On Mon, Jul 4, 2011 at 7:46 PM, Martin Grigorov mgrigo...@apache.org wrote: See how http://wicketstuff.org/wicket/images/ creates the images. If you can create a quickstart application that shows the problem then attach it to a ticket. On Mon, Jul 4, 2011 at 6:42 PM, Anders Smestad anders.smes...@gmail.com wrote: Hi. I have a simple (test) page with an ajax link that displays a modal window when clicked. The modal window contains some text and an image-link. The image is added to a link as link.add(new Image(image, sharedResourceReference); When displaying the modal window, everything displays correctly, but firstly, there is a warning in the log that says: WARN - ResourceReferenceRegistry - Resource reference not added to registry. reference.canBeRegistered() == false Then, not every time, but often, the stacktrace included at the bottom of this message appears in the log when using Internet Explorer. Using the network inspector tool (F12) in internet explorer shows that the image is first requested once, then the request is aborted (result: (Aborted)), then the same image is requested another time, this time it receives a 200 and the image is downloaded. None of these problems materialize when using other browsers than internet explorer. The image is a symbol for a link, and is a static image that will not change between redeployments of the application. What is the proper way to use such images. I have tried different approaches, * Using the wicket:link in markup * Using PackageResourceReference from java code * Using SharedResourceReference as described above * Registring the Image to the Application.get().getSharedResources().add(name, ...); and dereferencing it using new SharedResourceReference(name), then adding it to the link. It seems that either the image link gets rendered with the -ts00.ext (timestamp) extension, or the ?wicket:antiCache is appended, both seems unnecessary since it is a static image which could very well be cached on the browser. The SharedResourceReference seems like it would be the right class to use, but when adding the image to the page, the .canBeRegistered() == false is displayed. So finally, this is the question: What is the correct way to include static images, css and javascript resources in wicket, it seems there are multiple ways to do this, but none seems to do what I want. I also the resources to be contained with the component it is used with. Thanks in advance! A Stacktrace from log when using Internet Explorer. ERROR - DefaultExceptionMapper - Connection lost, give up responding. org.apache.wicket.protocol.http.servlet.ResponseIOException: org.mortbay.jetty.EofException at org.apache.wicket.protocol.http.servlet.ServletWebResponse.write(ServletWebResponse.java:120) at org.apache.wicket.protocol.http.HeaderBufferingWebResponse.write(HeaderBufferingWebResponse.java:168) at org.apache.wicket.request.resource.PackageResource$1.writeData(PackageResource.java:239) at org.apache.wicket.request.resource.AbstractResource.respond(AbstractResource.java:448) at org.apache.wicket.request.handler.resource.ResourceRequestHandler.respond(ResourceRequestHandler.java:77) at org.apache.wicket.request.handler.resource.ResourceReferenceRequestHandler.respond(ResourceReferenceRequestHandler.java:92) at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:717) at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:63) at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212
Re: Wicket 1.5 shared image resource and modal windows.
Thanks! I'll try those options. A On Tue, Jul 5, 2011 at 11:45 AM, Martin Grigorov mgrigo...@apache.org wrote: You can use ContextImage and put the image itself next to WEB-INF folder. the anti-cache parameter is added to Image components so that they are re-rendered when added to AjaxRequestTarget with Wicket 1.5-RC5.1 there is org.apache.wicket.markup.html.image.Image.shouldAddAntiCacheParameter() which you can override and say to not add this parameter for images which you think should not be updated On Tue, Jul 5, 2011 at 11:35 AM, Anders Smestad anders.smes...@gmail.com wrote: I see. So how do you usually include common images in your application? Say for instance you have a form button functionality, but you want it displayed as an image instead of the standard html button. Here we have used a button with an image, but the image gets rendered with the wicket:antiCache appended to the img src, but since this is a static image, it doesn't make much sense to have it anti-cached. Thanks again. A On Tue, Jul 5, 2011 at 10:22 AM, Martin Grigorov mgrigo...@apache.org wrote: We should revise this code. At least this shouldn't be a warning. I see it as debug. But as I said I need to look in this code first before I can comment. I personally don't use SharedResourceReferences in my app and thus never faced this issue. On Tue, Jul 5, 2011 at 10:13 AM, Anders Smestad anders.smes...@gmail.com wrote: But even when I follow the guidelines from the wicketstuff images examples, I get the WARN - ResourceReferenceRegistry - Resource reference not added to registry. reference.canBeRegistered() == false Why cannot a shared reference be registered? A On Mon, Jul 4, 2011 at 10:41 PM, Anders Smestad anders.smes...@gmail.com wrote: Done: https://issues.apache.org/jira/browse/WICKET-3869 A On Mon, Jul 4, 2011 at 7:46 PM, Martin Grigorov mgrigo...@apache.org wrote: See how http://wicketstuff.org/wicket/images/ creates the images. If you can create a quickstart application that shows the problem then attach it to a ticket. On Mon, Jul 4, 2011 at 6:42 PM, Anders Smestad anders.smes...@gmail.com wrote: Hi. I have a simple (test) page with an ajax link that displays a modal window when clicked. The modal window contains some text and an image-link. The image is added to a link as link.add(new Image(image, sharedResourceReference); When displaying the modal window, everything displays correctly, but firstly, there is a warning in the log that says: WARN - ResourceReferenceRegistry - Resource reference not added to registry. reference.canBeRegistered() == false Then, not every time, but often, the stacktrace included at the bottom of this message appears in the log when using Internet Explorer. Using the network inspector tool (F12) in internet explorer shows that the image is first requested once, then the request is aborted (result: (Aborted)), then the same image is requested another time, this time it receives a 200 and the image is downloaded. None of these problems materialize when using other browsers than internet explorer. The image is a symbol for a link, and is a static image that will not change between redeployments of the application. What is the proper way to use such images. I have tried different approaches, * Using the wicket:link in markup * Using PackageResourceReference from java code * Using SharedResourceReference as described above * Registring the Image to the Application.get().getSharedResources().add(name, ...); and dereferencing it using new SharedResourceReference(name), then adding it to the link. It seems that either the image link gets rendered with the -ts00.ext (timestamp) extension, or the ?wicket:antiCache is appended, both seems unnecessary since it is a static image which could very well be cached on the browser. The SharedResourceReference seems like it would be the right class to use, but when adding the image to the page, the .canBeRegistered() == false is displayed. So finally, this is the question: What is the correct way to include static images, css and javascript resources in wicket, it seems there are multiple ways to do this, but none seems to do what I want. I also the resources to be contained with the component it is used with. Thanks in advance! A Stacktrace from log when using Internet Explorer. ERROR - DefaultExceptionMapper - Connection lost, give up responding. org.apache.wicket.protocol.http.servlet.ResponseIOException: org.mortbay.jetty.EofException at org.apache.wicket.protocol.http.servlet.ServletWebResponse.write(ServletWebResponse.java:120) at org.apache.wicket.protocol.http.HeaderBufferingWebResponse.write(HeaderBufferingWebResponse.java:168) at org.apache.wicket.request.resource.PackageResource$1.writeData(PackageResource.java:239) at org.apache.wicket.request.resource.AbstractResource.respond
Wicket 1.5 shared image resource and modal windows.
Hi. I have a simple (test) page with an ajax link that displays a modal window when clicked. The modal window contains some text and an image-link. The image is added to a link as link.add(new Image(image, sharedResourceReference); When displaying the modal window, everything displays correctly, but firstly, there is a warning in the log that says: WARN - ResourceReferenceRegistry - Resource reference not added to registry. reference.canBeRegistered() == false Then, not every time, but often, the stacktrace included at the bottom of this message appears in the log when using Internet Explorer. Using the network inspector tool (F12) in internet explorer shows that the image is first requested once, then the request is aborted (result: (Aborted)), then the same image is requested another time, this time it receives a 200 and the image is downloaded. None of these problems materialize when using other browsers than internet explorer. The image is a symbol for a link, and is a static image that will not change between redeployments of the application. What is the proper way to use such images. I have tried different approaches, * Using the wicket:link in markup * Using PackageResourceReference from java code * Using SharedResourceReference as described above * Registring the Image to the Application.get().getSharedResources().add(name, ...); and dereferencing it using new SharedResourceReference(name), then adding it to the link. It seems that either the image link gets rendered with the -ts00.ext (timestamp) extension, or the ?wicket:antiCache is appended, both seems unnecessary since it is a static image which could very well be cached on the browser. The SharedResourceReference seems like it would be the right class to use, but when adding the image to the page, the .canBeRegistered() == false is displayed. So finally, this is the question: What is the correct way to include static images, css and javascript resources in wicket, it seems there are multiple ways to do this, but none seems to do what I want. I also the resources to be contained with the component it is used with. Thanks in advance! A Stacktrace from log when using Internet Explorer. ERROR - DefaultExceptionMapper - Connection lost, give up responding. org.apache.wicket.protocol.http.servlet.ResponseIOException: org.mortbay.jetty.EofException at org.apache.wicket.protocol.http.servlet.ServletWebResponse.write(ServletWebResponse.java:120) at org.apache.wicket.protocol.http.HeaderBufferingWebResponse.write(HeaderBufferingWebResponse.java:168) at org.apache.wicket.request.resource.PackageResource$1.writeData(PackageResource.java:239) at org.apache.wicket.request.resource.AbstractResource.respond(AbstractResource.java:448) at org.apache.wicket.request.handler.resource.ResourceRequestHandler.respond(ResourceRequestHandler.java:77) at org.apache.wicket.request.handler.resource.ResourceReferenceRequestHandler.respond(ResourceReferenceRequestHandler.java:92) at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:717) at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:63) at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212) at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:253) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:160) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:216) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1112) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:363) at org.mortbay.jetty.security.ConstraintsSecurityHandler.handle(ConstraintsSecurityHandler.java:220) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:822) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:305) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:229) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:113) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:550) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:876) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:535) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:407) at
Re: Wicket 1.5 shared image resource and modal windows.
Done: https://issues.apache.org/jira/browse/WICKET-3869 A On Mon, Jul 4, 2011 at 7:46 PM, Martin Grigorov mgrigo...@apache.org wrote: See how http://wicketstuff.org/wicket/images/ creates the images. If you can create a quickstart application that shows the problem then attach it to a ticket. On Mon, Jul 4, 2011 at 6:42 PM, Anders Smestad anders.smes...@gmail.com wrote: Hi. I have a simple (test) page with an ajax link that displays a modal window when clicked. The modal window contains some text and an image-link. The image is added to a link as link.add(new Image(image, sharedResourceReference); When displaying the modal window, everything displays correctly, but firstly, there is a warning in the log that says: WARN - ResourceReferenceRegistry - Resource reference not added to registry. reference.canBeRegistered() == false Then, not every time, but often, the stacktrace included at the bottom of this message appears in the log when using Internet Explorer. Using the network inspector tool (F12) in internet explorer shows that the image is first requested once, then the request is aborted (result: (Aborted)), then the same image is requested another time, this time it receives a 200 and the image is downloaded. None of these problems materialize when using other browsers than internet explorer. The image is a symbol for a link, and is a static image that will not change between redeployments of the application. What is the proper way to use such images. I have tried different approaches, * Using the wicket:link in markup * Using PackageResourceReference from java code * Using SharedResourceReference as described above * Registring the Image to the Application.get().getSharedResources().add(name, ...); and dereferencing it using new SharedResourceReference(name), then adding it to the link. It seems that either the image link gets rendered with the -ts00.ext (timestamp) extension, or the ?wicket:antiCache is appended, both seems unnecessary since it is a static image which could very well be cached on the browser. The SharedResourceReference seems like it would be the right class to use, but when adding the image to the page, the .canBeRegistered() == false is displayed. So finally, this is the question: What is the correct way to include static images, css and javascript resources in wicket, it seems there are multiple ways to do this, but none seems to do what I want. I also the resources to be contained with the component it is used with. Thanks in advance! A Stacktrace from log when using Internet Explorer. ERROR - DefaultExceptionMapper - Connection lost, give up responding. org.apache.wicket.protocol.http.servlet.ResponseIOException: org.mortbay.jetty.EofException at org.apache.wicket.protocol.http.servlet.ServletWebResponse.write(ServletWebResponse.java:120) at org.apache.wicket.protocol.http.HeaderBufferingWebResponse.write(HeaderBufferingWebResponse.java:168) at org.apache.wicket.request.resource.PackageResource$1.writeData(PackageResource.java:239) at org.apache.wicket.request.resource.AbstractResource.respond(AbstractResource.java:448) at org.apache.wicket.request.handler.resource.ResourceRequestHandler.respond(ResourceRequestHandler.java:77) at org.apache.wicket.request.handler.resource.ResourceReferenceRequestHandler.respond(ResourceReferenceRequestHandler.java:92) at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:717) at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:63) at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212) at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:253) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:160) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:216) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1112) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:363) at org.mortbay.jetty.security.ConstraintsSecurityHandler.handle(ConstraintsSecurityHandler.java:220) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:822) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:305) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:229) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:113) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324
SubmitLink and popup window
Hi everybody, I have a page where a user inputs a number of values. The user them clicks on a calculate button, and the form is submitted. I would now like to display the calculated result in a popup page. Since SubmitLink does not support PopupSettings - I was wondering if anybody here have tried doing this before? I have seen a previous post, where Igor suggests the following: class popperupper extends abstractbehavior implements iheadercontributor { // some logic to only output the script once } button { onsubmit() { TextField tf=; String value=tf.getModelObject(); add(new popperupper()); }} I must however admit, I'm not quite following the example :-$ Med venlig hilsen/Best regards Anders Sørensen
Re: SubmitLink and popup window
Hi Jeremy, What a simple solution. If you just knew what I have tried. Many, many thanks. Med venlig hilsen/Best regards Anders Sørensen On Thu, Mar 4, 2010 at 9:35 AM, Jeremy Thomerson jer...@wickettraining.comwrote: Simply add target=_results in your form tag. -- Jeremy Thomerson http://www.wickettraining.com On Thu, Mar 4, 2010 at 8:09 AM, Anders Sørensen aisz...@gmail.com wrote: Hi everybody, I have a page where a user inputs a number of values. The user them clicks on a calculate button, and the form is submitted. I would now like to display the calculated result in a popup page. Since SubmitLink does not support PopupSettings - I was wondering if anybody here have tried doing this before? I have seen a previous post, where Igor suggests the following: class popperupper extends abstractbehavior implements iheadercontributor { // some logic to only output the script once } button { onsubmit() { TextField tf=; String value=tf.getModelObject(); add(new popperupper()); }} I must however admit, I'm not quite following the example :-$ Med venlig hilsen/Best regards Anders Sørensen
Submitlink and show popup page
Hi everybody, I have a page where a user inputs a number of values. The user them clicks on a calculate button, and the form is submitted. I would now like to display the calculated result in a popup page. Since SubmitLink does not support PopupSettings - I was wondering if anybody here have tried doing this before? I have seen a previous post, where Igor suggests the following: class popperupper extends abstractbehavior implements iheadercontributor { // some logic to only output the script once } button { onsubmit() { TextField tf=; String value=tf.getModelObject(); add(new popperupper()); }} I must however admit, I'm not quite following the example :-$ Med venlig hilsen/Best regards Anders Sørensen
Re: applet in wicket .. exception thrown ...
Try enabled logging on your webserver - that way you can see, where it tries to retrieve the class files from. It's a bit hard helping you, since I don't know the structure of your app, but I have an application running with multiple applets included, and it works fine with Wicket - as long, as the setup is correct. On Wed, Dec 16, 2009 at 11:27 AM, Shamil shaena...@gmail.com wrote: i need to add an applet to wicket.. and this is what i did... i wrote an applet and complied it.. i copied the class file of this applet and inserted it in to the webapp folder . and i inserted this in my HTML file... applet code=HelloWorld.class width=150 height=25 / but still i get a class not found exception , why is that how do i resolve it ??? any clue ?? -- Med venlig hilsen/Best regards Anders Sørensen
Problems with displaying modal window
Hello everybody. I have a webpage under development where I use modal windows. This has so fare not caused any problems - but now I get an error on one of my pages. I have just added the modal window capability to the page - so this has not worked before. When I click the button I get the following errors in Firefox (and the pages just reloads) Line 1: Error: undefined entity Source File: Line: 1, Column: 61 Source Code: div xmlns=http://www.w3.org/1999/xhtml;bINFO: /bUsingnbsp;XMLHttpRequest nbsp;transport/ (here there is a green error under nbsp;) Line 2: Error: uncaught exception: [Exception... Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMNSHTMLElement.innerHTML] nsresult: 0x80004003 (NS_ERROR_INVALID_POINTER) location: JS frame :: http://localhost:8080/resources/org.apache.wicket .ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js :: anonymous :: line 64 data: no] My guess to why I get this error is, that my page is defined as: ?xml version=1.0 encoding=UTF-8? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1 plus MathML 2.0//EN http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd; html xmlns=http://www.w3.org/1999/xhtml; The reason for this is, that I display MathML on the page. The modal window however does not contain MathML - it's just regular html. Environment: Wicket 1.4.3 JDK 1.6.0_17 Firefox 3.5.5 Does anybody have any input on this? -- Med venlig hilsen/Best regards Anders Sørensen
java.lang.NoClassDefFoundError: org/apache/wicket/util/lang/PropertyResolver
My environment: . Apache Tomcat/6.0.18 . JDK 1.6.0_12-b04 I got this weird message in tomcat log, too: Nov 4, 2009 12:13:03 AM org.apache.catalina.startup.HostConfig checkResources INFO: Reloading context [/acm] Nov 4, 2009 12:13:03 AM org.apache.catalina.core.ContainerBase stop INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/acm].[AppServlet] has not been started Nov 4, 2009 12:13:03 AM org.apache.catalina.core.ContainerBase stop INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/acm].[jsp] has not been started Nov 4, 2009 12:13:03 AM org.apache.catalina.core.ContainerBase stop INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/acm].[default] has not been started Nov 4, 2009 12:13:03 AM org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor processChildren SEVERE: Exception invoking periodic operation: java.lang.NoClassDefFoundError: org/apache/wicket/util/lang/PropertyResolver at org.apache.wicket.Application.internalDestroy(Application.java:887) at org.apache.wicket.protocol.http.WebApplication.internalDestroy(WebApplication.java:448) at org.apache.wicket.protocol.http.WicketFilter.destroy(WicketFilter.java:143) at org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:332) at org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:3744) at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4513) at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1108) at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1214) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590) at java.lang.Thread.run(Thread.java:619) Nov 4, 2009 12:13:03 AM org.apache.catalina.core.StandardContext reload INFO: Reloading this Context has started Nov 4, 2009 12:13:03 AM org.apache.catalina.core.ContainerBase stop INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/acm].[AppServlet] has not been started Nov 4, 2009 12:13:03 AM org.apache.catalina.core.ContainerBase stop INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/acm].[jsp] has not been started Nov 4, 2009 12:13:03 AM org.apache.catalina.core.ContainerBase stop INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/acm].[default] has not been started Nov 4, 2009 12:13:03 AM org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor processChildren SEVERE: Exception invoking periodic operation: java.lang.NoClassDefFoundError: org/apache/wicket/util/lang/PropertyResolver at org.apache.wicket.Application.internalDestroy(Application.java:887) at org.apache.wicket.protocol.http.WebApplication.internalDestroy(WebApplication.java:448) at org.apache.wicket.protocol.http.WicketFilter.destroy(WicketFilter.java:143) at org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:332) at org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:3744) at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4513) at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3093) at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:404) at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1309) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590) at java.lang.Thread.run(Thread.java:619) I checked wicket jar file, and org/apache/wicket/util/lang/PropertyResolver class does exist. Is it tomcat bug? Any one has any suggestion?
Problems with displaying modal window
Hello everybody. I have a webpage under development where I use modal windows. This has so fare not caused any problems - but now I get an error on one of my pages. I have just added the modal window capability to the page - so this has not worked before. When I click the button I get the following errors in Firefox (and the pages just reloads) Line 1: Error: undefined entity Source File: Line: 1, Column: 61 Source Code: div xmlns=http://www.w3.org/1999/xhtml;bINFO: /bUsingnbsp;XMLHttpRequestnbsp;transport/ (here there is a green error under nbsp;) Line 2: Error: uncaught exception: [Exception... Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMNSHTMLElement.innerHTML] nsresult: 0x80004003 (NS_ERROR_INVALID_POINTER) location: JS frame :: http://localhost:8080/resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js:: anonymous :: line 64 data: no] My guess to why I get this error is, that my page is defined as: ?xml version=1.0 encoding=UTF-8? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1 plus MathML 2.0//EN http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd; html xmlns=http://www.w3.org/1999/xhtml; The reason for this is, that I display MathML on the page. The modal window however does not contain MathML - it's just regular html. Environment: Wicket 1.4.3 JDK 1.6.0_16 Firefox 3.5.4 Does anybody have any input on this? -- Med venlig hilsen/Best regards Anders Sørensen
NullPointException in subclass of FormComponentFeedbackBorder
Hi, I'd like to customize FormComponentFeedbackBorder class to provide a error icon, so I extend FormComponentFeedbackBorder class and copy FormComponentFeedbackBorder.html from wicket source. I modify FormComponentFeedbackBorder.html to add below: wicket:border span wicket:id=errorIndicatorimg alt=Error! src=icon.gif/span style=color:red;!/spanbr//span wicket:body/ /wicket:border If I remove img tag from my html, my application works fine, but add img tag, it will show below exception message: WicketMessage: Exception in rendering component: [MarkupContainer [Component id = _header_0]] Root cause: java.lang.NullPointerException at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768) at org.apache.wicket.markup.MarkupCache$DefaultCacheImplementation.get(MarkupCache.java:744) at org.apache.wicket.markup.MarkupCache.removeMarkup(MarkupCache.java:131) at org.apache.wicket.markup.MarkupCache.loadMarkup(MarkupCache.java:491) at org.apache.wicket.markup.MarkupCache.loadMarkupAndWatchForChanges(MarkupCache.java:559) at org.apache.wicket.markup.MarkupCache.getMarkup(MarkupCache.java:325) at org.apache.wicket.markup.MarkupCache.getMarkupStream(MarkupCache.java:216) at org.apache.wicket.MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:351) at org.apache.wicket.markup.html.ContainerWithAssociatedMarkupHelper.renderHeadFromAssociatedMarkupFile(ContainerWithAssociatedMarkupHelper.java:72) at org.apache.wicket.markup.html.WebMarkupContainerWithAssociatedMarkup.renderHeadFromAssociatedMarkupFile(WebMarkupContainerWithAssociatedMarkup.java:73) at org.apache.wicket.markup.html.panel.Panel.renderHead(Panel.java:137) at org.apache.wicket.markup.html.internal.HtmlHeaderContainer$1.component(HtmlHeaderContainer.java:231) at org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:878) at org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:893) at org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:918) at org.apache.wicket.markup.html.internal.HtmlHeaderContainer.renderHeaderSections(HtmlHeaderContainer.java:222) at org.apache.wicket.markup.html.internal.HtmlHeaderContainer.onComponentTagBody(HtmlHeaderContainer.java:137) at org.apache.wicket.Component.renderComponent(Component.java:2626) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1536) at org.apache.wicket.Component.render(Component.java:2457) at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229) at org.apache.wicket.markup.resolver.HtmlHeaderResolver.resolve(HtmlHeaderResolver.java:80) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1441) at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1552) at org.apache.wicket.Page.onRender(Page.java:1545) at org.apache.wicket.Component.render(Component.java:2457) at org.apache.wicket.Page.renderPage(Page.java:914) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:262) at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1258) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428) at org.apache.wicket.RequestCycle.request(RequestCycle.java:545) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:289) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) at java.lang.Thread.run(Thread.java:619) Complete stack: org.apache.wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = _header_0]] at
Can't get attribute from AuthenticatedWebSession for no-role -needed page.
Hi, I can get the user id attribute from my authenticatedWebSession in a role-needed page. But I can't get user id when I go to no-role-needed page. Do I need to override newSession() method in WebApplication? Please help me~ Belows are my classes: public class HelloWorldApplication extends AuthenticatedWebApplication { @Override protected Class? extends AuthenticatedWebSession getWebSessionClass() { return MyAuthenticatedWebSession.class; } @Override protected Class? extends WebPage getSignInPageClass() { return MySignInPage.class; } } public class MyAuthenticatedWebSession extends AuthenticatedWebSession { public MyAuthenticatedWebSession(Request request) { super(request); } @Override public boolean authenticate(String username, String password) { //do some authentication process setAttribute(userId, username); return true; } @Override public Roles getRoles() { if(isSignedIn()) { Roles roles = getUserRoles(); if(roles == null) { roles = new Roles(); roles.add(ROLE_USER); } return roles; } return null; } public static MyAuthenticatedWebSession get() { return (MyAuthenticatedWebSession) Session.get(); } public String getUserId() { return (String) getAttribute(userId); } public Roles getUserRoles() { return (Roles) getAttribute(roles); } } -- -- ~Mia は 最高!~ --
Wicket + Spring Security (PreAuthentication)
Hi, I refered to http://cwiki.apache.org/WICKET/spring-security-and-wicket-auth-roles.htmland wicket-spring example web application and it works. Now my company has a single-sign on web page already, like https:///login.cgi. This SSO web page will set cookies and return a token after login. I'd like to know how to use PreAuthentication of spring-security with my company's SSO web page? -- -- ~Mia は 最高!~ --
Re: Have you ever run this example ?
I don't see any ctx variable in that web page. On Fri, Aug 28, 2009 at 10:37 PM, Altuğ B. Altıntaş alt...@gmail.comwrote: Hi all ; I am trying to run Spring Security and Wicket-auth-roles example. Url : http://cwiki.apache.org/WICKET/spring-security-and-wicket-auth-roles.html I implemented what it writes step by step but it gives : java.lang.IllegalArgumentException: Argument [[ctx]] cannot be null at org.apache.wicket.spring.injection.annot.SpringComponentInjector.init(SpringComponentInjector.java:93) at com.example.web.Setup.setListeners(Setup.java:41) at com.exaple.web.Setup.init(Setup.java:32) at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:696) . Any idea ? Or simple simple simple Spring Security and Wicket integration example. Note : I remember my old commodore - 64 days. I wrote hundreds of basic code and then it gives : syntax error :) opps urghh ! But still love wicket and its examples -- Altuğ. -- -- ~Mia は 最高!~ --
Re: Have you ever run this example ?
I'm new to Spring Security and Wicket, too. You said you implemented step by step, but no ctx variable in that web page. Can you recheck again? And do you succeed to implement http://cwiki.apache.org/WICKET/spring.html ? If you implemented Spring + Wicket, then you can implement Spring Security + Wicket easily. (I think) On Fri, Aug 28, 2009 at 11:33 PM, Altuğ B. Altıntaş alt...@gmail.comwrote: How can i add ctx variable ? I am new in Spring Security Thanks... 2009/8/28 Anders innocentl...@gmail.com I don't see any ctx variable in that web page. On Fri, Aug 28, 2009 at 10:37 PM, Altuğ B. Altıntaş alt...@gmail.com wrote: Hi all ; I am trying to run Spring Security and Wicket-auth-roles example. Url : http://cwiki.apache.org/WICKET/spring-security-and-wicket-auth-roles.html I implemented what it writes step by step but it gives : java.lang.IllegalArgumentException: Argument [[ctx]] cannot be null at org.apache.wicket.spring.injection.annot.SpringComponentInjector.init(SpringComponentInjector.java:93) at com.example.web.Setup.setListeners(Setup.java:41) at com.exaple.web.Setup.init(Setup.java:32) at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:696) . Any idea ? Or simple simple simple Spring Security and Wicket integration example. Note : I remember my old commodore - 64 days. I wrote hundreds of basic code and then it gives : syntax error :) opps urghh ! But still love wicket and its examples -- Altuğ. -- -- ~Mia は 最高!~ -- -- Altuğ. -- -- ~Mia は 最高!~ --
About getSignInPageClass() in AuthenticatedWebApplication class
Hi, I'd like to ask what if the login page is external login web page? I have no idea which class should be returned in getSignInPageClass(), Please give me some advices. Thank you very much -- -- ~Mia は 最高!~ --
org.apache.wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = login]]
What exactly does this stacktrace (below) mean? In development, eclipse jetty, the application works fine. When deployed (tomcat) the app cannot render login page (I suppose it can't render anything). /Anders WicketMessage: Exception in rendering component: [MarkupContainer [Component id = login]] Root cause: java.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks) at java .security .AccessControlContext.checkPermission(AccessControlContext.java:342) at java.security.AccessController.checkPermission(AccessController.java: 553) at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) at java.lang.reflect.AccessibleObject.setAccessible(AccessibleObject.java: 125) at org.apache.wicket.util.lang.PropertyResolver $MethodGetAndSet.init(PropertyResolver.java:1044) at org .apache .wicket .util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:459) at org .apache .wicket .util .lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:281) at org .apache .wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:90) at org .apache .wicket .model.AbstractPropertyModel.getObject(AbstractPropertyModel.java:117) at org.apache.wicket.Component.getDefaultModelObject(Component.java: 1653) at org .apache.wicket.Component.getDefaultModelObjectAsString(Component.java: 1675) at org .apache .wicket .markup.html.form.FormComponent.getModelValue(FormComponent.java:1367) at org .apache .wicket.markup.html.form.FormComponent.getValue(FormComponent.java:869) at org .apache .wicket.markup.html.form.TextField.onComponentTag(TextField.java:106) at org.apache.wicket.Component.renderComponent(Component.java:2600) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1525) at org.apache.wicket.Component.render(Component.java:2454) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java: 1403) at org .apache .wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java: 1590) at org .apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java: 1514) at org.apache.wicket.markup.html.form.Form.onComponentTagBody(Form.java: 1897) at org.apache.wicket.Component.renderComponent(Component.java:2629) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1525) at org.apache.wicket.markup.html.form.Form.onRender(Form.java:1968) at org.apache.wicket.Component.render(Component.java:2454) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java: 1403) at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java: 1541) at org.apache.wicket.Page.onRender(Page.java:1547) at org.apache.wicket.Component.render(Component.java:2454) at org.apache.wicket.Page.renderPage(Page.java:914) at org .apache .wicket .request .target .component .BookmarkablePageRequestTarget .respond(BookmarkablePageRequestTarget.java:262) at org .apache .wicket .request .AbstractRequestCycleProcessor .respond(AbstractRequestCycleProcessor.java:105) at org .apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java: 1248) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1319) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1418) at org.apache.wicket.RequestCycle.request(RequestCycle.java:544) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java: 456) at org .apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java: 289) at java.lang.reflect.Method.invoke(Method.java:616) at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java: 244) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAsPrivileged(Subject.java:537) at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java: 276) at org .apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java: 218) at org .apache .catalina .core .ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 230) at org.apache.catalina.core.ApplicationFilterChain.access $000(ApplicationFilterChain.java:56) at org.apache.catalina.core.ApplicationFilterChain $1.run(ApplicationFilterChain.java:189) at java.security.AccessController.doPrivileged(Native Method) at org .apache .catalina .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185) at org .apache .catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java: 233) at org .apache .catalina.core.StandardContextValve.invoke(StandardContextValve.java: 191) at org .apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java: 128) at org .apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java: 102) at org .apache .catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java: 286) at org.apache.coyote.http11
Re: org.apache.wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = login]]
Thank you, it was the security manager. On Ubuntu Server it is turned on as a default. I turned it off by editing the file /etc/default/tomcat6. Set TOMCAT6_SECURITY=no. /Anders On 11 maj 2009, at 10.24, Anders Peterson wrote: What exactly does this stacktrace (below) mean? In development, eclipse jetty, the application works fine. When deployed (tomcat) the app cannot render login page (I suppose it can't render anything). /Anders WicketMessage: Exception in rendering component: [MarkupContainer [Component id = login]] Root cause: java.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks) at java .security .AccessControlContext.checkPermission(AccessControlContext.java:342) at java.security.AccessController.checkPermission(AccessController.java: 553) at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) at java .lang.reflect.AccessibleObject.setAccessible(AccessibleObject.java: 125) at org.apache.wicket.util.lang.PropertyResolver $MethodGetAndSet.init(PropertyResolver.java:1044) at org .apache .wicket .util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:459) at org .apache .wicket .util .lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java: 281) at org .apache .wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:90) at org .apache .wicket .model.AbstractPropertyModel.getObject(AbstractPropertyModel.java:117) at org.apache.wicket.Component.getDefaultModelObject(Component.java: 1653) at org .apache .wicket.Component.getDefaultModelObjectAsString(Component.java:1675) at org .apache .wicket .markup.html.form.FormComponent.getModelValue(FormComponent.java:1367) at org .apache .wicket.markup.html.form.FormComponent.getValue(FormComponent.java: 869) at org .apache .wicket.markup.html.form.TextField.onComponentTag(TextField.java:106) at org.apache.wicket.Component.renderComponent(Component.java:2600) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java: 1525) at org.apache.wicket.Component.render(Component.java:2454) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java: 1403) at org .apache .wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java: 1590) at org .apache .wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1514) at org.apache.wicket.markup.html.form.Form.onComponentTagBody(Form.java: 1897) at org.apache.wicket.Component.renderComponent(Component.java:2629) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java: 1525) at org.apache.wicket.markup.html.form.Form.onRender(Form.java:1968) at org.apache.wicket.Component.render(Component.java:2454) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java: 1403) at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java: 1541) at org.apache.wicket.Page.onRender(Page.java:1547) at org.apache.wicket.Component.render(Component.java:2454) at org.apache.wicket.Page.renderPage(Page.java:914) at org .apache .wicket .request .target .component .BookmarkablePageRequestTarget .respond(BookmarkablePageRequestTarget.java:262) at org .apache .wicket .request .AbstractRequestCycleProcessor .respond(AbstractRequestCycleProcessor.java:105) at org .apache .wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1248) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1319) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1418) at org.apache.wicket.RequestCycle.request(RequestCycle.java:544) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java: 456) at org .apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java: 289) at java.lang.reflect.Method.invoke(Method.java:616) at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java: 244) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAsPrivileged(Subject.java:537) at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java: 276) at org .apache .catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:218) at org .apache .catalina .core .ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 230) at org.apache.catalina.core.ApplicationFilterChain.access $000(ApplicationFilterChain.java:56) at org.apache.catalina.core.ApplicationFilterChain $1.run(ApplicationFilterChain.java:189) at java.security.AccessController.doPrivileged(Native Method) at org .apache .catalina .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185) at org .apache .catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java: 233) at org .apache .catalina.core.StandardContextValve.invoke(StandardContextValve.java: 191) at org .apache .catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org .apache
Re: [OT] wicket users around the world
Taipei, Taiwan !! Taiwan is not part of China~ We are independent for long time ago! I am using Wicket for production line process.
How can I use I18N in panel before add panel to a page?
Hi, I writed my own wicket panel component, and this component contains a label. I use Component's getString() to set label's model, like: *//constructor* * public InvoiceWaferDataSetPanel(String id, InvoiceWaferDataSet dataSet) { super(id); setModel(new CompoundPropertyModel(dataSet)); ... add(new Label(subTotal, getString(subTotal)).add(new AttributeModifier(style, true, new Model(dataSet.getSize() 1?:display:none; ... }* but below is warning message from wicket: *[Localizer] Tried to retrieve a localized string for a component that has not yet been added to the page. This can sometimes lead to an invalid or no localized resource returned. Make sure you are not calling Component#getString() inside your Component's constructor. Offending component: [MarkupContainer [Component id = dataSet, page = No Page, path = dataSet.InvoiceWaferDataSetPanel]]* I defined I18N string in application properties file, like: subTotal = Sub Total Can anyone tell me how to solve this problem? -- −− ~Mia は 最高!~ −−
Re: How can I use I18N in panel before add panel to a page?
Thank you, Jeremy. 2008/11/14 Jeremy Thomerson [EMAIL PROTECTED] Use StringResourceModel. 2008/11/13 Anders [EMAIL PROTECTED] Hi, I writed my own wicket panel component, and this component contains a label. I use Component's getString() to set label's model, like: *//constructor* * public InvoiceWaferDataSetPanel(String id, InvoiceWaferDataSet dataSet) { super(id); setModel(new CompoundPropertyModel(dataSet)); ... add(new Label(subTotal, getString(subTotal)).add(new AttributeModifier(style, true, new Model(dataSet.getSize() 1?:display:none; ... }* but below is warning message from wicket: *[Localizer] Tried to retrieve a localized string for a component that has not yet been added to the page. This can sometimes lead to an invalid or no localized resource returned. Make sure you are not calling Component#getString() inside your Component's constructor. Offending component: [MarkupContainer [Component id = dataSet, page = No Page, path = dataSet.InvoiceWaferDataSetPanel]]* I defined I18N string in application properties file, like: subTotal = Sub Total Can anyone tell me how to solve this problem? -- −− ~Mia は 最高!~ −− -- Jeremy Thomerson http://www.wickettraining.com -- −− ~Mia は 最高!~ −−
Re: setOutputMarkupId and Ajax
Why can't all components always output that id? Or can't it be a global option to turn it on/off for all components? Is there some situation where you do not want that id? /Anders Igor Vaynberg wrote: like which ones? -igor On Fri, Oct 3, 2008 at 12:44 PM, Rob Sonke [EMAIL PROTECTED] wrote: I understand that but why not adding it by default to the constructor of all ajax components? Rob Igor Vaynberg wrote: wicket only knows that the component needs it when you add it to the ajax request target. by the time you add it to the ART the component has already been rendered into the browser during the previous request, and so its too late at this point - all we can do is warn you. -igor On Fri, Oct 3, 2008 at 11:01 AM, Mathias P.W Nilsson [EMAIL PROTECTED] wrote: Hi! I don't know if this has already been answered but here it goes. When use Ajax with wicket you have to set the the component to output it's markup id or else wicket framework complains about not having it set. Now Why isn't the components markup set automatically when wicket knows about it? Why not skip this, for ajax anyway. If you want to do some other javascript the output it but otherwise wicket could take care of it or maybe I'm missing something. // Mathias -- View this message in context: http://www.nabble.com/setOutputMarkupId-and-Ajax-tp19802839p19802839.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] - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OnChangeAjaxBehavior in ListView
Just browsed through my new copy of Wicket in Action. There are warnings to use Wicket/Ajax with tables and ListView - I have both. However the discussed problems seems to be mainly related to refreshing. My problem is that several component models get updated when only one 'TextField' was edited; therefore the refreshed components gets an incorrect value. When/if I submit the form the usual (non ajax) way everything is corrected. /Anders Anders Peterson wrote: Here the code, html and Java fragments, for the tr. /Anders Timo Rantalaiho wrote: On Mon, 29 Sep 2008, Anders Peterson wrote: I'm using OnChangeAjaxBehavior with a TextField. The TextField is in a table cell that is repeated using a ListView. When I change the value of one of the TextFields more than one of the underlying models get updated - the one that was supposed to be updated and all following in the list. If I modify the first TextField then all underlying models get the same value. If I modify the second then all except the first... Hello, It sounds like all your TextFields models would be connected to each other. Show us the code and we'll see. Best wishes, Timo - 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: OnChangeAjaxBehavior in ListView
Here the code, html and Java fragments, for the tr. /Anders Timo Rantalaiho wrote: On Mon, 29 Sep 2008, Anders Peterson wrote: I'm using OnChangeAjaxBehavior with a TextField. The TextField is in a table cell that is repeated using a ListView. When I change the value of one of the TextFields more than one of the underlying models get updated - the one that was supposed to be updated and all following in the list. If I modify the first TextField then all underlying models get the same value. If I modify the second then all except the first... Hello, It sounds like all your TextFields models would be connected to each other. Show us the code and we'll see. Best wishes, Timo ListViewBLView tmpViews = new ListViewBLView(ID.VIEWS, this.getPortfolio().getViews()) { @Override public void populateItem(ListItemBLView aViewsListItem) { final BLView tmpView = aViewsListItem.getModelObject(); final ContextLabelNumber tmpTotalWeightLabel = new ContextLabelNumber(ID.TOTAL_WEIGHTS, new PropertyModelNumber(tmpView, ID.TOTAL_WEIGHTS), StandardType.PERCENT); tmpTotalWeightLabel.setOutputMarkupId(true); aViewsListItem.add(new TextFieldString(ID.NAME, new PropertyModelString(tmpView, ID.NAME))); aViewsListItem.add(new DeleteView(ID.DELETE, new ModelBLView(tmpView))); LoadableDetachableModelNumber tmpMarketReturnModel = new LoadableDetachableModelNumber() { @Override protected BigDecimal load() { return myPage.getBlackLittermanModel().calculatePortfolioReturn(tmpView.getWeightList()); } }; aViewsListItem.add(new ContextLabelNumber(ID.PORTFOLIO_RETURN, tmpMarketReturnModel, StandardType.PERCENT)); aViewsListItem.add(new ContextTextFieldNumber(ID.RETURN, new PropertyModelNumber(tmpView, ID.RETURN), StandardType.PERCENT)); ListViewViewWeight tmpViewWeightTextFields = new ListViewViewWeight(ID.WEIGHTS, tmpView.getViewWeights()) { @Override protected void populateItem(ListItemViewWeight aViewWeightsListItem) { final ViewWeight tmpViewWeight = aViewWeightsListItem.getModelObject(); ContextTextFieldNumber tmpWeightTextField = new ContextTextFieldNumber(ID.WEIGHT, new PropertyModelNumber(tmpViewWeight, ID.WEIGHT), StandardType.PERCENT); aViewWeightsListItem.add(tmpWeightTextField); tmpWeightTextField.add(new OnChangeAjaxBehavior() { @Override protected void onUpdate(AjaxRequestTarget aWeightTextFieldChangeTarget) { System.out.println(AJAX!); System.out.println(THIS ViewWeight: + tmpViewWeight); for (ViewWeight tmpVW : tmpViewWeight.getView().getViewWeights()) { System.out.println(LOOP ALL ViewWeights: + tmpVW); } System.out.println(); aWeightTextFieldChangeTarget.addComponent(tmpTotalWeightLabel); } }); } }; aViewsListItem.add(tmpViewWeightTextFields); aViewsListItem.add(tmpTotalWeightLabel); }; }; tr wicket:id=views td scope=colinput name=name type=text id=name size=16 wicket:id=name //td td scope=cola wicket:id=delete href=/se/optimatika/blapp/gui/PgInputViews.htmlimg src=images/minus.gif alt=Delete View width=14 height=14 hspace=1 vspace=3 border=0 //a/td td scope=coldiv align=rightspan wicket:id=portfolioReturn1.2%/span/div/td td scope=coldiv align=center div align=right input name=return type=text id=return size=8 wicket:id=return / /div /div/td th scope=col@/th td wicket:id=weights scope=coldiv align=right input name=weight type=text id=weight size=7 maxlength=8 wicket:id=weight / /div/td th scope=col=/th td scope=coldiv align=rightspan wicket:id=totalWeights100.00%/span/div/td /tr- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OnChangeAjaxBehavior in ListView
Hi, I'm using OnChangeAjaxBehavior with a TextField. The TextField is in a table cell that is repeated using a ListView. When I change the value of one of the TextFields more than one of the underlying models get updated - the one that was supposed to be updated and all following in the list. If I modify the first TextField then all underlying models get the same value. If I modify the second then all except the first... Anyone else seen this? Wicket 1.4M3 /Anders - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with DropDownChoice on 1.4M3
My DropDownChoice always displays as if nothing is selected. Using it works fine, but every time the page is (re)loaded the selection is reset. wantOnSelectionChangedNotifications return true. I have an older version of my app deployed (using an older version of Wicket) that works as expected. Is this a known problem or could I be doing something wrong? /Anders - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with DropDownChoice on 1.4M3
This is the code that creates the DropDownChoice: myForm.add(new DropDownChoiceBLView(views, this.getPortfolio().getViews(), new ChoiceRendererBLView(toDisplayString)) { @Override protected void onSelectionChanged(BLView newSelection) { super.onSelectionChanged(newSelection); ...; } @Override protected boolean wantOnSelectionChangedNotifications() { return true; } }); Nothing strange... /Anders Daan van Etten wrote: On 17 sep 2008, at 14:55, Anders Peterson wrote: My DropDownChoice always displays as if nothing is selected. Using it works fine, but every time the page is (re)loaded the selection is reset. wantOnSelectionChangedNotifications return true. I have an older version of my app deployed (using an older version of Wicket) that works as expected. Is this a known problem or could I be doing something wrong? You could be doing something wrong. Do you set the model of the DropDownChoice? Show us some code. Regards, Daan - 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]
SOLVED Re: Problem with DropDownChoice on 1.4M3
Isn't it always like this; as soon as you ask someone you start thinking about the problem differently. Or should I say you start thinking straight. The problem was, of course, with the equals-method of the listed objects (two instances of that class would never be equal). Thanks for being there! /Anders Anders Peterson wrote: This is the code that creates the DropDownChoice: myForm.add(new DropDownChoiceBLView(views, this.getPortfolio().getViews(), new ChoiceRendererBLView(toDisplayString)) { @Override protected void onSelectionChanged(BLView newSelection) { super.onSelectionChanged(newSelection); ...; } @Override protected boolean wantOnSelectionChangedNotifications() { return true; } }); Nothing strange... /Anders Daan van Etten wrote: On 17 sep 2008, at 14:55, Anders Peterson wrote: My DropDownChoice always displays as if nothing is selected. Using it works fine, but every time the page is (re)loaded the selection is reset. wantOnSelectionChangedNotifications return true. I have an older version of my app deployed (using an older version of Wicket) that works as expected. Is this a known problem or could I be doing something wrong? You could be doing something wrong. Do you set the model of the DropDownChoice? Show us some code. Regards, Daan - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket 1.4M3 migration
I used M2 and had no problem with it. When I heard talk about decoupling the components and the models, for M3, I thought that seemed a good idea. Now I use M3. It works fine, but I think generics for components is implemented upside down. I think M3 should have been M2 with generics turned off where it wasn't needed. /Anders Ned Collyer wrote: I've just converted over a project to 1.4-m3 from m1. I skipped m2 because of the drastic changes between 1, 2 and 3. I must say, I think generics at a component level - when I initially started using it felt like unneeded overhead - but it became more and more useful. now that I've changed to 1.4-m3 - Many parts of the project start to feel like unneeded cast soup - even if it is just reimplementing getModel or getModelObject over and over. It's a change that I found a bit hard to visualise the impact until I made the switch. I must say m1 generics felt more powerful and appropriate for all the circumstances i've come across... with the exception of having to generify things like Label. Anyway, Thats my feedback after the switch. Timo Rantalaiho wrote: On Fri, 18 Jul 2008, Stefan Lindner wrote: Thank you all for your work on wicket! Maybe we can see Wicket 1.4.0 final in the near future? Thanks for the feedback and the thanks! There are still 30+ open issues for 1.4 https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=truepid=12310561fixfor=12313295resolution=-1sorter/field=issuekeysorter/order=DESC and besides those, probably many places where raw versions of generic types are used and which should be fixed. So I wouldn't hold my breath :) Best wishes, Timo -- Timo Rantalaiho Reaktor Innovations OyURL: http://www.ri.fi/ - 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]
Just switched to 1.4-M3
Hi, I've not been able to follow the discussion on generics (simply too much) but now that I've switched to 1.4-M3 I have a comment/question. Generally I think wicket is going in the right direction regarding generics... Another (great) web application framework that I've used doesn't have component at the root of the inheritance tree, but element - component extends element. The elements are the UI atoms, and components are complete or partial pages. I think elements should be generified, but not components. As it is now Component is not generified, but further down you introduce generics to some components that you feel benefit from it. I think you should do it the other way around. Have a root - Element - that is generified, and then have a Component class where you fix the type parameter to something suitable. To me the elements - the basic building blocks - are closely related to their models and converters, but complete or partial pages are not. 1) I think Label should be generified the way TextField is. (It would be if they both inherited from Element.) 2) I think think the Model and Converter of TextField should be generified with the same type parameter as TextField itself - the way it was in M2. (This could be defined in Element.) /Anders - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Just switched to 1.4-M3
Sorry... I guess generics design has been discussed enough. /Anders Igor Vaynberg wrote: On Fri, Jul 18, 2008 at 4:52 AM, Anders Peterson wrote: As it is now Component is not generified, but further down you introduce generics to some components that you feel benefit from it. I think you should do it the other way around. Have a root - Element - that is generified, and then have a Component class where you fix the type parameter to something suitable. To me the elements - the basic building blocks - are closely related to their models and converters, but complete or partial pages are not. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: users, please give us your opinion: what is your take on generics with Wicket
Eelco Hillenius wrote: 1) Generifying* Wicket [x] Can best be done like currently in the 1.4 branch, where models [x] Can best be done in a limited fashion, where we only generify Both are acceptable to me 2) How strongly do you feel about your choice above? [x] I definitively won't be using 1.4. if Wicket doesn't go for my Not sure about definitely, but if IModel isn't generified I'll evaluate other frameworks for my next project. /Anders - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OutOfMemoryError when deploying (only)
Hi, I've got a problem when deploying my wicket application. I deploy to Tomcat 5.5 on Linux. The problem is that I get an OutOfMemoryError when viewing one particular page. I can go straight from starting Tomcat to accessing that page and get the error - there is no history. That kind of behavior would suggest that you've done something seriously/obviously wrong. But, when I run/debug the application in eclipse it behaves perfectly normal. How can I get info from Tomcat regarding what's happening? /Anders - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OutOfMemoryError when deploying (only)
Problem seems to be fixed... I was building/deploying my application using wicket 1.3.3. Tomcat on the deployment server had wicket-examples-1.3.0 installed. When I removed that the problem disappeared. /Anders Anders Peterson wrote: Hi, I've got a problem when deploying my wicket application. I deploy to Tomcat 5.5 on Linux. The problem is that I get an OutOfMemoryError when viewing one particular page. I can go straight from starting Tomcat to accessing that page and get the error - there is no history. That kind of behavior would suggest that you've done something seriously/obviously wrong. But, when I run/debug the application in eclipse it behaves perfectly normal. How can I get info from Tomcat regarding what's happening? /Anders - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [announce] Wicket 1.3 has been branched, trunk is now 1.4
How far away is wicket with generics? /Anders Martijn Dashorst wrote: If you are depending on trunk and build your own Wicket versions, please note that trunk is now Wicket 1.4 and will be used for the next Wicket version. If you wish to continue building 1.3 jars then switch your local checkout to: svn switch https://svn.apache.org/repos/asf/wicket/branches/wicket-1.3.x Martijn - 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: Strange Exception
That wasn't it. Just happened again... /Anders Anders Peterson wrote: No (don't know what it is). I think maybe this problem was caused by the RunJettyRun plugin picking up my wicket-1.3.0 jars that I had forgotten to delete from my project. I did not reference those jars, but the files where still in my project directory. I did some general update all plugins and project cleaning. Then the problem disappeared. There wasn't much to clean, but I did have that older version of wicket still in the project directory. (Must have had it there since 1.3.1 was released.) /Anders Igor Vaynberg wrote: are you using class reloading filter? -igor On Sun, Feb 24, 2008 at 7:57 AM, Anders Peterson [EMAIL PROTECTED] wrote: Hi, I (sometimes) get a strange Exception. You can see the stacktrace in the attached file. The problem appears (sometimes) when I submit a form. Just displaying data/pages is never a problem. At first glance it seems I get a ClassCastException when doing public static BLAppSession getCurrent() { return (BLAppSession) Session.get(); } Debugging the code I cannot see anything (obviously) wrong with my Session subclass. Something else must be the actual problem. What does this mean: SEVERE: there was an error cleaning up target [EMAIL PROTECTED] class = se.optimatika.blapp.gui.PgEvaluateResults, id = 4, version = 0]-image2-IResourceListener. Use Wicket 1.3.1. /Anders Feb 24, 2008 3:54:00 PM sun.reflect.NativeMethodAccessorImpl invoke0 INFO: Logging to org.slf4j.impl.JDK14LoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog Feb 24, 2008 3:54:00 PM sun.reflect.NativeMethodAccessorImpl invoke0 INFO: jetty-6.1.6 Feb 24, 2008 3:54:01 PM org.apache.wicket.Application callInitializers INFO: [BLApp] init: Wicket core library initializer Feb 24, 2008 3:54:01 PM org.apache.wicket.RequestListenerInterface registerRequestListenerInterface INFO: registered listener interface [RequestListenerInterface name=IBehaviorListener, method=public abstract void org.apache.wicket.behavior.IBehaviorListener.onRequest()] Feb 24, 2008 3:54:01 PM org.apache.wicket.RequestListenerInterface registerRequestListenerInterface INFO: registered listener interface [RequestListenerInterface name=IBehaviorListener, method=public abstract void org.apache.wicket.behavior.IBehaviorListener.onRequest()] Feb 24, 2008 3:54:01 PM org.apache.wicket.RequestListenerInterface registerRequestListenerInterface INFO: registered listener interface [RequestListenerInterface name=IFormSubmitListener, method=public abstract void org.apache.wicket.markup.html.form.IFormSubmitListener.onFormSubmitted()] Feb 24, 2008 3:54:01 PM org.apache.wicket.RequestListenerInterface registerRequestListenerInterface INFO: registered listener interface [RequestListenerInterface name=IFormSubmitListener, method=public abstract void org.apache.wicket.markup.html.form.IFormSubmitListener.onFormSubmitted()] Feb 24, 2008 3:54:01 PM org.apache.wicket.RequestListenerInterface registerRequestListenerInterface INFO: registered listener interface [RequestListenerInterface name=ILinkListener, method=public abstract void org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()] Feb 24, 2008 3:54:01 PM org.apache.wicket.RequestListenerInterface registerRequestListenerInterface INFO: registered listener interface [RequestListenerInterface name=ILinkListener, method=public abstract void org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()] Feb 24, 2008 3:54:01 PM org.apache.wicket.RequestListenerInterface registerRequestListenerInterface INFO: registered listener interface [RequestListenerInterface name=IOnChangeListener, method=public abstract void org.apache.wicket.markup.html.form.IOnChangeListener.onSelectionChanged()] Feb 24, 2008 3:54:01 PM org.apache.wicket.RequestListenerInterface registerRequestListenerInterface INFO: registered listener interface [RequestListenerInterface name=IOnChangeListener, method=public abstract void org.apache.wicket.markup.html.form.IOnChangeListener.onSelectionChanged()] Feb 24, 2008 3:54:01 PM org.apache.wicket.RequestListenerInterface registerRequestListenerInterface INFO: registered listener interface [RequestListenerInterface name=IRedirectListener, method=public abstract void org.apache.wicket.IRedirectListener.onRedirect()] Feb 24, 2008 3:54:01 PM org.apache.wicket.RequestListenerInterface registerRequestListenerInterface INFO: registered listener interface [RequestListenerInterface name=IRedirectListener, method=public abstract void org.apache.wicket.IRedirectListener.onRedirect()] Feb 24, 2008 3:54:01 PM org.apache.wicket.RequestListenerInterface registerRequestListenerInterface INFO: registered listener interface [RequestListenerInterface name=IResourceListener, method=public abstract void org.apache.wicket.IResourceListener.onResourceRequested()] Feb 24, 2008 3:54:01 PM
Re: Strange Exception
No (don't know what it is). I think maybe this problem was caused by the RunJettyRun plugin picking up my wicket-1.3.0 jars that I had forgotten to delete from my project. I did not reference those jars, but the files where still in my project directory. I did some general update all plugins and project cleaning. Then the problem disappeared. There wasn't much to clean, but I did have that older version of wicket still in the project directory. (Must have had it there since 1.3.1 was released.) /Anders Igor Vaynberg wrote: are you using class reloading filter? -igor On Sun, Feb 24, 2008 at 7:57 AM, Anders Peterson [EMAIL PROTECTED] wrote: Hi, I (sometimes) get a strange Exception. You can see the stacktrace in the attached file. The problem appears (sometimes) when I submit a form. Just displaying data/pages is never a problem. At first glance it seems I get a ClassCastException when doing public static BLAppSession getCurrent() { return (BLAppSession) Session.get(); } Debugging the code I cannot see anything (obviously) wrong with my Session subclass. Something else must be the actual problem. What does this mean: SEVERE: there was an error cleaning up target [EMAIL PROTECTED] class = se.optimatika.blapp.gui.PgEvaluateResults, id = 4, version = 0]-image2-IResourceListener. Use Wicket 1.3.1. /Anders Feb 24, 2008 3:54:00 PM sun.reflect.NativeMethodAccessorImpl invoke0 INFO: Logging to org.slf4j.impl.JDK14LoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog Feb 24, 2008 3:54:00 PM sun.reflect.NativeMethodAccessorImpl invoke0 INFO: jetty-6.1.6 Feb 24, 2008 3:54:01 PM org.apache.wicket.Application callInitializers INFO: [BLApp] init: Wicket core library initializer Feb 24, 2008 3:54:01 PM org.apache.wicket.RequestListenerInterface registerRequestListenerInterface INFO: registered listener interface [RequestListenerInterface name=IBehaviorListener, method=public abstract void org.apache.wicket.behavior.IBehaviorListener.onRequest()] Feb 24, 2008 3:54:01 PM org.apache.wicket.RequestListenerInterface registerRequestListenerInterface INFO: registered listener interface [RequestListenerInterface name=IBehaviorListener, method=public abstract void org.apache.wicket.behavior.IBehaviorListener.onRequest()] Feb 24, 2008 3:54:01 PM org.apache.wicket.RequestListenerInterface registerRequestListenerInterface INFO: registered listener interface [RequestListenerInterface name=IFormSubmitListener, method=public abstract void org.apache.wicket.markup.html.form.IFormSubmitListener.onFormSubmitted()] Feb 24, 2008 3:54:01 PM org.apache.wicket.RequestListenerInterface registerRequestListenerInterface INFO: registered listener interface [RequestListenerInterface name=IFormSubmitListener, method=public abstract void org.apache.wicket.markup.html.form.IFormSubmitListener.onFormSubmitted()] Feb 24, 2008 3:54:01 PM org.apache.wicket.RequestListenerInterface registerRequestListenerInterface INFO: registered listener interface [RequestListenerInterface name=ILinkListener, method=public abstract void org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()] Feb 24, 2008 3:54:01 PM org.apache.wicket.RequestListenerInterface registerRequestListenerInterface INFO: registered listener interface [RequestListenerInterface name=ILinkListener, method=public abstract void org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()] Feb 24, 2008 3:54:01 PM org.apache.wicket.RequestListenerInterface registerRequestListenerInterface INFO: registered listener interface [RequestListenerInterface name=IOnChangeListener, method=public abstract void org.apache.wicket.markup.html.form.IOnChangeListener.onSelectionChanged()] Feb 24, 2008 3:54:01 PM org.apache.wicket.RequestListenerInterface registerRequestListenerInterface INFO: registered listener interface [RequestListenerInterface name=IOnChangeListener, method=public abstract void org.apache.wicket.markup.html.form.IOnChangeListener.onSelectionChanged()] Feb 24, 2008 3:54:01 PM org.apache.wicket.RequestListenerInterface registerRequestListenerInterface INFO: registered listener interface [RequestListenerInterface name=IRedirectListener, method=public abstract void org.apache.wicket.IRedirectListener.onRedirect()] Feb 24, 2008 3:54:01 PM org.apache.wicket.RequestListenerInterface registerRequestListenerInterface INFO: registered listener interface [RequestListenerInterface name=IRedirectListener, method=public abstract void org.apache.wicket.IRedirectListener.onRedirect()] Feb 24, 2008 3:54:01 PM org.apache.wicket.RequestListenerInterface registerRequestListenerInterface INFO: registered listener interface [RequestListenerInterface name=IResourceListener, method=public abstract void org.apache.wicket.IResourceListener.onResourceRequested()] Feb 24, 2008 3:54:01 PM org.apache.wicket.RequestListenerInterface registerRequestListenerInterface INFO: registered
Strange Exception
Hi, I (sometimes) get a strange Exception. You can see the stacktrace in the attached file. The problem appears (sometimes) when I submit a form. Just displaying data/pages is never a problem. At first glance it seems I get a ClassCastException when doing public static BLAppSession getCurrent() { return (BLAppSession) Session.get(); } Debugging the code I cannot see anything (obviously) wrong with my Session subclass. Something else must be the actual problem. What does this mean: SEVERE: there was an error cleaning up target [EMAIL PROTECTED] class = se.optimatika.blapp.gui.PgEvaluateResults, id = 4, version = 0]-image2-IResourceListener. Use Wicket 1.3.1. /Anders Feb 24, 2008 3:54:00 PM sun.reflect.NativeMethodAccessorImpl invoke0 INFO: Logging to org.slf4j.impl.JDK14LoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog Feb 24, 2008 3:54:00 PM sun.reflect.NativeMethodAccessorImpl invoke0 INFO: jetty-6.1.6 Feb 24, 2008 3:54:01 PM org.apache.wicket.Application callInitializers INFO: [BLApp] init: Wicket core library initializer Feb 24, 2008 3:54:01 PM org.apache.wicket.RequestListenerInterface registerRequestListenerInterface INFO: registered listener interface [RequestListenerInterface name=IBehaviorListener, method=public abstract void org.apache.wicket.behavior.IBehaviorListener.onRequest()] Feb 24, 2008 3:54:01 PM org.apache.wicket.RequestListenerInterface registerRequestListenerInterface INFO: registered listener interface [RequestListenerInterface name=IBehaviorListener, method=public abstract void org.apache.wicket.behavior.IBehaviorListener.onRequest()] Feb 24, 2008 3:54:01 PM org.apache.wicket.RequestListenerInterface registerRequestListenerInterface INFO: registered listener interface [RequestListenerInterface name=IFormSubmitListener, method=public abstract void org.apache.wicket.markup.html.form.IFormSubmitListener.onFormSubmitted()] Feb 24, 2008 3:54:01 PM org.apache.wicket.RequestListenerInterface registerRequestListenerInterface INFO: registered listener interface [RequestListenerInterface name=IFormSubmitListener, method=public abstract void org.apache.wicket.markup.html.form.IFormSubmitListener.onFormSubmitted()] Feb 24, 2008 3:54:01 PM org.apache.wicket.RequestListenerInterface registerRequestListenerInterface INFO: registered listener interface [RequestListenerInterface name=ILinkListener, method=public abstract void org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()] Feb 24, 2008 3:54:01 PM org.apache.wicket.RequestListenerInterface registerRequestListenerInterface INFO: registered listener interface [RequestListenerInterface name=ILinkListener, method=public abstract void org.apache.wicket.markup.html.link.ILinkListener.onLinkClicked()] Feb 24, 2008 3:54:01 PM org.apache.wicket.RequestListenerInterface registerRequestListenerInterface INFO: registered listener interface [RequestListenerInterface name=IOnChangeListener, method=public abstract void org.apache.wicket.markup.html.form.IOnChangeListener.onSelectionChanged()] Feb 24, 2008 3:54:01 PM org.apache.wicket.RequestListenerInterface registerRequestListenerInterface INFO: registered listener interface [RequestListenerInterface name=IOnChangeListener, method=public abstract void org.apache.wicket.markup.html.form.IOnChangeListener.onSelectionChanged()] Feb 24, 2008 3:54:01 PM org.apache.wicket.RequestListenerInterface registerRequestListenerInterface INFO: registered listener interface [RequestListenerInterface name=IRedirectListener, method=public abstract void org.apache.wicket.IRedirectListener.onRedirect()] Feb 24, 2008 3:54:01 PM org.apache.wicket.RequestListenerInterface registerRequestListenerInterface INFO: registered listener interface [RequestListenerInterface name=IRedirectListener, method=public abstract void org.apache.wicket.IRedirectListener.onRedirect()] Feb 24, 2008 3:54:01 PM org.apache.wicket.RequestListenerInterface registerRequestListenerInterface INFO: registered listener interface [RequestListenerInterface name=IResourceListener, method=public abstract void org.apache.wicket.IResourceListener.onResourceRequested()] Feb 24, 2008 3:54:01 PM org.apache.wicket.RequestListenerInterface registerRequestListenerInterface INFO: registered listener interface [RequestListenerInterface name=IResourceListener, method=public abstract void org.apache.wicket.IResourceListener.onResourceRequested()] Feb 24, 2008 3:54:01 PM org.apache.wicket.Application callInitializers INFO: [BLApp] init: Wicket extensions initializer Feb 24, 2008 3:54:01 PM org.apache.wicket.protocol.http.WebApplication logStarted INFO: [BLApp] Started Wicket version 1.3.1 in development mode *** WARNING: Wicket is running in DEVELOPMENT mode. *** *** ^^^*** *** Do NOT deploy to your live server(s) without changing
Re: How do you do this in wicket?
Anders Peterson wrote: Is that the problem: Do I have to call this.setResponsePage(LoginPage.class); after super.onClick(); ? Yes, that was it. Thanks Martijn and Maurice! /Anders - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do you do this in wicket?
I have a related question. What should I do when the user logs out. Currently I just set username to null and redirect to the original login page. I feel I also should invalidate the session but that doesn't work. Then I always end up with a Page Expired page. I'd like to still end up with the login page. /Anders Martijn Dashorst wrote: Have one session that knows when authentication has happened... public MySession extends WebSession { private String username; public void setUsername(){} public boolean isAuthenticated() { return username != null; } } Then in your web page you can do: if (!((MySession)getSession).isAuthenticated()) throw restartrequestatinterceptpage(...); Martijn On Jan 13, 2008 7:21 AM, xdirewolfx [EMAIL PROTECTED] wrote: Assume I have created 2 different sessions: - standard session - authenticated session I have a class MyWebPage with this method: - MyWebPage(boolean isAuthenticated) : true = request authentication how do I do this programmatically? -- View this message in context: http://www.nabble.com/How-do-you-do-this-in-wicket--tp14782689p14782689.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: How do you do this in wicket?
Doesn't work for me... I have a PageLink class with a onClick() method that looks like this: public void onClick() { super.onClick(); this.setRedirect(true); this.getSession().invalidate(); } super.onClick(); sets the response page. I do not end up with the desired login page, but get Page Expired. /Anders Martijn Dashorst wrote: iirc: setResponsePage(LoginPage.class); setRedirect(true); getSession().invalidate(); Martijn On 1/13/08, Anders Peterson [EMAIL PROTECTED] wrote: I have a related question. What should I do when the user logs out. Currently I just set username to null and redirect to the original login page. I feel I also should invalidate the session but that doesn't work. Then I always end up with a Page Expired page. I'd like to still end up with the login page. /Anders Martijn Dashorst wrote: Have one session that knows when authentication has happened... public MySession extends WebSession { private String username; public void setUsername(){} public boolean isAuthenticated() { return username != null; } } Then in your web page you can do: if (!((MySession)getSession).isAuthenticated()) throw restartrequestatinterceptpage(...); Martijn On Jan 13, 2008 7:21 AM, xdirewolfx [EMAIL PROTECTED] wrote: Assume I have created 2 different sessions: - standard session - authenticated session I have a class MyWebPage with this method: - MyWebPage(boolean isAuthenticated) : true = request authentication how do I do this programmatically? -- View this message in context: http://www.nabble.com/How-do-you-do-this-in-wicket--tp14782689p14782689.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do you do this in wicket?
Then where do I call that invalidation code? It's not possible to override onClick() with BookmarkablePageLink. /Anders Martijn Dashorst wrote: You *MUST* redirect to a bookmarkable page, not a page instance. A page instance is always relative to your current session, which you just conveniently invalidated. Martijn On 1/13/08, Anders Peterson [EMAIL PROTECTED] wrote: Doesn't work for me... I have a PageLink class with a onClick() method that looks like this: public void onClick() { super.onClick(); this.setRedirect(true); this.getSession().invalidate(); } super.onClick(); sets the response page. I do not end up with the desired login page, but get Page Expired. /Anders Martijn Dashorst wrote: iirc: setResponsePage(LoginPage.class); setRedirect(true); getSession().invalidate(); Martijn On 1/13/08, Anders Peterson [EMAIL PROTECTED] wrote: I have a related question. What should I do when the user logs out. Currently I just set username to null and redirect to the original login page. I feel I also should invalidate the session but that doesn't work. Then I always end up with a Page Expired page. I'd like to still end up with the login page. /Anders Martijn Dashorst wrote: Have one session that knows when authentication has happened... public MySession extends WebSession { private String username; public void setUsername(){} public boolean isAuthenticated() { return username != null; } } Then in your web page you can do: if (!((MySession)getSession).isAuthenticated()) throw restartrequestatinterceptpage(...); Martijn On Jan 13, 2008 7:21 AM, xdirewolfx [EMAIL PROTECTED] wrote: Assume I have created 2 different sessions: - standard session - authenticated session I have a class MyWebPage with this method: - MyWebPage(boolean isAuthenticated) : true = request authentication how do I do this programmatically? -- View this message in context: http://www.nabble.com/How-do-you-do-this-in-wicket--tp14782689p14782689.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- http://ojalgo.org/ Mathematics, Linear Algebra and Optimisation with Java - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How do you do this in wicket?
I have never done new LoginPage(), and I never said I did - that's something you assumed. It has always been LoginPage.class. In my original code the LoginPage.class was passed as an argument to the PageLink constructor and then I had an onClick method like this: public void onClick() { super.onClick(); this.setRedirect(true); this.getSession().invalidate(); } Is that the problem: Do I have to call this.setResponsePage(LoginPage.class); after super.onClick(); ? (Don't have access to the code at the moment.) /Anders Martijn Dashorst wrote: If you read my previous message closely you would have seen: setResponsePage(LoginPage.class); LoginPage.class instead of new LoginPage() That generates the difference between a bookmarkable URL and a session relative URL. Martijn On 1/13/08, Anders Peterson [EMAIL PROTECTED] wrote: Then where do I call that invalidation code? It's not possible to override onClick() with BookmarkablePageLink. /Anders Martijn Dashorst wrote: You *MUST* redirect to a bookmarkable page, not a page instance. A page instance is always relative to your current session, which you just conveniently invalidated. Martijn On 1/13/08, Anders Peterson [EMAIL PROTECTED] wrote: Doesn't work for me... I have a PageLink class with a onClick() method that looks like this: public void onClick() { super.onClick(); this.setRedirect(true); this.getSession().invalidate(); } super.onClick(); sets the response page. I do not end up with the desired login page, but get Page Expired. /Anders Martijn Dashorst wrote: iirc: setResponsePage(LoginPage.class); setRedirect(true); getSession().invalidate(); Martijn On 1/13/08, Anders Peterson [EMAIL PROTECTED] wrote: I have a related question. What should I do when the user logs out. Currently I just set username to null and redirect to the original login page. I feel I also should invalidate the session but that doesn't work. Then I always end up with a Page Expired page. I'd like to still end up with the login page. /Anders Martijn Dashorst wrote: Have one session that knows when authentication has happened... public MySession extends WebSession { private String username; public void setUsername(){} public boolean isAuthenticated() { return username != null; } } Then in your web page you can do: if (!((MySession)getSession).isAuthenticated()) throw restartrequestatinterceptpage(...); Martijn On Jan 13, 2008 7:21 AM, xdirewolfx [EMAIL PROTECTED] wrote: Assume I have created 2 different sessions: - standard session - authenticated session I have a class MyWebPage with this method: - MyWebPage(boolean isAuthenticated) : true = request authentication how do I do this programmatically? -- View this message in context: http://www.nabble.com/How-do-you-do-this-in-wicket--tp14782689p14782689.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- http://ojalgo.org/ Mathematics, Linear Algebra and Optimisation with Java - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- http://ojalgo.org/ Mathematics, Linear Algebra and Optimisation with Java - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JPA best-practices?
Chris Colman wrote: The obvious benefit in such an approach is that your POJO model and the services that you provide to implement business rules etc., remain completely portable to different persistence engines - ie., no vendor lock in. well, i thought that was JPA was all about !? No, definitely not! JPA was all about creating a standard that Hibernate could conform to. Remember there *already* was a standard for Java persistence: JDO. JDO implementations such as JPOX and others implement both JDO (obviously) and JPA but it is not possible for Hibernate to provide all the features of JDO and so it could never implement the JDO standard - hence a less powerful standard had to be created so that Hibernate could play the standards game. It seems it's also possible for a few other ORM tools to conform to that standard. Apart from Hibernate and JPOX you've got TopLink, Cayenne and others. Which would you rather depend on; exPOJO or JPA? /Anders - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Apache Wicket 1.3.0-rc1 released!
Thanks, everyone who contributed! Is Wicket 1.4 still planned to be a Java 5 version of Wicket 1.3? How far away is Wicket 1.4? I have a small prototype application built using Wicket 1.2.6. I believe that little prototype may soon graduate to a real application, and when that happens I'd like it to be using a generified version of Wicket. /Anders --- http://ojalgo.org/ Martijn Dashorst wrote: This is the first release candidate for Apache Wicket we have prepared for your pleasure. It contains over 80 fixes to issues with previous releases and todo items we have cleared. In this announcement: * Apache Wicket * This release * Migrating from 1.2 * Downloading the release * Validating the release * Reporting bugs * The distribution * Release Notes - Wicket - Version 1.3.0-rc1 Eager people click here to download the distribution, others can read further: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-rc1 We thank you for your patience and support. The Wicket Team -= Apache Wicket =- Apache Wicket is a component oriented Java web application framework. With proper mark-up/logic separation, a POJO data model, and a refreshing lack of XML, Apache Wicket makes developing web-apps simple and enjoyable again. Swap the boilerplate, complex debugging and brittle code for powerful, reusable components written with plain Java and HTML. Our migration to a top level project is now completed and you can find our website and documentation here: http://wicket.apache.org -= This release =- This release is the first in a series of release candidates releases until we feel confident to finalize Wicket 1.3. This is called a release candidate because we strive for API freeze. This means only bug fixes will be done on the 1.3 release from now on. -= Migrating from 1.2 =- If you are coming from Wicket 1.2, you really want to read our migration guide, found on the wiki: http://cwiki.apache.org/WICKET/migrate-13.html -= Downloading the release =- You can download the release from the official Apache mirror system, and you can find it through the following link: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-rc1/ For the Maven and Ivy fans out there: update your pom's to the following, and everything will be downloaded automatically: dependency groupIdorg.apache.wicket/groupId artifactIdwicket/artifactId version1.3.0-rc1/version /dependency Substitute the artifact ID with the projects of your liking to get the other projects. Please note that we don't prescribe a Logging implementation for SLF4J. You need to specify yourself which one you prefer. Read more about SLF4J here: http://slf4j.org -= Validating the release =- The release has been signed by Frank Bille, your release manager for today. The public key can be found in the KEYS file in the download area. Download the KEYS file only from the Apache website. http://www.apache.org/dist/wicket/1.3.0-rc1/KEYS Instructions on how to validate the release can be found here: http://www.apache.org/dev/release-signing.html#check-integrity -= Reporting bugs =- In case you do encounter a bug, we would appreciate a report in our JIRA: http://issues.apache.org/jira/browse/WICKET -= The distribution =- In the distribution you will find a README. The README contains instructions on how to build from source yourself and a list of all things that have been fixed, added and/or removed since the first beta release. -= Release Notes - Wicket - Version 1.3.0-rc1 =- Sub-task * WICKET-1022 - Created new bug - ValueMap set to null Bug * WICKET-330 - CheckBox incorrectly converts its model value when a custom Boolean converter is installed * WICKET-336 - Inheritable model cannot be a wrap model * WICKET-382 - Converter misusage/mangling in RadioChoice * WICKET-487 - Buggy behaviour in PageMap.access(IPageMapEntry,int). Wicket1.2.4 * WICKET-588 - continueToOriginalDestination / RestartResponseAtInterceptPageException with page parameters broken * WICKET-605 - Stateless form skips page parameters * WICKET-607 - Stateless forms don't work with QueryStringUrlCodingStrategy * WICKET-642 - Need to escape select html option value * WICKET-645 - Form with ajaxsubmitbutton won't submit after error * WICKET-702 - MockWebApplication doesn't redirect properly to mounted pages under RestartResponseAtInterceptPageException * WICKET-734 - Custom ILinkListener component causes error in cell on mounted page * WICKET-746 - Thread synchronization problems in FilePageStore * WICKET-855 - ModalWindow makes Internet Explorer 6 show an security warning dialog * WICKET-901 - DatePicker#getConfigureYUIBasePath() is useless or never called * WICKET-916 - inconsistent state after setting AjaxDebugModeEnabled to true in an AjaxRequest * WICKET-920 - ExternalLink produces invalid html * WICKET-950 - StatelessForm + QueryStringUrlCodingStrategy problem * WICKET-953 - Session invalidateNow() does not immediate remove the session from disk * WICKET
Re: Wicket 1.4 expectations (was Re: Apache Wicket 1.3.0-rc1 released!)
Gwyn Evans wrote: Does generification of the core make that much difference to a user of the API? I've been focused on JDK 1.4, so didn't have a change to look at Wicket 2 in practice. Don't want to exaggerate, but once you start using Java 5 you don't want to go back and you want all code you use to be up to date. The Models is probably the part of Wicket that needs generification the most. /Anders - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DataTable with DropDownChoice to set rowsPerPage
I would like to be able to add a dropdown to a DataTable so that a user can change the rowsPerPage. Has anyone done this before? If not, what is the best / recommended approach? I tried the following, but I get: IllegalStateException: Attempt to set model object on null model of component: rowsFINALDataTable contacts = NEWDataTable(contacts, columns, contactProvider, rowsPerPage) { @Override PROTECTEDItem newRowItem(String id, INTindex, IModel model) { RETURNNEWOddEvenItem(id, index, model); } }; List rows = Arrays._asList_(NEWString[] {5, 10, 15, 20, all}); add(NEWDropDownChoice(rows, rows) { @Override PROTECTEDBOOLEANwantOnSelectionChangedNotifications() { RETURNTRUE; } @Override PROTECTEDVOIDonSelectionChanged(FINALObject newSelection) { IF(newSelection == all) { contacts.setRowsPerPage(10); // use really big number to display all } ELSE{ contacts.setRowsPerPage((Integer) newSelection); } } }); - JA