RE: Location of css and js files
Hi! You can use wro4j to load css js resources from anywhere (even from classpath, servlet context relative location or disc location). Another advantage is that the resources are merged and minified, thus greatly improving the response time: http://code.google.com/p/wro4j/wiki/GettingStarted Alex Objelean dale77 wrote: Hi Alex, I'm after best practice for css/img and js locations. I know there are many ways to do something, I'm after a recommendation as to what is the best way to do this in wicket. The way that allows the html markup to be opened by the web designer showing the same page view that appears at runtime. Thanks Dale -Original Message- From: Alex Rass [mailto:a...@itbsllc.com] Sent: Monday, 21 December 2009 5:03 p.m. To: users@wicket.apache.org Subject: RE: Location of css and js files Global resources you can reference globally. Use can use the non-wicket links. Container hosts folders you can use. Idea behind this is to use components which are fully contained. Hence (all in one place). If this doesn't suit you - there are bunch of tutorials on how to load resources from elsewhere. - Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/-announce--wicket-1.4.5-released-tp26868988p26871530.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
ajax update a column header when changing a cell
Hi, I have a DataTable in which two columns are holding checkboxes (when selecting a checkbox, the other in the same row will be unselected). We chose checkboxes to enable the user to remove selections at all. I want to add a 'Select All' to the header. *My problem is how do I get the component of the header to add it to the ajax checkbox of the column?* I can solve this problem by adding the whole table to ajax checkboxes, but I prefer to pass as few lines in the ajax calls. Here's some code: private AbstractColumn newActionCheckboxColumn(final String approvedRejectReassign) { AbstractColumn p = new AbstractColumn(new ResourceModel(EditingTasksTablePanel. + approvedRejectReassign)) { private static final long serialVersionUID = 1L; public void populateItem(Item cellItem, String componentId, IModel rowModel) { EditingTask task = (EditingTask) rowModel.getObject(); cellItem.add(new TaskActionCheckboxPanel(componentId, task, approvedRejectReassign, cellItem.getParent() .getParent())); } @Override public Component getHeader(String componentId) { return new TaskActionCheckboxAllPanel(componentId, dataProvider, all+approvedRejectReassign, EditingTasksTablePanel.this); } }; return p; } TaskActionCheckboxPanel(String id, final EditingTask task, String approveRejectProperty, final Component... rowComponent) { super(id); final AjaxCheckBox checkbox = new AjaxCheckBox(checkbox, new PropertyModel(task, approveRejectProperty)) { private static final long serialVersionUID = 1L; @Override protected void onUpdate(AjaxRequestTarget target) { for (Component component : rowComponent) { target.addComponent(component); } } }; add(checkbox); } public TaskActionCheckboxAllPanel(String id, EditingTasksSortableDataProvider tasksSortableDataProvider, String checkAllProperty, final Component updatedComponent) { super(id); final AjaxCheckBox checkbox = new AjaxCheckBox(checkbox, new PropertyModel(tasksSortableDataProvider, checkAllProperty)) { private static final long serialVersionUID = 1L; @Override protected void onUpdate(AjaxRequestTarget target) { target.addComponent(updatedComponent); } }; add(checkbox); this.setOutputMarkupId(true); } * I will make the two panels the same after doing all changes... thanks Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: Location of css and js files
None of these solutions are going to do what the OP really needs since they all assume an app server is serving the pages. Presumably he wants the designer to be able to run up the static HTML in the browser, without running in a web application. You have a few options: 1. link the files as siggested before, ie the HTML knows where the CSS lives and references it normally. If you don't want to have to adjust it later, put it in the same directory as the classes and HTML. You won't need to start the webapp to modify it. 2. Do it in a normal webapp structure as you suggested with the javascript and css directories, and use the Wicket provided HeaderContributor to load it. You'll need to deploy the webapp, but your designer can edit the HTML live if he edits the deployed structure. This approach isn't the greatest since if the webapp is redeployed it will be overwritten. I dont think there is a neat way to do it offline but still in the Wicket way, without having it all with the classes. cheers, Steve On 21/12/2009, at 8:19 PM, Alex Objelean wrote: Hi! You can use wro4j to load css js resources from anywhere (even from classpath, servlet context relative location or disc location). Another advantage is that the resources are merged and minified, thus greatly improving the response time: http://code.google.com/p/wro4j/wiki/GettingStarted Alex Objelean dale77 wrote: Hi Alex, I'm after best practice for css/img and js locations. I know there are many ways to do something, I'm after a recommendation as to what is the best way to do this in wicket. The way that allows the html markup to be opened by the web designer showing the same page view that appears at runtime. Thanks Dale -Original Message- From: Alex Rass [mailto:a...@itbsllc.com] Sent: Monday, 21 December 2009 5:03 p.m. To: users@wicket.apache.org Subject: RE: Location of css and js files Global resources you can reference globally. Use can use the non-wicket links. Container hosts folders you can use. Idea behind this is to use components which are fully contained. Hence (all in one place). If this doesn't suit you - there are bunch of tutorials on how to load resources from elsewhere. - Alex - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/-announce--wicket-1.4.5-released-tp26868988p26871530.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 smime.p7s Description: S/MIME cryptographic signature
[BUG] RequestUtils.toAbsolutePath() for ajax requests
I have a use-case, when I want to render absolute url for some images using a shared resource. The absolute url looks like this: http://localhost:8080/resources/org.apache.wicket.Application/com.mysite.web.util.resource.ProductImageResource?id=47331bd95fa69f7f001-main.jpg Everything works fine, except when the panel containing these images is updated via ajax. In this case, the absolute url looks like this: resources/org.apache.wicket.Application/com.mysite.web.util.resource.ProductImageResource?id=47449058d8e54c7f001-main.jpg The problem is dependent on UrlCodingStrategy used. For instance, there is no problem if QueryStringUrlCodingStrategy is used. On the other hand, when BookmarkablePageRequestTargetUrlCodingStrategy or MixedParamUrlCodingStrategy is used, then the problem can be reproduced. It is very probable, that when using this kind of url coding strategies, the algorithm of computing absolute url's should be slightly different. Alex Objelean
SV: applet in wicket .. exception thrown ...
Problem adding an applet to wicket still remains the same.. can some 1 help 1) Be aware that applets are not loaded from WEB-INF/classes, but it seems you know this. 2) The class attribute value should not end in .class since that can make some browsers try to load HelloWorld.class.class instead. 3) Remember to add the class' package as a folder structure under webapp and use that package when naming the class in the applet element. - Tor Iver
Re: SV: applet in wicket .. exception thrown ...
should i create a package under WEBAPP called Class and then add the applet.class file there ??? but still i am getting a NOCLASSFOUND exception ... Wilhelmsen Tor Iver wrote: Problem adding an applet to wicket still remains the same.. can some 1 help 1) Be aware that applets are not loaded from WEB-INF/classes, but it seems you know this. 2) The class attribute value should not end in .class since that can make some browsers try to load HelloWorld.class.class instead. 3) Remember to add the class' package as a folder structure under webapp and use that package when naming the class in the applet element. - Tor Iver -- View this message in context: http://old.nabble.com/applet-in-wicket-..-exception-thrown-...-tp26814020p26872439.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
Re: SV: applet in wicket .. exception thrown ...
This is the exact error message that i get Java Plug-in 1.6.0_10 Using JRE version 1.6.0_10 Java HotSpot(TM) Client VM User home directory = C:\Documents and Settings\mohamed.s c: clear console window f: finalize objects on finalization queue g: garbage collect h: display this help message l: dump classloader list m: print memory usage o: trigger logging q: hide console r: reload policy configuration s: dump system and deployment properties t: dump thread list v: dump thread stack x: clear classloader cache 0-5: set trace level to n load: class /myproject/src/main/webapp/Class/HelloWorld not found. java.lang.ClassNotFoundException: .myproject.src.main.webapp.Class.HelloWorld at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source) at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: open HTTP connection failed:http://localhost:8080/myproject/src/main/webapp/Class/HelloWorld.class at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) ... 7 more Exception: java.lang.ClassNotFoundException: .myproject.src.main.webapp.Class.HelloWorld local_shamil wrote: should i create a package under WEBAPP called Class and then add the applet.class file there ??? but still i am getting a NOCLASSFOUND exception ... -- View this message in context: http://old.nabble.com/applet-in-wicket-..-exception-thrown-...-tp26814020p26872593.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
Wicket position in Vienna
Hi I'm currently looking for Java Developer for a new contract position in Vienna. I need someone who is a expert in Wicket as I'm doing a migration project from Struts to Wicket the other skills I'm looking for are Eclipse, HTML, CSS, and Scrum. This contract is due to start at the end of January and will last for 6 months. Can anyone help me?? Regards Andy __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __
WicketServlet/WicketFilter client cache lifetime How-to ?
Hi! I want to allow client browsrs to cache static resources from /webapp/* (namely /webapp/images, /webapp/css /webapp/js, etc.). I thought I could achieve this by configuring jetty: http://stackoverflow.com/questions/1906745/how-to-configure-cache-for-static-resources-in-web-xml-for-jetty/ However, as it turns out (after some debugging) all the static resources are served via WicketServlet too. Could someone help me in configuring either wicketservlet (compannioned with wicketfilter??) or wicketfilter such that static resources in /webapp/* get a client cache lifetime of 1 hour. Currently all static content from /webapp/* is served without cache headers, which puts quite a strain on the server. ** Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket position in Vienna
if working remotely is an option you can contact me to discuss it. Andy Clayton-5 wrote: Hi I'm currently looking for Java Developer for a new contract position in Vienna. I need someone who is a expert in Wicket as I'm doing a migration project from Struts to Wicket the other skills I'm looking for are Eclipse, HTML, CSS, and Scrum. This contract is due to start at the end of January and will last for 6 months. Can anyone help me?? Regards Andy __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ -- View this message in context: http://old.nabble.com/Wicket-position-in-Vienna-tp26872940p26873295.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
RE: Wicket position in Vienna
Unfortunately remote working isn't a option. This position is based in the Vienna office. -Original Message- From: kman [mailto:kouts...@kproject.gr] Sent: 21 December 2009 12:22 To: users@wicket.apache.org Subject: Re: Wicket position in Vienna if working remotely is an option you can contact me to discuss it. Andy Clayton-5 wrote: Hi I'm currently looking for Java Developer for a new contract position in Vienna. I need someone who is a expert in Wicket as I'm doing a migration project from Struts to Wicket the other skills I'm looking for are Eclipse, HTML, CSS, and Scrum. This contract is due to start at the end of January and will last for 6 months. Can anyone help me?? Regards Andy __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ -- View this message in context: http://old.nabble.com/Wicket-position-in-Vienna-tp26872940p26873295.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 __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Java Wicket Job Opportunity, Finland
Yeah, working remotely IS an option. ** Martin 2009/12/19 Martin Makundi martin.maku...@koodaripalvelut.com: Hi! We are looking for talented individuals to work with us on our online products. Development tools include: * java + wicket * m2eclipse, eclipse ide * jpa + hibernate * javascript + jquery Contact me for more information if you are interested. ** Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
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: Tag Oriented Development
I know JSF is standard; what is your idea about current JSF status? Just forget about it ... ;) ** Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ObjectAutoCompleteField and specifying the fields from the object to use
On further investigation, the values aren't being separated after all. What is added to the textfield is what is submitted in the form. Is it possible to submit a different value than just the display text? thanks, Steve On 21/12/2009, at 1:54 PM, Steve Swinsburg wrote: Nevermind. I ended up going with this approach where I could separate the values: http://cwiki.apache.org/WICKET/autocomplete-using-a-wicket-model.html I will add my code snippet to the page. cheers, Steve On 21/12/2009, at 11:57 AM, Steve Swinsburg wrote: Hi, I am using ObjectAutoCompleteField from WicketStuff and it looks like what I need for my scenario: I have an object list with a bunch of fields and when the user searches, it needs to match on a certain field and display the list of matches. The examples do this with a Car object with an Integer field for the ID and a String for the car name. However, there seems to be no way to tell it *what* fields to use in the supplied object. You can only give the component the Type of fields to look up, and it gets the field to use by reflection. This assumes only one field in that object will be of that Type. ie How could I make it would with a list of these objects: class Person { String userId; String displayName; ... } Giving the ObjectAutoCompleteField the types Person,String won't work, it won't know what field to use. ListPerson persons = getPersons(); ObjectAutoCompleteBuilderPerson,String builder = new ObjectAutoCompleteBuilderPerson,String( new AutoCompletionChoicesProviderUser() { public IteratorPerson getChoices(String input) { ListPerson subSet = getPersonSubSet(persons, input); return subSet.iterator(); } } ); ObjectAutoCompleteField toField = builder.build(toField, new ModelString()); form.add(toField); Any ideas? thanks, Steve smime.p7s Description: S/MIME cryptographic signature
Re: Java Wicket Job Opportunity, Finland
Remember to mention such things to your recruitment agents. regards Nino 2009/12/21 Martin Makundi martin.maku...@koodaripalvelut.com: Yeah, working remotely IS an option. ** Martin 2009/12/19 Martin Makundi martin.maku...@koodaripalvelut.com: Hi! We are looking for talented individuals to work with us on our online products. Development tools include: * java + wicket * m2eclipse, eclipse ide * jpa + hibernate * javascript + jquery Contact me for more information if you are interested. ** Martin - 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
Re: SV: applet in wicket .. exception thrown ...
Try using the correct package: code=com.mycompany.HelloWorld On Mon, Dec 21, 2009 at 6:13 AM, local_shamil shaena...@gmail.com wrote: --- load: class /myproject/src/main/webapp/Class/HelloWorld not found. java.lang.ClassNotFoundException: .myproject.src.main.webapp.Class.HelloWorld at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source) at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: open HTTP connection failed:http://localhost:8080/myproject/src/main/webapp/Class/HelloWorld.class at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) ... 7 more Exception: java.lang.ClassNotFoundException: .myproject.src.main.webapp.Class.HelloWorld local_shamil wrote: should i create a package under WEBAPP called Class and then add the applet.class file there ??? but still i am getting a NOCLASSFOUND exception ... -- View this message in context: http://old.nabble.com/applet-in-wicket-..-exception-thrown-...-tp26814020p26872593.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: SV: applet in wicket .. exception thrown ...
this was my applet tag in HTML applet code=HelloWorld.class width=150 height=25 / and i had it as this applet code=com.mycompany.HelloWorld width=150 height=25 / still i get the NOCLASS FOUND EXCEPTION James Carman-3 wrote: Try using the correct package: code=com.mycompany.HelloWorld On Mon, Dec 21, 2009 at 6:13 AM, local_shamil shaena...@gmail.com wrote: --- load: class /myproject/src/main/webapp/Class/HelloWorld not found. java.lang.ClassNotFoundException: .myproject.src.main.webapp.Class.HelloWorld at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source) at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: open HTTP connection failed:http://localhost:8080/myproject/src/main/webapp/Class/HelloWorld.class at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) ... 7 more Exception: java.lang.ClassNotFoundException: .myproject.src.main.webapp.Class.HelloWorld local_shamil wrote: should i create a package under WEBAPP called Class and then add the applet.class file there ??? but still i am getting a NOCLASSFOUND exception ... -- View this message in context: http://old.nabble.com/applet-in-wicket-..-exception-thrown-...-tp26814020p26872593.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/applet-in-wicket-..-exception-thrown-...-tp26814020p26874469.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
Re: SV: applet in wicket .. exception thrown ...
You need to make sure your HelloWorld.class file is in src/main/webapp/com/mycompany On Mon, Dec 21, 2009 at 9:13 AM, local_shamil shaena...@gmail.com wrote: this was my applet tag in HTML applet code=HelloWorld.class width=150 height=25 / and i had it as this applet code=com.mycompany.HelloWorld width=150 height=25 / still i get the NOCLASS FOUND EXCEPTION James Carman-3 wrote: Try using the correct package: code=com.mycompany.HelloWorld On Mon, Dec 21, 2009 at 6:13 AM, local_shamil shaena...@gmail.com wrote: --- load: class /myproject/src/main/webapp/Class/HelloWorld not found. java.lang.ClassNotFoundException: .myproject.src.main.webapp.Class.HelloWorld at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source) at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: open HTTP connection failed:http://localhost:8080/myproject/src/main/webapp/Class/HelloWorld.class at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) ... 7 more Exception: java.lang.ClassNotFoundException: .myproject.src.main.webapp.Class.HelloWorld local_shamil wrote: should i create a package under WEBAPP called Class and then add the applet.class file there ??? but still i am getting a NOCLASSFOUND exception ... -- View this message in context: http://old.nabble.com/applet-in-wicket-..-exception-thrown-...-tp26814020p26872593.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/applet-in-wicket-..-exception-thrown-...-tp26814020p26874469.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: SV: applet in wicket .. exception thrown ...
Yeah it worked !!! thanks alot every 1 ... and what might be the reason for this. ? why do v have to insert the applet.class file inside a package ?? James Carman-3 wrote: You need to make sure your HelloWorld.class file is in src/main/webapp/com/mycompany On Mon, Dec 21, 2009 at 9:13 AM, local_shamil shaena...@gmail.com wrote: this was my applet tag in HTML applet code=HelloWorld.class width=150 height=25 / and i had it as this applet code=com.mycompany.HelloWorld width=150 height=25 / still i get the NOCLASS FOUND EXCEPTION James Carman-3 wrote: Try using the correct package: code=com.mycompany.HelloWorld On Mon, Dec 21, 2009 at 6:13 AM, local_shamil shaena...@gmail.com wrote: --- load: class /myproject/src/main/webapp/Class/HelloWorld not found. java.lang.ClassNotFoundException: .myproject.src.main.webapp.Class.HelloWorld at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source) at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: open HTTP connection failed:http://localhost:8080/myproject/src/main/webapp/Class/HelloWorld.class at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) ... 7 more Exception: java.lang.ClassNotFoundException: .myproject.src.main.webapp.Class.HelloWorld local_shamil wrote: should i create a package under WEBAPP called Class and then add the applet.class file there ??? but still i am getting a NOCLASSFOUND exception ... -- View this message in context: http://old.nabble.com/applet-in-wicket-..-exception-thrown-...-tp26814020p26872593.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/applet-in-wicket-..-exception-thrown-...-tp26814020p26874469.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/applet-in-wicket-..-exception-thrown-...-tp26814020p26875243.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
Re: SV: applet in wicket .. exception thrown ...
You don't have to. It was already in a package. I opened up the class file to see the package declaration and it was declared to be in package com.mycompany for some reason (perhaps a quickstart?) On Mon, Dec 21, 2009 at 10:08 AM, local_shamil shaena...@gmail.com wrote: Yeah it worked !!! thanks alot every 1 ... and what might be the reason for this. ? why do v have to insert the applet.class file inside a package ?? James Carman-3 wrote: You need to make sure your HelloWorld.class file is in src/main/webapp/com/mycompany On Mon, Dec 21, 2009 at 9:13 AM, local_shamil shaena...@gmail.com wrote: this was my applet tag in HTML applet code=HelloWorld.class width=150 height=25 / and i had it as this applet code=com.mycompany.HelloWorld width=150 height=25 / still i get the NOCLASS FOUND EXCEPTION James Carman-3 wrote: Try using the correct package: code=com.mycompany.HelloWorld On Mon, Dec 21, 2009 at 6:13 AM, local_shamil shaena...@gmail.com wrote: --- load: class /myproject/src/main/webapp/Class/HelloWorld not found. java.lang.ClassNotFoundException: .myproject.src.main.webapp.Class.HelloWorld at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source) at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: open HTTP connection failed:http://localhost:8080/myproject/src/main/webapp/Class/HelloWorld.class at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) ... 7 more Exception: java.lang.ClassNotFoundException: .myproject.src.main.webapp.Class.HelloWorld local_shamil wrote: should i create a package under WEBAPP called Class and then add the applet.class file there ??? but still i am getting a NOCLASSFOUND exception ... -- View this message in context: http://old.nabble.com/applet-in-wicket-..-exception-thrown-...-tp26814020p26872593.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/applet-in-wicket-..-exception-thrown-...-tp26814020p26874469.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/applet-in-wicket-..-exception-thrown-...-tp26814020p26875243.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: SV: applet in wicket .. exception thrown ...
Oh yeah it was a quick start ... Thanks loadz James Carman-3 wrote: You don't have to. It was already in a package. I opened up the class file to see the package declaration and it was declared to be in package com.mycompany for some reason (perhaps a quickstart?) On Mon, Dec 21, 2009 at 10:08 AM, local_shamil shaena...@gmail.com wrote: Yeah it worked !!! thanks alot every 1 ... and what might be the reason for this. ? why do v have to insert the applet.class file inside a package ?? James Carman-3 wrote: You need to make sure your HelloWorld.class file is in src/main/webapp/com/mycompany On Mon, Dec 21, 2009 at 9:13 AM, local_shamil shaena...@gmail.com wrote: this was my applet tag in HTML applet code=HelloWorld.class width=150 height=25 / and i had it as this applet code=com.mycompany.HelloWorld width=150 height=25 / still i get the NOCLASS FOUND EXCEPTION James Carman-3 wrote: Try using the correct package: code=com.mycompany.HelloWorld On Mon, Dec 21, 2009 at 6:13 AM, local_shamil shaena...@gmail.com wrote: --- load: class /myproject/src/main/webapp/Class/HelloWorld not found. java.lang.ClassNotFoundException: .myproject.src.main.webapp.Class.HelloWorld at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source) at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: open HTTP connection failed:http://localhost:8080/myproject/src/main/webapp/Class/HelloWorld.class at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) ... 7 more Exception: java.lang.ClassNotFoundException: .myproject.src.main.webapp.Class.HelloWorld local_shamil wrote: should i create a package under WEBAPP called Class and then add the applet.class file there ??? but still i am getting a NOCLASSFOUND exception ... -- View this message in context: http://old.nabble.com/applet-in-wicket-..-exception-thrown-...-tp26814020p26872593.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/applet-in-wicket-..-exception-thrown-...-tp26814020p26874469.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/applet-in-wicket-..-exception-thrown-...-tp26814020p26875243.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/applet-in-wicket-..-exception-thrown-...-tp26814020p26875304.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
Re: Basic concept of Wicket
Thanks Martin and all others for anwsering my questions. Regards Daniel - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: File Upload Issues
Hi, I verified that no errors show up in the debug console window. Its as if the AJAX calls are getting swallowed up. All I am getting in the debug window is focus events. I don't see any errors in the server log file either. I upgraded to Wicket 1.4.5 and still see the issue that I've seen as far back as Version 1.4.1. J.D. -Original Message- From: Ilja Pavkovic [mailto:ilja.pavko...@binaere-bauten.de] Sent: Saturday, December 19, 2009 5:48 AM To: users@wicket.apache.org Cc: Corbin, James Subject: Re: File Upload Issues Hi, did you check the output of the wicket debug window? Perhaps any error line shows up? Best Regards, Ilja Pavkovic Am Freitag, 18. Dezember 2009 21:13:11 schrieb Corbin, James: Doug, I retested on IE6, IE7, FF3 and IE6 is the only browser that the issue shows up in. IE7 and FF3.x seem to work just fine. In IE6 I have an Add New button that adds a row to a model in a listview and then via ajax updates the listviews container which in this case is a WebMarkupContainer (yes, setOutputMarkupId(true), is specified for all updatable components in the hierarchy - and we remove all elements prior to issuing the target.addComponent(...)). If the file upload component is present on the page, clicking the Add New button's onUpdate() gets called just fine, but the expected refresh behavior from the target.addComponent(...) has no effect. If I remove the upload component from the page, then the ajax begins functioning normally. I believe we saw this issue in 1.4.1 as well and had to patch our local version of the library. I will get more details on the patch we made, but were hoping this was fixed in 1.4.4. I believe we put in a JIRA issue around this problem. I'll try and get those details as well. J.D. -Original Message- From: Corbin, James [mailto:jcor...@iqnavigator.com] Sent: Friday, December 18, 2009 12:47 PM To: users@wicket.apache.org Subject: RE: File Upload Issues Ajax has stopped working. If I remove the file upload component, the ajax begins working as expected. Is there a workaround or a pending fix? Thanks, J.D. -Original Message- From: Douglas Ferguson [mailto:doug...@douglasferguson.us] Sent: Friday, December 18, 2009 12:03 PM To: users@wicket.apache.org Subject: Re: File Upload Issues There is a bug in 1.4.4. related to resource loading. Are you sure AJAX has stopped or is it just taking A REALLY LONG TIME? This is the reason they are trying to get 1.4.5 out quickly. D/ On Dec 18, 2009, at 10:15 AM, Corbin, James wrote: Hello, I'm having issues in IE6 relating to the the File Upload Control after upgrading to Wicket 1.4.4. If I attempt to put a file upload component onto a form that contains other components that do ajax, everything stops working in regards to ajax. Now I understand that the file upload component does NOT support ajax. Does it follow that putting a file upload component on a form that does ajax is not supported? J.D. - 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 -- binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin +49 · 171 · 9342 465 Handelsregister: HRB 115854 - Amtsgericht Charlottenburg Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost Becker - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Memory leak using UndoPageVersionManager
Hi all, i'm trying to investigate a memory leak. I have taken an heap memory snapshot from the production and actually i know which wicket page retains a lot of memory without releasing it. It's a simple org.apache.wicket.markup.html.WebPage containing a org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable updated every 2-3 seconds via ajax calls. The page uses a UndoPageVersionManager, even if it doesn't need it (the user cannot hit back button in browser) which in turn contains a ChangeList. My analisys suggests that not all the ChangeList are released by garbage collector. I have verified that my code never hits the method UndoPageVersionManager.componentRemoved (so, any delete operation of objects inside the ChangeList collection is never called). Unfortunatly, i cannot reproduce the problem in my local environment. My hope is that adding 'setVersioned(false);' in my Page the problem should be fixed, but i'm not sure. What do you think about? Thanks, -- Tommaso Torti Sourcesense - making sense of Open Source: http://www.sourcesense.com
tinymce texteditor size
I am using wicketstuff tinymce text editor , I want to control the width and height of texteditor based on the size of browser , please tell me how to do this ?
Re: @RequireHttps - forms misbehaving
VGJ, You might have discovered a limitation of the system or a bug. As I wrote, I would recommend you make a testcase with all distracting detail removed and submit it as a jira issue, then post a link to the the issue here. I understand your frustration, but I think the above would be the best investment of your own efforts. Regards, Bernard. On Mon, 21 Dec 2009 11:13:49 -0700, you wrote: Well, I'm still unable to spot anything strange. No matter what page I annotate, it doesn't switch to https until the form is submitted. It then goes to https (as if it's redirecting to itself?) and triggers the validation on the page, even if the correct fields are filled in. No matter what page I annotate on this site, it happens the same way. Here's an example from this app: The login or create a new account page: @RequireHttps public class UserAccount extends BasePage { public UserAccount() { //get user from session User user = ((UserSession)getSession()).getUser(); //pass go, collect $200 if (user != null) throw new RestartResponseException(new ContactInfo()); add(new FeedbackPanel(feedbackPanel)); //get cart in session ShoppingCartLocal cart = ((UserSession)getSession()).getCart(); //entities Order order = cart.getOrder(); Customer customer = order.getCustomer(); String email = (order != null customer != null) ? customer.getEmail() : ; //form model (entity) if (user == null) user = new User(); //if email exists, pre-populate form if (email != null !email.equals()) user.setUsername(email); final Form returnUserForm = new Form(retUserAccountForm, new CompoundPropertyModel(user)); final Form newUserForm = new Form(newUserAccountForm, new CompoundPropertyModel(user)); //add form components returnUserForm.add(new TextField(username) .setRequired(true) .add(EmailAddressPatternValidator.getInstance())); returnUserForm.add(new PasswordTextField(password)); returnUserForm.add(new Button(userAcctButton) { public void onSubmit() { ShoppingCartLocal cart = null; try { //save form values, redirect User user = (User)returnUserForm.getModelObject(); //get cart from session cart = ((UserSession)getSession()).getCart(); //create order in session cart = CartProxy.authUserAccount(cart, user); //set cart back to session log user in ((UserSession)getSession()).setCart(cart); ((UserSession)getSession()).setUser( cart.getOrder().getCustomer().getUser()); //redirect setResponsePage(new ContactInfo()); } catch (Exception exp) { info(exp.getMessage()); LogProxy.saveEntry(exp); } } }); returnUserForm.add(new Link(forgotPasswordLink) { public void onClick() { setResponsePage(new ForgotPassword()); } }); //add form components newUserForm.add(new TextField(username) .setRequired(true) .add(EmailAddressPatternValidator.getInstance())); newUserForm.add(new Button(userAcctButton) { public void onSubmit() { ShoppingCartLocal cart = null; try { //save form values, redirect User user = (User)newUserForm.getModelObject(); //get cart from session cart = ((UserSession)getSession()).getCart(); //create order in session cart = CartProxy.createUserAccount(cart, user); //set cart back to session log user in ((UserSession)getSession()).setCart(cart); ((UserSession)getSession()).setUser( cart.getOrder().getCustomer().getUser()); //redirect setResponsePage(new ContactInfo()); } catch (Exception exp) { info(exp.getMessage()); LogProxy.saveEntry(exp); } } }); //add forms add(returnUserForm); add(newUserForm); } } ...the BasePage class: public abstract class BasePage extends WebPage { private String pageTitle = My page title!; public BasePage() { //add page title add(new Label(title, new PropertyModel(this, pageTitle))); //add page components add(new TrailPanel(trailPanel, TrailFactory.getUserPageTrail(this.getPageClass().getSimpleName(; add(new HeaderPanel(headerPanel)); add(new FooterPanel(footerPanel)); } public final String getPageTitle() { return pageTitle; } public final void setPageTitle(String title) { this.pageTitle = title; } protected void redirect(String url) { //disable wicket redirecting getRequestCycle().setRedirect(false); //make sure no output for the current cycle is sent
Re: @RequireHttps - forms misbehaving
I see, I guess I misunderstood you. I wasn't able to reproduce it in a separate test application, however. It has to be encountering something in this particular application that is causing a problem. I just can't figure out what that might be, exactly. I would submit the small test case I made but it works just fine. I can't submit the application with the issue I've described, it's company code. -v On Mon, Dec 21, 2009 at 12:45 PM, b...@actrix.gen.nz wrote: VGJ, You might have discovered a limitation of the system or a bug. As I wrote, I would recommend you make a testcase with all distracting detail removed and submit it as a jira issue, then post a link to the the issue here. I understand your frustration, but I think the above would be the best investment of your own efforts. Regards, Bernard. On Mon, 21 Dec 2009 11:13:49 -0700, you wrote: Well, I'm still unable to spot anything strange. No matter what page I annotate, it doesn't switch to https until the form is submitted. It then goes to https (as if it's redirecting to itself?) and triggers the validation on the page, even if the correct fields are filled in. No matter what page I annotate on this site, it happens the same way. Here's an example from this app: The login or create a new account page: @RequireHttps public class UserAccount extends BasePage { public UserAccount() { //get user from session User user = ((UserSession)getSession()).getUser(); //pass go, collect $200 if (user != null) throw new RestartResponseException(new ContactInfo()); add(new FeedbackPanel(feedbackPanel)); //get cart in session ShoppingCartLocal cart = ((UserSession)getSession()).getCart(); //entities Order order = cart.getOrder(); Customer customer = order.getCustomer(); String email = (order != null customer != null) ? customer.getEmail() : ; //form model (entity) if (user == null) user = new User(); //if email exists, pre-populate form if (email != null !email.equals()) user.setUsername(email); final Form returnUserForm = new Form(retUserAccountForm, new CompoundPropertyModel(user)); final Form newUserForm = new Form(newUserAccountForm, new CompoundPropertyModel(user)); //add form components returnUserForm.add(new TextField(username) .setRequired(true) .add(EmailAddressPatternValidator.getInstance())); returnUserForm.add(new PasswordTextField(password)); returnUserForm.add(new Button(userAcctButton) { public void onSubmit() { ShoppingCartLocal cart = null; try { //save form values, redirect User user = (User)returnUserForm.getModelObject(); //get cart from session cart = ((UserSession)getSession()).getCart(); //create order in session cart = CartProxy.authUserAccount(cart, user); //set cart back to session log user in ((UserSession)getSession()).setCart(cart); ((UserSession)getSession()).setUser( cart.getOrder().getCustomer().getUser()); //redirect setResponsePage(new ContactInfo()); } catch (Exception exp) { info(exp.getMessage()); LogProxy.saveEntry(exp); } } }); returnUserForm.add(new Link(forgotPasswordLink) { public void onClick() { setResponsePage(new ForgotPassword()); } }); //add form components newUserForm.add(new TextField(username) .setRequired(true) .add(EmailAddressPatternValidator.getInstance())); newUserForm.add(new Button(userAcctButton) { public void onSubmit() { ShoppingCartLocal cart = null; try { //save form values, redirect User user = (User)newUserForm.getModelObject(); //get cart from session cart = ((UserSession)getSession()).getCart(); //create order in session cart = CartProxy.createUserAccount(cart, user); //set cart back to session log user in ((UserSession)getSession()).setCart(cart); ((UserSession)getSession()).setUser( cart.getOrder().getCustomer().getUser()); //redirect setResponsePage(new ContactInfo()); } catch (Exception exp) { info(exp.getMessage()); LogProxy.saveEntry(exp); } } }); //add forms add(returnUserForm); add(newUserForm); } } ...the BasePage class: public abstract class BasePage extends WebPage { private String pageTitle = My page title!; public BasePage() { //add page title add(new Label(title, new
Re: @RequireHttps - forms misbehaving
Jason...excellent! setResponsePage(UserAccount.class) did the trick! Thanks! Using setRedirect(true) didn't have any effect however. I had to redirect to the page class rather than a new instance of it. This works for me right now...but what happens when I'd like to pass parameters into the constructor of the page I'm redirecting to? -v On Mon, Dec 21, 2009 at 1:52 PM, Jason Lea ja...@kumachan.net.nz wrote: Here are a couple of things to try... @RequireHttps checks when the request comes into wicket and issues a redirect if it is on the wrong protocol. I wonder if it is because you are using setResponsePage(new ContactInfo()); without a redirect, so the @RequireHttps annotation is not checked but the page still renders. When you do actually submit the form on the page, wicket can then process the @RequireHttps annotation and redirects to the page and maybe loses the posted form values? If this was happening you would probably see url has not changed from http to https. Try adding setRedirect(true) or better yet use the setResponsePage(ContactInfo.class); method instead which will do a redirect for you. If the problem is still occuring, try the HttpFox plugin and look at the requests and redirects that occur and see if it does issue redirects to change to https somewhere. The other place redirects occur is with your use of HybridUrlCodingStrategy... try a different strategy to see if that causes the problem to go away. If there are still problems, you could check the session id to make sure it is not being lost when switching from http-https (HttpFox is good for seeing the cookies, and see if the jsessionid cookie changed or not) VGJ wrote: I see, I guess I misunderstood you. I wasn't able to reproduce it in a separate test application, however. It has to be encountering something in this particular application that is causing a problem. I just can't figure out what that might be, exactly. I would submit the small test case I made but it works just fine. I can't submit the application with the issue I've described, it's company code. -v -- Jason Lea - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Single App, Multiple Domains
Put it in the request cycle. Have it set it on the session or request. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Dec 16, 2009 at 1:43 AM, Janning Vygen vy...@kicktipp.de wrote: On Wednesday 16 December 2009 02:06:28 Matthias Howell wrote: One of my requirements is to support the same app in a single instance responding to multiple domain names. E.g. www.domain1.com/webapp gets to the app and the app is in English - English text, English images. www.domain2.com/webapp is on the same machine but is in French - all the text and images are in French. I am wicket user since last friday, so handle with care: from http://cwiki.apache.org/WICKET/lifecycle-of-a-wicket-application.html 1. Wicket asks the Application class to create a Session for the servlet request. If no session exists for the incoming request, a Session object is created using the application's session factory. So you can just override the Application.newSession method, LIKE this public Session newSession ( Request request, Response response ) { Session session = new YourSession(request); session.setLocale(Locale.ENGLISH); String serverName = ((WebRequest) request).getHttpServletRequest().getServerName(); if (serverName.equals(www.domain2.com)) { session.setLocale(Locale.FRENCH); } return session; } Might be better to put this code into Session Constructor. kind regards Janning - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
opening modelwindow freezes IE8
Hi everyone, I've had a report from a user of a Wicket app, that when the AjaxLink to open a ModalWindow is clicked, the ModalWindow opens and the browser freezes. This is on IE8 and in Windows 7 or XP. However, running it in Compatibility Mode it seemed to work. Works ok in other browsers. Has anyone experienced this? The code is nothing out of the ordinary I don't think: Unless its the getParent() calls to get the ModelObject for this list item? Could I do that another way? final AjaxLink connectionLink = new AjaxLink(connectionLink) { public void onClick(AjaxRequestTarget target) { //get this item, reinit some values and set content for modal SearchResult this_searchResult = (SearchResult)getParent().getParent().getDefaultModelObject(); final String userUuid = this_searchResult.getUserUuid(); connectionWindow.setContent(new AddFriend(connectionWindow.getContentId(), userUuid, some more params…)); // connection modal window handler connectionWindow.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() { public void onClose(AjaxRequestTarget target){ //update some labels } }); connectionWindow.show(target); } }; thanks, Steve smime.p7s Description: S/MIME cryptographic signature
Re: opening modelwindow freezes IE8
On Tue, 22 Dec 2009, Steve Swinsburg wrote: Forgot to mention, this was Wicket 1.3.6. I upgraded the app to 1.4.5 yesterday, but this user has an older version. I see this with the Chrome browser as well under 1.4.5, but it works just fine with 1.4.4. Some of the modal windows in my Wicket application work just fine, others do not with the latest release. -Craig -- Craig Kelley http://inconnu.islug.org/~ink finger same server for PGP block - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Logging Configuration Question
Hi list, sorry if I'm double posting but I sent a question two days ago and haven't seen it on the daily digest yet. I'm using Java Utils Logging along with Wicket and I have a log.properties which I read in the WicketApplication init method as follows: java.util.logging.LogManager.getLogManager().readConfiguration(input); I confirm that my log.properties is read in correctly using a debugger. My log.properties file is as follows: --- # Specify the handlers to create in the root logger # (all loggers are children of the root logger) # The following creates two handlers handlers = java.util.logging.ConsoleHandler, java.util.logging.FileHandler # Set the default logging level for the root logger .level = WARNING # Set the default logging level for new ConsoleHandler instances java.util.logging.ConsoleHandler.level = ALL java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter # Set the default logging level for new FileHandler instances java.util.logging.FileHandler.level = ALL java.util.logging.FileHandler.pattern = %h/stagetwo.log java.util.logging.FileHandler.limit = 5 java.util.logging.FileHandler.count = 1 java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter # Set the default logging level for the logger named com.truecool com.truecool.stagetwo.level = WARNING org.apache.wicket.level = WARNING org.apache.wicket.markup.resolver.WicketMessageResolver.level = SEVERE # Hibernate Logging options #logger.org.hibernate=info org.hibernate.level = WARNING --- For whatever reason I'm still getting all the WicketMessageResolver warnings in my logs. Any suggestions on how to get rid of the WicketMessageResolver warnings? Thanks, Martin Zardecki - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Using component resolver with enclosures in 1.4.5
With version 1.4.2 I finally got a component resolver mechanism working for components within enclosures so that the components could be dynamically populated instead of hard coding the creation of every possible component that 'might' be needed by the markup. I just upgraded to 1.4.5 and my component resolver mechanism no longer works with a message: ERROR - RequestCycle - Tag expected [markup = wicket\markup\pages\HomePage_47.html A dump of the html file then follows. The closing /wicket:enclosure tag is highlighted. Do we need to do component resolvers in enclosures differently in 1.4.5? If so any hints would be appreciated. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: @RequireHttps - forms misbehaving
yay! But it is odd if setRedirect(true) didn't work when using a page instance. I wonder if the there is an issue with HybridUrlCodingStrategy and RequireHttps... can you mount the page you redirect to using a simple bookmarkable page and see if it works? I also noticed you have a method on your BasePage class called redirect(url) that disables wicket redirect... does that get called when you use setRedirect(true)? VGJ wrote: Jason...excellent! setResponsePage(UserAccount.class) did the trick! Thanks! Using setRedirect(true) didn't have any effect however. I had to redirect to the page class rather than a new instance of it. This works for me right now...but what happens when I'd like to pass parameters into the constructor of the page I'm redirecting to? -v -- Jason Lea - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ObjectAutoCompleteField and specifying the fields from the object to use
I decided against using the ObjectAutoCompleteTextField because it was too restrictive in the Object you supply. I went with the component on the wiki and ended up adding another getter/setter to my page to separate the value from the display when it gets the object selected. However, I revisited the Wicketstuff component with your suggestion, and adding: builder.idProperty(userId); works to set the value for the field that is submitted. However, there is no way to tell it the value to use for the display! It's just serializing the Object I give it as the display (ie my.package.model.per...@77aa0759]) What I need is to give it a list of objects and to be able to specify what properties to use for the display value and the submit value. It needs something like: builder.displayProperty(displayName); thanks, Steve On 22/12/2009, at 10:00 AM, Albert Romanius wrote: I am not sure, but you could try to set idProperty in ObjectAutoCompleteBuilder On Mon, Dec 21, 2009 at 10:54 AM, Steve Swinsburg steve.swinsb...@gmail.com wrote: On further investigation, the values aren't being separated after all. What is added to the textfield is what is submitted in the form. Is it possible to submit a different value than just the display text? thanks, Steve On 21/12/2009, at 1:54 PM, Steve Swinsburg wrote: Nevermind. I ended up going with this approach where I could separate the values: http://cwiki.apache.org/WICKET/autocomplete-using-a-wicket-model.html I will add my code snippet to the page. cheers, Steve On 21/12/2009, at 11:57 AM, Steve Swinsburg wrote: Hi, I am using ObjectAutoCompleteField from WicketStuff and it looks like what I need for my scenario: I have an object list with a bunch of fields and when the user searches, it needs to match on a certain field and display the list of matches. The examples do this with a Car object with an Integer field for the ID and a String for the car name. However, there seems to be no way to tell it *what* fields to use in the supplied object. You can only give the component the Type of fields to look up, and it gets the field to use by reflection. This assumes only one field in that object will be of that Type. ie How could I make it would with a list of these objects: class Person { String userId; String displayName; ... } Giving the ObjectAutoCompleteField the types Person,String won't work, it won't know what field to use. ListPerson persons = getPersons(); ObjectAutoCompleteBuilderPerson,String builder = new ObjectAutoCompleteBuilderPerson,String( new AutoCompletionChoicesProviderUser() { public IteratorPerson getChoices(String input) { ListPerson subSet = getPersonSubSet(persons, input); return subSet.iterator(); } } ); ObjectAutoCompleteField toField = builder.build(toField, new ModelString()); form.add(toField); Any ideas? thanks, Steve -- Albert - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org smime.p7s Description: S/MIME cryptographic signature
Re: ObjectAutoCompleteField and specifying the fields from the object to use
Actually I have just found in the javadocs the AbstractObjectAutoCompleteRenderer which does the separation. I'll give that a go. cheers, Steve On 22/12/2009, at 10:54 AM, Steve Swinsburg wrote: I decided against using the ObjectAutoCompleteTextField because it was too restrictive in the Object you supply. I went with the component on the wiki and ended up adding another getter/setter to my page to separate the value from the display when it gets the object selected. However, I revisited the Wicketstuff component with your suggestion, and adding: builder.idProperty(userId); works to set the value for the field that is submitted. However, there is no way to tell it the value to use for the display! It's just serializing the Object I give it as the display (ie my.package.model.per...@77aa0759]) What I need is to give it a list of objects and to be able to specify what properties to use for the display value and the submit value. It needs something like: builder.displayProperty(displayName); thanks, Steve On 22/12/2009, at 10:00 AM, Albert Romanius wrote: I am not sure, but you could try to set idProperty in ObjectAutoCompleteBuilder On Mon, Dec 21, 2009 at 10:54 AM, Steve Swinsburg steve.swinsb...@gmail.com wrote: On further investigation, the values aren't being separated after all. What is added to the textfield is what is submitted in the form. Is it possible to submit a different value than just the display text? thanks, Steve On 21/12/2009, at 1:54 PM, Steve Swinsburg wrote: Nevermind. I ended up going with this approach where I could separate the values: http://cwiki.apache.org/WICKET/autocomplete-using-a-wicket-model.html I will add my code snippet to the page. cheers, Steve On 21/12/2009, at 11:57 AM, Steve Swinsburg wrote: Hi, I am using ObjectAutoCompleteField from WicketStuff and it looks like what I need for my scenario: I have an object list with a bunch of fields and when the user searches, it needs to match on a certain field and display the list of matches. The examples do this with a Car object with an Integer field for the ID and a String for the car name. However, there seems to be no way to tell it *what* fields to use in the supplied object. You can only give the component the Type of fields to look up, and it gets the field to use by reflection. This assumes only one field in that object will be of that Type. ie How could I make it would with a list of these objects: class Person { String userId; String displayName; ... } Giving the ObjectAutoCompleteField the types Person,String won't work, it won't know what field to use. ListPerson persons = getPersons(); ObjectAutoCompleteBuilderPerson,String builder = new ObjectAutoCompleteBuilderPerson,String( new AutoCompletionChoicesProviderUser() { public IteratorPerson getChoices(String input) { ListPerson subSet = getPersonSubSet(persons, input); return subSet.iterator(); } } ); ObjectAutoCompleteField toField = builder.build(toField, new ModelString()); form.add(toField); Any ideas? thanks, Steve -- Albert - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org smime.p7s Description: S/MIME cryptographic signature
Using component resolver with enclosures in 1.4.5
With version 1.4.2 I finally got a component resolver mechanism working for components within enclosures so that the components could be dynamically populated instead of hard coding the creation of every possible component that 'might' be needed by the markup. I just upgraded to 1.4.5 and my component resolver mechanism no longer works with a message: ERROR - RequestCycle - Tag expected [markup = wicket\markup\pages\HomePage_47.html A dump of the html file then follows. The closing /wicket:enclosure tag is highlighted. Do we need to do component resolvers in enclosures differently in 1.4.5? If so any hints would be appreciated. _ Looking for a great date? Meet singles at ninemsn dating http://clk.atdmt.com/NMN/go/150855801/direct/01/
Re: Using component resolver with enclosures in 1.4.5
hrm, enclosure does allow resolvers to create missing components. can you debug and see why it broke? -igor On Mon, Dec 21, 2009 at 3:37 PM, Chris Colman chr...@stepaheadsoftware.com wrote: With version 1.4.2 I finally got a component resolver mechanism working for components within enclosures so that the components could be dynamically populated instead of hard coding the creation of every possible component that 'might' be needed by the markup. I just upgraded to 1.4.5 and my component resolver mechanism no longer works with a message: ERROR - RequestCycle - Tag expected [markup = wicket\markup\pages\HomePage_47.html A dump of the html file then follows. The closing /wicket:enclosure tag is highlighted. Do we need to do component resolvers in enclosures differently in 1.4.5? If so any hints would be appreciated. - 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
Re: Using component resolver with enclosures in 1.4.5
I haven't got an environment set up whereby I can debug wicket at this stage but here's a stack dump in case that might help. I'll endeavour to get the source code and take a poke around if I get some spare time in the next little while. at org.apache.wicket.markup.MarkupStream.throwMarkupException(MarkupStream.java:465) at org.apache.wicket.markup.MarkupStream.getTag(MarkupStream.java:269) at org.apache.wicket.Component.render(Component.java:2426) at org.apache.wicket.Component.render(Component.java:2398) at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:225) at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:250) at com.sas.av.ui.wicket.templates.original.ComponentLibraryResolver.resolve(ComponentLibraryResolver.java:86) at org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentResolvers.java:81) at org.apache.wicket.markup.html.internal.Enclosure$1.executeInsideBufferedZone(Enclosure.java:256) at org.apache.wicket.markup.html.internal.ResponseBufferZone.execute(ResponseBufferZone.java:50) at org.apache.wicket.markup.html.internal.Enclosure.ensureAllChildrenPresent(Enclosure.java:250) at org.apache.wicket.markup.html.internal.Enclosure.onComponentTagBody(Enclosure.java:169) at org.apache.wicket.Component.renderComponent(Component.java:2619) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512) at org.apache.wicket.Component.render(Component.java:2450) at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229) at org.apache.wicket.markup.resolver.EnclosureResolver.resolve(EnclosureResolver.java:61) at com.sas.av.ui.wicket.templates.original.PagebloomEnclosureResolver.resolve(PagebloomEnclosureResolver.java:84) at org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentResolvers.java:81) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1418) at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1577) at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1501) at org.apache.wicket.Component.renderComponent(Component.java:2619) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512) at org.apache.wicket.Component.render(Component.java:2450) at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229) at org.apache.wicket.markup.resolver.MarkupInheritanceResolver.resolve(MarkupInheritanceResolver.java:66) at org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentResolvers.java:81) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1418) at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1577) at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1501) at org.apache.wicket.Component.renderComponent(Component.java:2619) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512) at org.apache.wicket.Component.render(Component.java:2450) at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229) at org.apache.wicket.markup.resolver.MarkupInheritanceResolver.resolve(MarkupInheritanceResolver.java:73) at org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentResolvers.java:81) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1418) at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1577) at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1501) at org.apache.wicket.Component.renderComponent(Component.java:2619) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1512) at org.apache.wicket.Component.render(Component.java:2450) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1414) at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1528) at org.apache.wicket.Page.onRender(Page.java:1545) at org.apache.wicket.Component.render(Component.java:2450) at org.apache.wicket.Page.renderPage(Page.java:914) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:261) 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
Re: ObjectAutoCompleteField and specifying the fields from the object to use
For reference, adding this: ObjectAutoCompleteRendererPerson renderer = new ObjectAutoCompleteRendererPerson(){ protected String getIdValue(Person p) { return p.getUuid(); } protected String getTextValue(Person p) { return p.getDisplayName(); } }; and then: builder.autoCompleteRenderer(renderer); Does what I want. Thanks for the tip! cheers, Steve On 22/12/2009, at 10:57 AM, Steve Swinsburg wrote: Actually I have just found in the javadocs the AbstractObjectAutoCompleteRenderer which does the separation. I'll give that a go. cheers, Steve On 22/12/2009, at 10:54 AM, Steve Swinsburg wrote: I decided against using the ObjectAutoCompleteTextField because it was too restrictive in the Object you supply. I went with the component on the wiki and ended up adding another getter/setter to my page to separate the value from the display when it gets the object selected. However, I revisited the Wicketstuff component with your suggestion, and adding: builder.idProperty(userId); works to set the value for the field that is submitted. However, there is no way to tell it the value to use for the display! It's just serializing the Object I give it as the display (ie my.package.model.per...@77aa0759]) What I need is to give it a list of objects and to be able to specify what properties to use for the display value and the submit value. It needs something like: builder.displayProperty(displayName); thanks, Steve On 22/12/2009, at 10:00 AM, Albert Romanius wrote: I am not sure, but you could try to set idProperty in ObjectAutoCompleteBuilder On Mon, Dec 21, 2009 at 10:54 AM, Steve Swinsburg steve.swinsb...@gmail.com wrote: On further investigation, the values aren't being separated after all. What is added to the textfield is what is submitted in the form. Is it possible to submit a different value than just the display text? thanks, Steve On 21/12/2009, at 1:54 PM, Steve Swinsburg wrote: Nevermind. I ended up going with this approach where I could separate the values: http://cwiki.apache.org/WICKET/autocomplete-using-a-wicket-model.html I will add my code snippet to the page. cheers, Steve On 21/12/2009, at 11:57 AM, Steve Swinsburg wrote: Hi, I am using ObjectAutoCompleteField from WicketStuff and it looks like what I need for my scenario: I have an object list with a bunch of fields and when the user searches, it needs to match on a certain field and display the list of matches. The examples do this with a Car object with an Integer field for the ID and a String for the car name. However, there seems to be no way to tell it *what* fields to use in the supplied object. You can only give the component the Type of fields to look up, and it gets the field to use by reflection. This assumes only one field in that object will be of that Type. ie How could I make it would with a list of these objects: class Person { String userId; String displayName; ... } Giving the ObjectAutoCompleteField the types Person,String won't work, it won't know what field to use. ListPerson persons = getPersons(); ObjectAutoCompleteBuilderPerson,String builder = new ObjectAutoCompleteBuilderPerson,String( new AutoCompletionChoicesProviderUser() { public IteratorPerson getChoices(String input) { ListPerson subSet = getPersonSubSet(persons, input); return subSet.iterator(); } } ); ObjectAutoCompleteField toField = builder.build(toField, new ModelString()); form.add(toField); Any ideas? thanks, Steve -- Albert - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org smime.p7s Description: S/MIME cryptographic signature
Caching: Expires HTTP header and ETags
Hi. Ran into a bunch of places saying we need to have the Expires header set for images and other static content. (To enable browser caching to work properly). 1) Anything is done to do this automatically? Any plans to? 2) If I go ahead and use some filter to do this myself, is there any harm in setting it for the wicket's js files? /resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js;jsessio nid=numeric_id_here For background: This link has a how-to on how to do it via a filter: http://www.infoq.com/articles/gwt-high-ajax 3) Does wicket have ETag support? Thanks, - Alex Rass - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Caching: Expires HTTP header and ETags
Yeah, good question! Answer this too: * http://old.nabble.com/WicketServlet-WicketFilter-client-cache-lifetime-How-to---ts26873268.html#a26873268 2009/12/22 Alex Rass a...@itbsllc.com: Hi. Ran into a bunch of places saying we need to have the Expires header set for images and other static content. (To enable browser caching to work properly). 1) Anything is done to do this automatically? Any plans to? 2) If I go ahead and use some filter to do this myself, is there any harm in setting it for the wicket's js files? /resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js;jsessio nid=numeric_id_here For background: This link has a how-to on how to do it via a filter: http://www.infoq.com/articles/gwt-high-ajax 3) Does wicket have ETag support? Thanks, - Alex Rass - 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