Re: LegUp updated for latest version of Wicket, and other frameworks
This is great ! 2010/1/15 Cemal Bayramoglu jweekend_for...@cabouge.com Marek, Jeremy, Thanks. Yes, we do plan to gradually add more configurations. We have already had offers to contribute Wicket/Scala templates and a few others we will consider. Wicket/WiQuery will be popular too, once we've got WiQuery itself onto a public Maven repo. All suggestions/ideas for new project configurations/framework combination are welcome. Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com 2010/1/15 Marek Šabo ms...@buk.cvut.cz: Looks good, sure will save time of new explorers. Are you going to add more archetypes in future (what's next)? I saw hibernate there, maybe ibatis or cayenne would be fine, although they are not that hard to figure out. I will try the wicket-guice myself. Good luck, Marek On 01/15/2010 05:34 AM, Jeremy Thomerson wrote: This looks really great guys! I just created a project with it and looked through it and it will be a great leg up for anyone needing to start a project and needing help wiring all the pieces together. Thanks!! -- Jeremy Thomerson http://www.wickettraining.com On Thu, Jan 14, 2010 at 11:03 AM, Richard Wilkinson richardjohnwilkin...@googlemail.com wrote: We have updated LegUp [1] so you can now create projects using the latest (compatible) versions of Wicket, Spring, Guice, JPA (1.0), Warp, Hibernate... LegUp is a collection of Maven archetypes to help you get quickly and easily started with your enterprise projects. Wicket 1.4.5, Guice 2.0 Wicket 1.4.5, Spring 3.0.0, JPA 1.0 Wicket 1.4.5, Guice 1.0, WarpPersist 1.0, Hibernate 3.2 Wicket 1.4.5, Guice 1.0, WarpPersist 1.0, JPA 1.0 Spring 3.0.0, JPA 1.0 Spring 3.0.0, JDBC The source is available on the LegUp Google code project [2]. Drop us a line at [3] if you have any ideas for or would like to contribute new archetypes. -- Regards - Richard Wilkinson Developer, jWeekend: OO Java Technologies - Development and Training http://jWeekend.com [1] http://www.jweekend.com/dev/LegUp [2] http://code.google.com/p/legup/ [3] http://www.jweekend.com/dev/ContactUs - 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 -- Altuğ.
Re: Wicket Acegi Security
I prefer Apache Shiro, simple and powerful. http://incubator.apache.org/shiro/ http://incubator.apache.org/shiro/This month Shiro team gonna release the first official version as Apache Shiro. This product known as Jsecurity before connected to Apache system. My formula : Apache Wicket + Google Guice + Hibernate + Shiro Altug. 2010/1/9 Jeroen Steenbeeke j.steenbeeke...@gmail.com I'm not sure if I fully understood your question, but perhaps this can help: http://cwiki.apache.org/WICKET/acegi-and-wicket-auth-roles.html Of course, you could have simply Googled that yourself: http://en.lmgtfy.com/?q=wicket+acegi+security+role 2010/1/9 raj kamal rajkamal@gmail.com: Hi, I am Working as Software Eng in India.Currently Working on WICKET Security. i can't find security that based on Database Interaction can u send any link that understand (WICKET+ACEGI+DATABASE+ROLE_ BASED) Regards Rajkamal.S -- Jeroen Steenbeeke www.fortuityframework.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Altuğ.
Re: Tag Oriented Development
Agreed 2009/12/25 b...@actrix.gen.nz JSF == Standard? My question is: What should become a standard? When I think about standards, then things that come to mind are: - SQL - ODBC - Java - JDBC - EJB - JPA but not JSF. And not Spring. And not ... - you name it. For some reason, possibly due to the fast evolving nature of the web, web frameworks are higher up in the food chain, and I don't think that we are ready yet to standardize on that level. People may say JSF is a standard, so what? The fact that there are so many others seems to prove my point. Bernard On Tue, 22 Dec 2009 14:59:16 +0200, you wrote: In business, decision makers choose standards and JSF is standard so JSF is good and JSF is the King. But couldn't be The King Is Naked ?? OR Am i wrong ? JSF is really cool and i don't know the hidden features ?? I don't want to start framework wars, this is useless but I think Wicket should be a JSR. I don't know how a framework like Wicket become a JSR - a standard - but it should be... 2009/12/22 Peter Thomas ptrtho...@gmail.com On Tue, Dec 22, 2009 at 5:47 PM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: @Tomas, @Martin, I already knew those links... Thanks anyway. Actually I went a bit further an implemented the same application on different technologies so that developers could evaluate for themselves the wonders of downsides of each technology... plus detailed explanations of how the code works Unfortunately I cannot share that code as is property of the company I work for That's a pretty solid approach, pity you can't share the code though. I tried to do something similar as open-source: http://code.google.com/p/perfbench/ Maybe you can contribute some analysis or even an implementation or two ;) I would be interested in your feedback, for e.g. which framework to attempt next - do let me know offline. But the problem is those who will take the final decision will take into account more political reasons that things like development speed, code quality, code re-usability and any other adds you throw at them... @Martin, Congratulations! Hope I can say the same in a few months. Best, Ernesto On Tue, Dec 22, 2009 at 12:57 PM, Peter Thomas ptrtho...@gmail.com wrote: On Tue, Dec 22, 2009 at 5:22 PM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: Hi Eelco, On Tue, Dec 22, 2009 at 12:38 PM, Eelco Hillenius eelco.hillen...@gmail.com wrote: I love Wicket and the natural approach it offers to do web-development... and I have been pushing hard to use it whenever possible... but on the real world it is not enough to be an excellent product to gain wide acceptance... Does last sentence ring a bell? I think we've gained pretty wide acceptance actually. Wicket In Action has been a best seller for Manning in the months right after it came out, and Wicket is by many considered as one of the leading web frameworks for Java. We've also had one of the most active email lists for years now. I'm sure Wicket lags behind JSF and Struts considerably when it comes to number of users, but hey, why would we care. You only need a bunch of serious users to maintain a framework, and Wicket has many thousands of them :-) You don't have to convince me about Wicket excellence! I love Wicket, I've been using it for over two years now, and right now I'm doing all my efforts to get it adopted at the company I'm working for... But being realistic they will probably jump to Struts 2, or Seam-JSF... After re-reading my message I see maybe it was bit pessimistic.. maybe out of my present frustration. may be useful when debating Wicket vs JSF where you work etc: http://tinyurl.com/jsf-sucks - Peter Cheers, Ernesto - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Altuğ.
Re: Tag Oriented Development
I agree with you. I think becoming a JSR also adds lots of friction to development. 2009/12/22 nino martinez wael nino.martinez.w...@gmail.com Could'nt one petition a JSR for wicket? :) -regards Nino 2009/12/22 Chris Colman chr...@stepaheadsoftware.com: I know JSF is standard; what is your idea about current JSF status? Just forget about it ... ;) Agreed! JSF is way too complex for doing simple things. They -again- forgot the KISS principle (Keep it Simple Straightforward/Stupid). Wicket (but also Tapestry) is in my opinion a giant leap forward. I wondaer when the JSF spec will start look like this way of working... Probably never because often what starts out as an unjustifiable and unattractive design that is adopted by people simply because it doesn't stray too far from the legacy framework (JSP) soon becomes justified on the basis of some irrational, semi religious beliefs. Once it reaches that point there is no turning back because to change would be to admit they weren't perfect at some point in the past. The good thing is that rational people are free to choose the best solution regardless of what 'the standard' might be. It's a good thing that many programmers are usually freedom fighting mavericks or we'd all be writing desktop apps in Visual Basic (not that I ever used VB - I was more a C/C++ kind of guy =] ) - 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 -- Altuğ.
Re: Tag Oriented Development
In business, decision makers choose standards and JSF is standard so JSF is good and JSF is the King. But couldn't be The King Is Naked ?? OR Am i wrong ? JSF is really cool and i don't know the hidden features ?? I don't want to start framework wars, this is useless but I think Wicket should be a JSR. I don't know how a framework like Wicket become a JSR - a standard - but it should be... 2009/12/22 Peter Thomas ptrtho...@gmail.com On Tue, Dec 22, 2009 at 5:47 PM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: @Tomas, @Martin, I already knew those links... Thanks anyway. Actually I went a bit further an implemented the same application on different technologies so that developers could evaluate for themselves the wonders of downsides of each technology... plus detailed explanations of how the code works Unfortunately I cannot share that code as is property of the company I work for That's a pretty solid approach, pity you can't share the code though. I tried to do something similar as open-source: http://code.google.com/p/perfbench/ Maybe you can contribute some analysis or even an implementation or two ;) I would be interested in your feedback, for e.g. which framework to attempt next - do let me know offline. But the problem is those who will take the final decision will take into account more political reasons that things like development speed, code quality, code re-usability and any other adds you throw at them... @Martin, Congratulations! Hope I can say the same in a few months. Best, Ernesto On Tue, Dec 22, 2009 at 12:57 PM, Peter Thomas ptrtho...@gmail.com wrote: On Tue, Dec 22, 2009 at 5:22 PM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: Hi Eelco, On Tue, Dec 22, 2009 at 12:38 PM, Eelco Hillenius eelco.hillen...@gmail.com wrote: I love Wicket and the natural approach it offers to do web-development... and I have been pushing hard to use it whenever possible... but on the real world it is not enough to be an excellent product to gain wide acceptance... Does last sentence ring a bell? I think we've gained pretty wide acceptance actually. Wicket In Action has been a best seller for Manning in the months right after it came out, and Wicket is by many considered as one of the leading web frameworks for Java. We've also had one of the most active email lists for years now. I'm sure Wicket lags behind JSF and Struts considerably when it comes to number of users, but hey, why would we care. You only need a bunch of serious users to maintain a framework, and Wicket has many thousands of them :-) You don't have to convince me about Wicket excellence! I love Wicket, I've been using it for over two years now, and right now I'm doing all my efforts to get it adopted at the company I'm working for... But being realistic they will probably jump to Struts 2, or Seam-JSF... After re-reading my message I see maybe it was bit pessimistic.. maybe out of my present frustration. may be useful when debating Wicket vs JSF where you work etc: http://tinyurl.com/jsf-sucks - Peter Cheers, Ernesto -- Altuğ.
Tag Oriented Development
Hi, I have a question about JSF, I know this is Wicket-User group but I think my question is more suitable for this group I've been using Wicket for ~1,5 years before Wicket i used Struts 1.x and JSF (Myfaces + Tiles + Tomehawk ...) Now i am investigating JSF libs *just for fun*; such as Richfaces, Icefaces and Primefaces. When i compare Wicket with JSF libs, i realized that JSF goes to Tag oriented development Am i right ? so Wicket is great for everyone who knows and want to use Object Oriented. I know JSF is standard; what is your idea about current JSF status? Thanks. -- Altuğ.
Re: some questions from newbie
Merhaba Halil; *1. is there an ide to develop wicket applications/components easily* I used Netbeans and now I am using Eclipse, it is really fun to develop on these IDEs. *2. does the tag starts with wicket: take arguments or not, if yes, is.* First; don't compare Wicket *syntax *with struts or other framework's syntax. - you can't do like that wicket:panel name=halil age=29/ because think wicket:panel tag as a reference to an another Panel component. If you like to pass parameters to that Panel then there are many ways but this subject is out of scope for this mail. 3 -* i create a login component to learn wicket. i see that, i can create* *components in java, but there is no correspondences in html. here an example.* Which example ?? Did you forget to paste it ? Anyway; Wicket components need markup (html) to render; 15 Aralık 2009 19:23 tarihinde Halil Ağın halil.a...@gmail.com yazdı: Hello List; I am new to wicket. i have developed struts1/2 for a long time. and i like wicket. but, i have some questions: 1. is there an ide to develop wicket applications/components easily 2. does the tag starts with wicket: take arguments or not, if yes, is there an ide that support this future. i read the book wicket in action, and couldnt see such an example if answer no, i suggests below(maybe they are silly for wicket, but i see such a feature in asp.net) lets prepare such an example wicket:panel name=halil age=29/ in java, wicket:page may correspond to a property model and name-and-age fields may be the field names in the class of property model. 3. i create a login component to learn wicket. i see that, i can create components in java, but there is no correspondences in html. here an example. -- Altuğ.
Wicket + Spring + Hibernate event in ISTANBUL (Turkey)
Hi all; Today we will organize a medium size event. In that event, we will present hands on session about Wicket + Spring + Hibernate. This event will be in Istanbul, Besiktasi Bahcesehir University at 19.00 (local time) http.//www.java.org.tr Feel free to attend this event. Regards. -- Altuğ.
Re: DropDownChoice and onSelectionChanged error.
Thanks Fatih. It is my fault, i solved the problem. Altug. 2009/10/9 Fatih Mehmet Ucar fmu...@gmail.com If you use the below constrcutor, it should solve your problem. DropDownChoice(java.lang.String id, IModel model, IModel choices, IChoiceRenderer renderer) 2009/10/9 Altuğ B. Altıntaş alt...@gmail.com: Hi; I have a problem with DropDownChoice; The code block is here : ListFaaliyetfaaliyetListesi = // data comes final DropDownChoiceFaaliyet faaliyetler = new DropDownChoiceFaaliyet(Faaliyetler, new Model((Serializable) faaliyetListesi), faaliyetlerRenderer) { @Override protected boolean wantOnSelectionChangedNotifications() { return true; } @Override protected void onSelectionChanged(Faaliyet newSelection) { super.onSelectionChanged(newSelection); PageParameters params = new PageParameters(); params.add(ay, finalAy + ); params.add(yil, finalYil + ); params.add(faaliyetId, newSelection.getId() + ); setResponsePage(ActionPage.class, params); } }; add(faaliyetler); The error message is : wicketMessage: Method onSelectionChanged of interface org.apache.wicket.markup.html.form.IOnChangeListener targeted at component [MarkupContainer [Component id = Faaliyetler]] threw an exception Root cause: java.lang.IllegalStateException: Attempt to set model object on null model of component: Faaliyetler at org.apache.wicket.Component.setDefaultModelObject(Component.java:3038) at org.apache.wicket.markup.html.form.FormComponent.updateModel(FormComponent.java:1168) at org.apache.wicket.markup.html.form.DropDownChoice.onSelectionChanged(DropDownChoice.java:158) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:182) at org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.j -- Any suggestions ? Altuğ. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Altuğ.
DropDownChoice and onSelectionChanged error.
Hi; I have a problem with DropDownChoice; The code block is here : ListFaaliyetfaaliyetListesi = // data comes final DropDownChoiceFaaliyet faaliyetler = new DropDownChoiceFaaliyet(Faaliyetler, new Model((Serializable) faaliyetListesi), faaliyetlerRenderer) { @Override protected boolean wantOnSelectionChangedNotifications() { return true; } @Override protected void onSelectionChanged(Faaliyet newSelection) { super.onSelectionChanged(newSelection); PageParameters params = new PageParameters(); params.add(ay, finalAy + ); params.add(yil, finalYil + ); params.add(faaliyetId, newSelection.getId() + ); setResponsePage(ActionPage.class, params); } }; add(faaliyetler); The error message is : wicketMessage: Method onSelectionChanged of interface org.apache.wicket.markup.html.form.IOnChangeListener targeted at component [MarkupContainer [Component id = Faaliyetler]] threw an exception Root cause: java.lang.IllegalStateException: Attempt to set model object on null model of component: Faaliyetler at org.apache.wicket.Component.setDefaultModelObject(Component.java:3038) at org.apache.wicket.markup.html.form.FormComponent.updateModel(FormComponent.java:1168) at org.apache.wicket.markup.html.form.DropDownChoice.onSelectionChanged(DropDownChoice.java:158) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:182) at org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.j -- Any suggestions ? Altuğ.
Re: ProgressBar demo doesn't work for firefox 3.5.3
You are right; it doesn't work properly. I am using swfupload tool. it is flash and it works great. Regards. Altug. 2009/10/2 Paul Huang paulhuan...@gmail.com I copy and paste the single file upload demo at http://www.wicket-library.com/wicket-examples/upload/single; to my local machine and found the the ajax progressbar doesn't work on my firefox 3.5.3 on winxp. But It works on my ie 8 though. Any idea what might be the cause? ( I did not change a single a line of code, I am using wicket 1.4.1) BTW: the file upload demo on wick-library.com does not work. I got a internal error message every time when trying to upload a file. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Altuğ.
java.lang.StackOverflowError and ModalWindow
Hi all; I have a modal window; In that modal window i put a flash upload tool which calls a Servlet to post data. System works fine. But sometimes it gives java.lang.StackOverflowError. I couldn't understand this issue. Note : Also i increased Tomcat heap size... My wicket version is 1.4.1 JDK version : 1.6 Tomcat 6.x SEVERE: Servlet.service() for servlet default threw exception java.lang.StackOverflowError at java.lang.ref.ReferenceQueue.poll(ReferenceQueue.java:82) at java.io.ObjectStreamClass.processQueue(ObjectStreamClass.java:2234) at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:266) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1106) at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:416) at org.apache.wicket.Component.writeObject(Component.java:4447) at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326) at org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory$2.writeObjectOverride(IObjectStreamFactory.java:121) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:322) at org.apache.wicket.util.lang.Objects.objectToByteArray(Objects.java:1120) at org.apache.wicket.protocol.http.pagestore.AbstractPageStore.serializePage(AbstractPageStore.java:203) at org.apache.wicket.protocol.http.pagestore.DiskPageStore.prepareForSerialization(DiskPageStore.java:1190) at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.writeObject(SecondLevelCacheSessionStore.java:386) at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945) at
Re: java.lang.StackOverflowError and ModalWindow
I think problem occurs because of old disk written Session. I cleaned Tomcat work directory. It works for now. 2009/10/1 Altuğ B. Altıntaş alt...@gmail.com Hi all; I have a modal window; In that modal window i put a flash upload tool which calls a Servlet to post data. System works fine. But sometimes it gives java.lang.StackOverflowError. I couldn't understand this issue. Note : Also i increased Tomcat heap size... My wicket version is 1.4.1 JDK version : 1.6 Tomcat 6.x SEVERE: Servlet.service() for servlet default threw exception java.lang.StackOverflowError at java.lang.ref.ReferenceQueue.poll(ReferenceQueue.java:82) at java.io.ObjectStreamClass.processQueue(ObjectStreamClass.java:2234) at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:266) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1106) at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:416) at org.apache.wicket.Component.writeObject(Component.java:4447) at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326) at org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory$2.writeObjectOverride(IObjectStreamFactory.java:121) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:322) at org.apache.wicket.util.lang.Objects.objectToByteArray(Objects.java:1120) at org.apache.wicket.protocol.http.pagestore.AbstractPageStore.serializePage(AbstractPageStore.java:203) at org.apache.wicket.protocol.http.pagestore.DiskPageStore.prepareForSerialization(DiskPageStore.java:1190) at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.writeObject(SecondLevelCacheSessionStore.java:386) at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source
Re: NullPointException in subclass of FormComponentFeedbackBorder
wicket:border span wicket:id=errorIndicator/span img alt=Error! src=icon.gif/span style=color:red;! br/ /span wicket:body/ /wicket:border Try above . Maybe error occurs because of hierarchy; i mean it your html; img is child of errorIndicator but i think in your java code site there is hierarchy like this. note: it is just a guess ! Regards. 2009/9/27 Anders innocentl...@gmail.com 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
Re: GridView and refreshing with an ajax call
Did you add the component to AjaxRequestTarget target.addComponent(yourGridview) Also don't forget this : yourGridview.setOutputMarkupId(true); A.B.A 2009/9/25 Fernando Wermus fernando.wer...@gmail.com Hi all,I have an ajaxclick which should refresh a gridview, but this doesnt happened. I saw someone reporting the same issue and I would like to know if this has been fixed it. The fact, it is that the gridview' s model is called just one at construction time. It does refresh the gridview but with the old data from the model. Thanks in advance. -- Fernando Wermus. www.linkedin.com/in/fernandowermus -- Altuğ.
html tag doesn't render by the browser
Hi all ; Problem is html tag - bold brdoesn't process ; I don't know if this problem related with Wicket. Let me explain it by simple code: HTML side : wicket:panel span wicket:id=test test code comes here /span /wicket:panel Java side : String test = Java bSoftware/b technology.; item.add( new Label(test, test) ); When i test the code; i see the output like that : Java bSoftware/b technology. Note : Software is not in bold; the html source code and the view is the same bSoftware/b. Any suggestions ? Thanks. -- Altuğ.
Re: html tag doesn't render by the browser
Thanks Pedro; String test = Get the latest Java bSoftware/b and br/explore how Java technology provides a better digital experience.; Label label = new Label(test, new Model(test)); label.setEscapeModelStrings(false); works for me !! setEscapeModelStrings(false); is the key part. Thanks. 2009/9/26 Pedro Santos pedros...@gmail.com Wicket is using html scape character to output your string on model, so it will to be presented as '' and ''. u can set FLAG_ESCAPE_MODEL_STRINGS to the componet http://static.ddpoker.com/javadoc/wicket/1.4-rc2/org/apache/wicket/Component.html#getDefaultModelObjectAsString()http://static.ddpoker.com/javadoc/wicket/1.4-rc2/org/apache/wicket/Component.html#getDefaultModelObjectAsString%28%29 On Fri, Sep 25, 2009 at 7:38 PM, Altuğ B. Altıntaş alt...@gmail.com wrote: Hi all ; Problem is html tag - bold brdoesn't process ; I don't know if this problem related with Wicket. Let me explain it by simple code: HTML side : wicket:panel span wicket:id=test test code comes here /span /wicket:panel Java side : String test = Java bSoftware/b technology.; item.add( new Label(test, test) ); When i test the code; i see the output like that : Java bSoftware/b technology. Note : Software is not in bold; the html source code and the view is the same bSoftware/b. Any suggestions ? Thanks. -- Altuğ. -- Pedro Henrique Oliveira dos Santos -- Altuğ.
Re: WebMarkupContainer Ajax update problem
I replaced Id with class and it worked ! Thanks. 2009/9/4 Jeremy Thomerson jer...@wickettraining.com I'm not sure you can change the ID of an element in an Ajax request. Wicket depends on the ID to do component replacement. Try using a class instead. -- Jeremy Thomerson http://www.wickettraining.com On Thu, Sep 3, 2009 at 5:57 PM, Altuğ B. Altıntaş alt...@gmail.com wrote: Hi ; In Panel I have a AjaxButton In that AjaxButton, I tried to update the background (Parent Pages's WebMarkupContainer). Here is the simplified code : AjaxButton vote = new AjaxButton(Vote) { @Override protected void onSubmit(AjaxRequestTarget target, Form? form) { . WebMarkupContainer content = (WebMarkupContainer) super.findPage().get(Content); content.add(new SimpleAttributeModifier(id, content_selected)) ; target.addComponent(content); } Also I set WebMarkupContainer.setOutputMarkupId(true); in my parent page Any suggestions ? Thanks. -- Altuğ. -- Altuğ.
WebMarkupContainer Ajax update problem
Hi ; In Panel I have a AjaxButton In that AjaxButton, I tried to update the background (Parent Pages's WebMarkupContainer). Here is the simplified code : AjaxButton vote = new AjaxButton(Vote) { @Override protected void onSubmit(AjaxRequestTarget target, Form? form) { . WebMarkupContainer content = (WebMarkupContainer) super.findPage().get(Content); content.add(new SimpleAttributeModifier(id, content_selected)) ; target.addComponent(content); } Also I set WebMarkupContainer.setOutputMarkupId(true); in my parent page Any suggestions ? Thanks. -- Altuğ.
Have you ever run this example ?
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ğ.
Re: images in html or images in css
Hi; Because your css file location and html file location are different. try to reach images via url way like background:url(*/images/FondoGeneral.jpg*); or img src=*/images/MarcoFoto.png* width=177 height=107 Cheers... 2009/8/28 Fernando Wermus fernando.wer...@gmail.com Hi all, There is something that I dont understand: If my css style has an image declared, it works: body { background:url(images/FondoGeneral.jpg); but if it is defined in the html, it doesnt img src=images/MarcoFoto.png width=177 height=107 why? -- Fernando Wermus. www.linkedin.com/in/fernandowermus -- Altuğ.
Re: Have you ever run this example ?
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ğ.
Re: Have you ever run this example ?
I solved the problem ! I added Spring context listener + cglib 2.2.jar I run my first Spring Security Framework + wicket application. Thanks everybody ! Some notes : - Wicket example page ( http://cwiki.apache.org/WICKET/spring-security-and-wicket-auth-roles.html) is not clear enough - I used apache Ki (new name is Apache Shiro) on my previous application, i can really say it is very very simple and powerful. But Apache Shiro is going quite slow, there is no alpha release yet but Apache Shiro is promising. Thanks. 2009/8/28 jWeekend jweekend_for...@cabouge.com Altug, It sounds like there is no bean factory set on your servlet context. Did you add Spring's context listener in web.xml? Regards - Cemal jWeekend OO Java Technologies, Wicket Training and Development http://jWeekend.com Altuğ B. Altıntaş wrote: 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ğ. -- View this message in context: http://www.nabble.com/Have-you-ever-run-this-example---tp25191082p25193012.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Altuğ.
WicketSessionFilter and empty HttpSession
Hi all ; I am working on WicketSessionFilter for a while and i have problem about accessing Wicket Session in my Servlet. My question is : In WicketSessionFilter.java (core class in wicket.1.3.6.jar) at doFilter() method HttpSession httpSession = httpServletRequest.getSession(false); above code returns the session. But when my servlet post a request then above code returns NULL . It can not get the standard session object when a simple servlet post a request. Any idea why a servlet http post cause null http session in WicketSessionFilter.java ? Thanks. Altug. -- Altuğ.
Re: WicketSessionFilter and empty HttpSession
It is impossible, I can get Session Id but then when I call servlet ' s doPost() method , WicketSessionFilter can not find the HttpSession. I mean : HttpSession httpSession = httpServletRequest.getSession(false); // WicketSessionFilter.java in wicket.1.3.6.jar returns NULL. so that my servlet throws Exception because Session wicketSession = Session.get(); throws java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle Thanks. 2009/7/27 Igor Vaynberg igor.vaynb...@gmail.com that means session has not yet been created. you should use Session.exists() to test for this. -igor On Mon, Jul 27, 2009 at 7:38 AM, Altuğ B. Altıntaşalt...@gmail.com wrote: Hi all ; I am working on WicketSessionFilter for a while and i have problem about accessing Wicket Session in my Servlet. My question is : In WicketSessionFilter.java (core class in wicket.1.3.6.jar) at doFilter() method HttpSession httpSession = httpServletRequest.getSession(false); above code returns the session. But when my servlet post a request then above code returns NULL . It can not get the standard session object when a simple servlet post a request. Any idea why a servlet http post cause null http session in WicketSessionFilter.java ? Thanks. Altug. -- Altuğ. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Altuğ.
Re: WicketSessionFilter and empty HttpSession
OK. Problem occurs because of swfupload - swfupload.org/ swfupload is a flash based file upload tool and it doesn't send cookie information in the http header so i can't access Wicket Session. I am sending Session Id in URL when posting via swfupload; Is there any way to access Session object assume that you know session Id ? Thanks. 2009/7/27 Igor Vaynberg igor.vaynb...@gmail.com thats why i said use Session.exists() to check first, and only call Session.get() if Session.exists() returned true. -igor On Mon, Jul 27, 2009 at 9:45 AM, Altuğ B. Altıntaşalt...@gmail.com wrote: It is impossible, I can get Session Id but then when I call servlet ' s doPost() method , WicketSessionFilter can not find the HttpSession. I mean : HttpSession httpSession = httpServletRequest.getSession(false); // WicketSessionFilter.java in wicket.1.3.6.jar returns NULL. so that my servlet throws Exception because Session wicketSession = Session.get(); throws java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle Thanks. 2009/7/27 Igor Vaynberg igor.vaynb...@gmail.com that means session has not yet been created. you should use Session.exists() to test for this. -igor On Mon, Jul 27, 2009 at 7:38 AM, Altuğ B. Altıntaşalt...@gmail.com wrote: Hi all ; I am working on WicketSessionFilter for a while and i have problem about accessing Wicket Session in my Servlet. My question is : In WicketSessionFilter.java (core class in wicket.1.3.6.jar) at doFilter() method HttpSession httpSession = httpServletRequest.getSession(false); above code returns the session. But when my servlet post a request then above code returns NULL . It can not get the standard session object when a simple servlet post a request. Any idea why a servlet http post cause null http session in WicketSessionFilter.java ? Thanks. Altug. -- Altuğ. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Altuğ. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Altuğ.
Re: WicketSessionFilter and empty HttpSession
Thanks Igor. 2009/7/27 Igor Vaynberg igor.vaynb...@gmail.com no, there is not afaik. what you need to do is pass it in the url just like the servlet container would /context;JSESSIONID=x?foo=bar -igor On Mon, Jul 27, 2009 at 11:09 AM, Altuğ B. Altıntaşalt...@gmail.com wrote: OK. Problem occurs because of swfupload - swfupload.org/ swfupload is a flash based file upload tool and it doesn't send cookie information in the http header so i can't access Wicket Session. I am sending Session Id in URL when posting via swfupload; Is there any way to access Session object assume that you know session Id ? Thanks. 2009/7/27 Igor Vaynberg igor.vaynb...@gmail.com thats why i said use Session.exists() to check first, and only call Session.get() if Session.exists() returned true. -igor On Mon, Jul 27, 2009 at 9:45 AM, Altuğ B. Altıntaşalt...@gmail.com wrote: It is impossible, I can get Session Id but then when I call servlet ' s doPost() method , WicketSessionFilter can not find the HttpSession. I mean : HttpSession httpSession = httpServletRequest.getSession(false); // WicketSessionFilter.java in wicket.1.3.6.jar returns NULL. so that my servlet throws Exception because Session wicketSession = Session.get(); throws java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle Thanks. 2009/7/27 Igor Vaynberg igor.vaynb...@gmail.com that means session has not yet been created. you should use Session.exists() to test for this. -igor On Mon, Jul 27, 2009 at 7:38 AM, Altuğ B. Altıntaşalt...@gmail.com wrote: Hi all ; I am working on WicketSessionFilter for a while and i have problem about accessing Wicket Session in my Servlet. My question is : In WicketSessionFilter.java (core class in wicket.1.3.6.jar) at doFilter() method HttpSession httpSession = httpServletRequest.getSession(false); above code returns the session. But when my servlet post a request then above code returns NULL . It can not get the standard session object when a simple servlet post a request. Any idea why a servlet http post cause null http session in WicketSessionFilter.java ? Thanks. Altug. -- Altuğ. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Altuğ. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Altuğ. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Altuğ.
Re: how to get some data from servlet
Hi all ; I can't use WicketSessionFilter maybe because I am using Apache Shiro (old name is Apache Kİ). In fact Fernando's solution works; Now I can reach and use Session inside UploadRequestTarget which implements IRequestTarget. But then I realized that I reach a different Session object in UploadRequestTarget class. It creates a new Session so i can NOT access it in other WebPages. In my Application class; @Override public final Session newSession(Request request, Response response) { return new MySession(request); } Are there any way to access all Sessions or stop creating a new Session in UploadRequestTarget (which implements IRequestTarget) Thanks. Altug. 2009/7/20 Igor Vaynberg igor.vaynb...@gmail.com see WicketSessionFilter -igor On Sun, Jul 19, 2009 at 3:20 PM, Altuğ B. Altıntaşalt...@gmail.com wrote: Hi Igor; I found the problem; problem is when i hit my UploadServlet via http-get method , i simply write the url and hit the enter then below code is working Session wicketSession = Session.get(); I can get wicket Session, wow !! it is great... BUT ... When i hit my UploadServlet via http-post method, swfupload access in that way then i can NOT access wicketSession. I mean this code : Session wicketSession = Session.get(); it throws : java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle Any idea ? Thanks Altug.. 2009/7/14 Igor Vaynberg igor.vaynb...@gmail.com that doesnt make any sense. all things within the webapp share the session. you guys are welcome to create a quickstart that replicates this. -igor On Tue, Jul 14, 2009 at 3:47 AM, Altuğ B. Altıntaşalt...@gmail.com wrote: Also I have a problem like yours. Servlet session and Wicket's session are different so you are getting nul. Just debug your application and you will see that they have different session Id's. I tried to use WicketSessionFilter but it doesn't work. I am using wicket 1.3.5. Cheers... Altug. 2009/6/23 danisevsky danisev...@gmail.com hello, I am using MyMultiFileUploadServlet for uploading files and in some wicket component I need find out how many files was uploaded. I was trying to set this number to the HttpSession in MyMultiFileUploadServlet and get it in the component: HttpSession httpSession = ((WebRequest) getRequest()).getHttpServletRequest() .getSession(); String count = httpSession .getAttribute(filesCount); but count is always null. Is there any way how to get some data from servlet? Thanks -- Altuğ. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Altuğ. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Altuğ.
Re: how to get some data from servlet
I will post my codes. But now i catched a very very strange position in WicketSessionFilter . Let me explain : I used WicketSessionFilter and a Simple UploadServlet as Igor said. I tested my application using Firefox 3. It gives : java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle bla bla bla ... I tried to debug WicketSessionFilter , I can see that Filter runs and sets the Session into Thread but then My Servlet doesn't get the Session because some how WicketSessionFilter 's finally block runs and Session.unset() method executes. I think my Servlet can't catch the Session in Thread that WicketSessionFilter puts or something like that. The most strange part is : When I tested my application using Internet Explorer 8, WOOWs , It works. My Upload servlet can reach the same Session without any exception. I think It means WicketSessionFilter and UploadServlet runs in proper order. Also I tested my application in Chrome, and I get the same exception : java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle It likes producer and consumer problem. Sessions in Wicket will kill me :) Also I set up Wicket examples and I can see WicketSessionFilter runs properly. Any suggestions ? Thank you everybody. Altug. 2009/7/23 Fernando Wermus fernando.wer...@gmail.com Could you show to us the whole code? I mean, the page or panel that upload the files as well the IRequestTarget class you have implemented? On Thu, Jul 23, 2009 at 10:31 AM, Altuğ B. Altıntaş alt...@gmail.com wrote: Hi all ; I can't use WicketSessionFilter maybe because I am using Apache Shiro (old name is Apache Kİ). In fact Fernando's solution works; Now I can reach and use Session inside UploadRequestTarget which implements IRequestTarget. But then I realized that I reach a different Session object in UploadRequestTarget class. It creates a new Session so i can NOT access it in other WebPages. In my Application class; @Override public final Session newSession(Request request, Response response) { return new MySession(request); } Are there any way to access all Sessions or stop creating a new Session in UploadRequestTarget (which implements IRequestTarget) Thanks. Altug. 2009/7/20 Igor Vaynberg igor.vaynb...@gmail.com see WicketSessionFilter -igor On Sun, Jul 19, 2009 at 3:20 PM, Altuğ B. Altıntaşalt...@gmail.com wrote: Hi Igor; I found the problem; problem is when i hit my UploadServlet via http-get method , i simply write the url and hit the enter then below code is working Session wicketSession = Session.get(); I can get wicket Session, wow !! it is great... BUT ... When i hit my UploadServlet via http-post method, swfupload access in that way then i can NOT access wicketSession. I mean this code : Session wicketSession = Session.get(); it throws : java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle Any idea ? Thanks Altug.. 2009/7/14 Igor Vaynberg igor.vaynb...@gmail.com that doesnt make any sense. all things within the webapp share the session. you guys are welcome to create a quickstart that replicates this. -igor On Tue, Jul 14, 2009 at 3:47 AM, Altuğ B. Altıntaşalt...@gmail.com wrote: Also I have a problem like yours. Servlet session and Wicket's session are different so you are getting nul. Just debug your application and you will see that they have different session Id's. I tried to use WicketSessionFilter but it doesn't work. I am using wicket 1.3.5. Cheers... Altug. 2009/6/23 danisevsky danisev...@gmail.com hello, I am using MyMultiFileUploadServlet for uploading files and in some wicket component I need find out how many files was uploaded. I was trying to set this number to the HttpSession in MyMultiFileUploadServlet and get it in the component: HttpSession httpSession = ((WebRequest) getRequest()).getHttpServletRequest() .getSession(); String count = httpSession .getAttribute(filesCount); but count is always null. Is there any way how to get some data from servlet? Thanks -- Altuğ. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Altuğ. - To unsubscribe, e-mail
Re: how to get some data from servlet
I forgot to say : I am using Wicket 1.3.6 + Tomcat + java 6 maybe it gives a clue 2009/7/24 Altuğ B. Altıntaş alt...@gmail.com I will post my codes. But now i catched a very very strange position in WicketSessionFilter . Let me explain : I used WicketSessionFilter and a Simple UploadServlet as Igor said. I tested my application using Firefox 3. It gives : java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle bla bla bla ... I tried to debug WicketSessionFilter , I can see that Filter runs and sets the Session into Thread but then My Servlet doesn't get the Session because some how WicketSessionFilter 's finally block runs and Session.unset() method executes. I think my Servlet can't catch the Session in Thread that WicketSessionFilter puts or something like that. The most strange part is : When I tested my application using Internet Explorer 8, WOOWs , It works. My Upload servlet can reach the same Session without any exception. I think It means WicketSessionFilter and UploadServlet runs in proper order. Also I tested my application in Chrome, and I get the same exception : java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle It likes producer and consumer problem. Sessions in Wicket will kill me :) Also I set up Wicket examples and I can see WicketSessionFilter runs properly. Any suggestions ? Thank you everybody. Altug. 2009/7/23 Fernando Wermus fernando.wer...@gmail.com Could you show to us the whole code? I mean, the page or panel that upload the files as well the IRequestTarget class you have implemented? On Thu, Jul 23, 2009 at 10:31 AM, Altuğ B. Altıntaş alt...@gmail.com wrote: Hi all ; I can't use WicketSessionFilter maybe because I am using Apache Shiro (old name is Apache Kİ). In fact Fernando's solution works; Now I can reach and use Session inside UploadRequestTarget which implements IRequestTarget. But then I realized that I reach a different Session object in UploadRequestTarget class. It creates a new Session so i can NOT access it in other WebPages. In my Application class; @Override public final Session newSession(Request request, Response response) { return new MySession(request); } Are there any way to access all Sessions or stop creating a new Session in UploadRequestTarget (which implements IRequestTarget) Thanks. Altug. 2009/7/20 Igor Vaynberg igor.vaynb...@gmail.com see WicketSessionFilter -igor On Sun, Jul 19, 2009 at 3:20 PM, Altuğ B. Altıntaşalt...@gmail.com wrote: Hi Igor; I found the problem; problem is when i hit my UploadServlet via http-get method , i simply write the url and hit the enter then below code is working Session wicketSession = Session.get(); I can get wicket Session, wow !! it is great... BUT ... When i hit my UploadServlet via http-post method, swfupload access in that way then i can NOT access wicketSession. I mean this code : Session wicketSession = Session.get(); it throws : java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle Any idea ? Thanks Altug.. 2009/7/14 Igor Vaynberg igor.vaynb...@gmail.com that doesnt make any sense. all things within the webapp share the session. you guys are welcome to create a quickstart that replicates this. -igor On Tue, Jul 14, 2009 at 3:47 AM, Altuğ B. Altıntaş alt...@gmail.com wrote: Also I have a problem like yours. Servlet session and Wicket's session are different so you are getting nul. Just debug your application and you will see that they have different session Id's. I tried to use WicketSessionFilter but it doesn't work. I am using wicket 1.3.5. Cheers... Altug. 2009/6/23 danisevsky danisev...@gmail.com hello, I am using MyMultiFileUploadServlet for uploading files and in some wicket component I need find out how many files was uploaded. I was trying to set this number to the HttpSession in MyMultiFileUploadServlet and get it in the component: HttpSession httpSession = ((WebRequest) getRequest()).getHttpServletRequest() .getSession(); String count = httpSession .getAttribute(filesCount); but count is always null. Is there any way how to get some data from servlet? Thanks -- Altuğ. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users
Re: how to get some data from servlet
Hi Igor; I found the problem; problem is when i hit my UploadServlet via http-get method , i simply write the url and hit the enter then below code is working Session wicketSession = Session.get(); I can get wicket Session, wow !! it is great... BUT ... When i hit my UploadServlet via http-post method, swfupload access in that way then i can NOT access wicketSession. I mean this code : Session wicketSession = Session.get(); it throws : java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle Any idea ? Thanks Altug.. 2009/7/14 Igor Vaynberg igor.vaynb...@gmail.com that doesnt make any sense. all things within the webapp share the session. you guys are welcome to create a quickstart that replicates this. -igor On Tue, Jul 14, 2009 at 3:47 AM, Altuğ B. Altıntaşalt...@gmail.com wrote: Also I have a problem like yours. Servlet session and Wicket's session are different so you are getting nul. Just debug your application and you will see that they have different session Id's. I tried to use WicketSessionFilter but it doesn't work. I am using wicket 1.3.5. Cheers... Altug. 2009/6/23 danisevsky danisev...@gmail.com hello, I am using MyMultiFileUploadServlet for uploading files and in some wicket component I need find out how many files was uploaded. I was trying to set this number to the HttpSession in MyMultiFileUploadServlet and get it in the component: HttpSession httpSession = ((WebRequest) getRequest()).getHttpServletRequest() .getSession(); String count = httpSession .getAttribute(filesCount); but count is always null. Is there any way how to get some data from servlet? Thanks -- Altuğ. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Altuğ.
Re: how to get some data from servlet
Great solution Fernando. It works !!! Thanks. 2009/7/20 Fernando Wermus fernando.wer...@gmail.com Hi, Instead using a servlet you could try the following (you can find the whole code at wicketstuff pickwick ) This way you will have the session because your are into the requestCycle On your WicketApp mount(new URIRequestTargetUrlCodingStrategy(/upload) { @Override public IRequestTarget decode(RequestParameters requestParameters) { try { return new UploadRequestTarget(decodeParameters(requestParameters).getString(uri)); } catch (Exception e) { throw new WicketRuntimeException(e); } } }); Your own class for uploading images or whatever you want public class UploadRequestTarget implements IRequestTarget { String parameters; public UploadRequestTarget(String parameters) { this.parameters=uri; } public void detach(RequestCycle requestCycle) {} public void respond(RequestCycle requestCycle) { HttpServletRequest request=((WebRequest)requestCycle.getRequest()).getHttpServletRequest(); HttpServletResponse response=((WebResponse)requestCycle.getResponse()).getHttpServletResponse(); response.setHeader(Connection,close); FileItemFactory factory = new DiskFileItemFactory(); ServletFileUpload upload = new ServletFileUpload(factory); List items=null; PrintWriter out=null; try { out = response.getWriter(); items = upload.parseRequest(request); for (int i = 0; i items.size(); i++) { DiskFileItem item = (DiskFileItem) items.get(i); // As we are interested not in regular form fields, we filter only files if (!item.isFormField()) { String fileName=COMPLETE IT item.write(new File(fileName)); out.print(RESP.100); out.flush(); } } } catch (FileUploadException e1) { out.print(RESP.200); // flush the stream to speed up applet notification out.flush(); e1.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } } On Sun, Jul 19, 2009 at 3:20 PM, Altuğ B. Altıntaş alt...@gmail.com wrote: Hi Igor; I found the problem; problem is when i hit my UploadServlet via http-get method , i simply write the url and hit the enter then below code is working Session wicketSession = Session.get(); I can get wicket Session, wow !! it is great... BUT ... When i hit my UploadServlet via http-post method, swfupload access in that way then i can NOT access wicketSession. I mean this code : Session wicketSession = Session.get(); it throws : java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle Any idea ? Thanks Altug.. 2009/7/14 Igor Vaynberg igor.vaynb...@gmail.com that doesnt make any sense. all things within the webapp share the session. you guys are welcome to create a quickstart that replicates this. -igor On Tue, Jul 14, 2009 at 3:47 AM, Altuğ B. Altıntaşalt...@gmail.com wrote: Also I have a problem like yours. Servlet session and Wicket's session are different so you are getting nul. Just debug your application and you will see that they have different session Id's. I tried to use WicketSessionFilter but it doesn't work. I am using wicket 1.3.5. Cheers... Altug. 2009/6/23 danisevsky danisev...@gmail.com hello, I am using MyMultiFileUploadServlet for uploading files and in some wicket component I need find out how many files was uploaded. I was trying to set this number to the HttpSession in MyMultiFileUploadServlet and get it in the component: HttpSession httpSession = ((WebRequest) getRequest()).getHttpServletRequest() .getSession(); String count = httpSession .getAttribute(filesCount); but count is always null. Is there any way how to get some data from servlet? Thanks -- Altuğ. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Altuğ. -- Fernando Wermus. www.linkedin.com/in/fernandowermus -- Altuğ.
Re: how to get some data from servlet
Also I have a problem like yours. Servlet session and Wicket's session are different so you are getting nul. Just debug your application and you will see that they have different session Id's. I tried to use WicketSessionFilter but it doesn't work. I am using wicket 1.3.5. Cheers... Altug. 2009/6/23 danisevsky danisev...@gmail.com hello, I am using MyMultiFileUploadServlet for uploading files and in some wicket component I need find out how many files was uploaded. I was trying to set this number to the HttpSession in MyMultiFileUploadServlet and get it in the component: HttpSession httpSession = ((WebRequest) getRequest()).getHttpServletRequest() .getSession(); String count = httpSession .getAttribute(filesCount); but count is always null. Is there any way how to get some data from servlet? Thanks -- Altuğ.
class files disappered while deployment
Hi all; I have very interesting problem. I am using netbeans 6.5 + tomcat 6.x + wicket 1.3.5.. My problem is java.lang.NoClassDefFoundError but not a standard one. I have a wicket page Buy.java and Buy.html. When java files are compiled below class files are generated Buy$1.class -- inner class - ok Buy$FileListView.class -- inner class - ok Buy.class -- main class - ok Buy.html -- template html file -ok Here is the most interesting part; When i deploy my application using Netbeans (simply press run button on Netbeans), it gives java.lang.NoClassDefFoundError : com/shop/web/enter/Buy When i inspect directory, I see that Buy.class is disappeared but other inner classes are there (Buy$1.class ...etc). Something is wrong but i couldn't understand. Any suggestion ? Thanks. -- Altuğ.
Re: Just showing rating results
Yes; it worked ! Thanks. 10 Nisan 2009 Cuma 13:52 tarihinde Martin Makundi martin.maku...@koodaripalvelut.com yazdı: You could use RatingPanel as it does have the feature isEnabled() = !hasVoted.getObject(); This means that a 'voted' element cannot be clicked. ** Martin 2009/4/10 Altuğ B. Altıntaş alt...@gmail.com: Hi; How can i just show rating results of my ratings in the page. I know RatingPanel component but i need just to show rating in stars (ex : as an image), i don't want Ajax or clickable component. When you visit youtube homepage, you see the stars about ratings but they are not clickable, just image, i want that feature. Do you know any components in wicket that statfiy this feature. Thanks. -- Altuğ. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Altuğ.