src tag changing
I have searched the web and all example don't seem to match with what I need I have an application setup to have a web application with the wicket filter on app ?xml version=1.0 encoding=UTF-8? web-app version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi= http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation= http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; display-nameTESTAPP/display-name filter filter-namewicket.TESTAPP /filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param param-nameapplicationClassName/param-name param-valuecom.test.WicketApplication/param-value /init-param /filter filter-mapping filter-namewicket.TESTAPP /filter-name url-pattern/app/*/url-pattern /filter-mapping welcome-file-list welcome-fileindex.html/welcome-file /welcome-file-list /web-app www.test.com -- some jsp pages www.test.com/app/ -- wicket application In the wicket application in the html, there are src tags and href tags that use ../ like. ../index.html or ../images/home.jpg In the Wicket apps it changes all the above to ../../index or ../../images/home.jpg Is there a way to tell wicket no to change or add this extra ../ I have tried wicket:link with mixed results (addling link to the picture instead of the link) , and I would rather not make every link wicket tag. Thanks!
Dynamic checkbox form
Just need to be pointed in the Right direction. I have a form of check boxed created by dynamic list. What is the best way to get the Boolean value if the checkbox was selected. Thanks... - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Maven Resource Question
In Netbeans, in the Maven pom.xml I have the following: resource filteringfalse/filtering directorysrc/main/html/directory targetPathcom/mydomain/myproject/targetPath excludes exclude**/public//exclude /excludes /resource resource filteringfalse/filtering directorysrc/main/html/public/directory targetPath${project.build.directory}/${project.build.finalName}/public/targetPath /resource This same pom.xml does not work with eclipse. Does anyone know why. Why, you ask? in the src/main/html folder I have all of the html pages for the site. This way I can just zip up the folder and send it over to the designer without remove the .java/property files. In the html folder there is a public folder used for css/image files, or none dynamic pages. In netbeans: Files in the src/main/html get copied to the class folder excluding the public. Public folder is copied to the target root, accessible to all (no special coding for images, or css). In eclipse this works if I remove the resource filteringfalse/filtering directorysrc/main/html/public/directory targetPath${project.build.directory}/${project.build.finalName}/public/targetPath Any eclipse experts out there :). Thanks!
Links
Is there an easy way to point two wicket:id link tags to the same link. I just have the link on the Nav Bar, and in the footer bar, and they do the same thing. IE: a href=# wicket:id=restartLinkCANCEL BUTTON/a a href=# wicket:id=cancelLinkCANCEL BUTTON/a Java: restartLink = new Link(restartLink) { @Override public void onClick() { //. } }; cancelLink = new Link(cancelLink) { @Override public void onClick() { //same as restart Link Code. } }; } Thanks!
Re: Data Provider
I am using DefaultDataTable, is there a component called ajaxdatatable? joe On Tue, Dec 8, 2009 at 10:45 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Modal window can contain only ajax components. Are you using ajaxdatatable? ** Martin 2009/12/9 hill180 hill...@gmail.com: Hello Group, Just a questions to get a point in the right direction. I have a Modal Window that opens when a Search AjaxLink is clicked. All is Good There. The modal Window is a form which has a datatable which autoupdates on textfield. No Problems there. The problem is the Navigation 1 2 3 4 5 6 When I click on the Navigation, the Model window closes. When I click on the ajaxLink again, the Model opens at the page I clicked prior to the window closing. odd, not sure if this is the wrong component to use, or if I need to set some parameter to prevent the Model Window from closing. Thanks, joe. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Data Provider
I used AjaxFallbackDefaultDataTable replacing DefaultDataTable, worked like a charm. Thanks! joe On Tue, Dec 8, 2009 at 10:45 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Modal window can contain only ajax components. Are you using ajaxdatatable? ** Martin 2009/12/9 hill180 hill...@gmail.com: Hello Group, Just a questions to get a point in the right direction. I have a Modal Window that opens when a Search AjaxLink is clicked. All is Good There. The modal Window is a form which has a datatable which autoupdates on textfield. No Problems there. The problem is the Navigation 1 2 3 4 5 6 When I click on the Navigation, the Model window closes. When I click on the ajaxLink again, the Model opens at the page I clicked prior to the window closing. odd, not sure if this is the wrong component to use, or if I need to set some parameter to prevent the Model Window from closing. Thanks, joe. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Data Provider
Hello Group, Just a questions to get a point in the right direction. I have a Modal Window that opens when a Search AjaxLink is clicked. All is Good There. The modal Window is a form which has a datatable which autoupdates on textfield. No Problems there. The problem is the Navigation 1 2 3 4 5 6 When I click on the Navigation, the Model window closes. When I click on the ajaxLink again, the Model opens at the page I clicked prior to the window closing. odd, not sure if this is the wrong component to use, or if I need to set some parameter to prevent the Model Window from closing. Thanks, joe.
Time textfield
I understand there is the DateTimeField, is there a textfield specifically for time only. Or a way to turn the date off in the DateTimeField. Thanks!
Properties file and validators
When the user does not place enough characters (19) I want to show a error message different than '1234' is not exactly 19 characters long. I have a properties file, but I don't know what the element would be called. I have tried form.card.ExactLengthValidator=19 Digits are required. But Obviously ExactLengthValidator is not the right key. My Java code looks like this.. form.add(new TextField(card, String.class).setRequired(true).add(new StringValidator.ExactLengthValidator(19))); What is the key, and where in the JavaDocs is the best place to find all the keys. (The wiki only had a couple of the keys.) Thank you, jose
Re: Properties file and validators
Added DEBUG to log4j. Thanks! that is what I was looking for. form.card.StringValidator.exact jose On Wed, Sep 2, 2009 at 5:41 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: you can turn on debug logging and wicket will spit out all keys it tries to use. -igor On Wed, Sep 2, 2009 at 5:27 PM, hill180hill...@gmail.com wrote: When the user does not place enough characters (19) I want to show a error message different than '1234' is not exactly 19 characters long. I have a properties file, but I don't know what the element would be called. I have tried form.card.ExactLengthValidator=19 Digits are required. But Obviously ExactLengthValidator is not the right key. My Java code looks like this.. form.add(new TextField(card, String.class).setRequired(true).add(new StringValidator.ExactLengthValidator(19))); What is the key, and where in the JavaDocs is the best place to find all the keys. (The wiki only had a couple of the keys.) Thank you, jose - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: SSL on pages
I looked at that and found the sample code for this in the Javadocs, unfortunately got stuck at SecureRequestCycleProcessor In the java docs, it has this a class to instantiate, but either I am supposed to create something and extend another class, or something... either way, I can't get passed this. currently I am just using the web.xml method but would like to use the @RequireHttps annotation. jose On Aug 9, 2009, at 9:26 AM, Igor Vaynberg wrote: see @RequireHttps -igor On Sat, Aug 8, 2009 at 12:34 PM, Jose Hernandezj...@expertoffice.net wrote: What is the recommended method on securing certain pages via SSL with Wicket 1.4.0? Thanks! jose - 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
Require SSL and 1.4.0
As a new user, I am not sure I understand, I need to setup @requireHTTPS to work and I have the following Code: What am I doing wrong? I have Wicket 1.4.0 error SecureRequestCycleProcessor cannot be resolved to a type package com.test.sslstuff2; import org.apache.wicket.protocol.http.WebApplication; import org.apache.wicket.protocol.https.HttpsConfig; import org.apache.wicket.request.IRequestCycleProcessor; /** * Application object for your web application. If you want to run this application without deploying, run the Start class. * * @see com.test.sslstuff2.Start#main(String[]) */ public class WicketApplication extends WebApplication { public WicketApplication() { } @Override protected IRequestCycleProcessor newRequestCycleProcessor() { HttpsConfig config = new HttpsConfig(80,443); return new SecureRequestCycleProcessor(config); } public ClassHomePage getHomePage() { return HomePage.class; } } and the Home Page: package com.test.sslstuff2; import org.apache.wicket.PageParameters; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.protocol.https.RequireHttps; /** * Homepage */ @RequireHttps public class HomePage extends WebPage { private static final long serialVersionUID = 1L; public HomePage(final PageParameters parameters) { add(new Label(message, If you see this message wicket is properly configured and running)); } } THANKS
Require SSL and 1.4.0
As a new user, I am not sure I understand, I need to setup @requireHTTPS to work and I have the following Code: What am I doing wrong? I have Wicket 1.4.0 error SecureRequestCycleProcessor cannot be resolved to a type package com.test.sslstuff2; import org.apache.wicket.protocol.http.WebApplication; import org.apache.wicket.protocol.https.HttpsConfig; import org.apache.wicket.request.IRequestCycleProcessor; /** * Application object for your web application. If you want to run this application without deploying, run the Start class. * * @see com.test.sslstuff2.Start#main(String[]) */ public class WicketApplication extends WebApplication { public WicketApplication() { } @Override protected IRequestCycleProcessor newRequestCycleProcessor() { HttpsConfig config = new HttpsConfig(80,443); return new SecureRequestCycleProcessor(config); } public ClassHomePage getHomePage() { return HomePage.class; } } and the Home Page: package com.test.sslstuff2; import org.apache.wicket.PageParameters; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.protocol.https.RequireHttps; /** * Homepage */ @RequireHttps public class HomePage extends WebPage { private static final long serialVersionUID = 1L; public HomePage(final PageParameters parameters) { add(new Label(message, If you see this message wicket is properly configured and running)); } } THANKS
Re: creating bookmarkablelink for email
to add a bookmarkablelink I added the following to the main application class: protected void init(){ //Set Bookmarkable Pages mountBookmarkablePage(emailconfiguration,Page2.class); ... import wicket.PageParameters; import wicket.markup.html.WebPage; import wicket.markup.html.basic.Label; public class Page2 extends WebPage { public Page2(PageParameters parameters) throws Exception { long emailID = parameters.getLong(emailID); System.out.println(Email ID: + emailID); add(new Label(pageParam, String.valueOf(emailID))); } } Then the link would be www.yoursite.com/emailconfiguration?emailID=1234312AJSIB Make sure to catch the exception... jose On Jun 13, 2009, at 6:16 AM, Thomas Trocha wrote: Hi there, how is it possible to create a bookmarkablelink so it can be set into an eMail. (e.g. as confirmation-link) I need something like .renderToString() or similar. Thx, ToM - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Time Field
I understand there is the Datetimefield, but is there a field for just time. -jose - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Copy Form Fields
This might not be the best solutions (new to wicket/java) but I posted if it might help: This way, I was able to copy the fields and save correctly to my Hibernate POJO. package com.myapp.wicket; import org.apache.wicket.behavior.AttributeAppender; import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.Form; import org.apache.wicket.markup.html.form.TextField; import org.apache.wicket.model.Model; /** * * @author hill180 */ public final class HomePage extends WebPage { @SuppressWarnings(unchecked) public HomePage() { super (); Model firstAddress = new Model(test);//Simulated info from DB Model secondAddress = new Model(); Form form = new Form(form){ @Override protected void onSubmit() { super.onSubmit();//TODO } }; form.setOutputMarkupId(true); TextField textFirstAddress = new TextField(firstAddress, firstAddress); textFirstAddress.setOutputMarkupId(true); TextField textSecondAddress = new TextField(secondAddress, secondAddress); textSecondAddress.setOutputMarkupId(true); add(form); form.add(textFirstAddress); form.add(textSecondAddress); Label label = new Label(copyAddress, click here); String ajaxFirstAddressName = textFirstAddress.getMarkupId(); String ajaxSecondAddressName = textSecondAddress.getMarkupId(); String ajaxFormName = form.getMarkupId(); label.add(new AttributeAppender(onclick, new Model( ajaxFormName + . + ajaxSecondAddressName + .value = + ajaxFormName + . + ajaxFirstAddressName + .value;), ;)); form.add(label); } } On Jun 4, 2009, at 5:26 AM, Eyal Golan wrote: hhhmm... I'm not a Hibernate expert, but what if your POJO will be detached? 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 On Wed, Jun 3, 2009 at 11:02 PM, hill180 hill...@gmail.com wrote: apparently no. it may just be my understanding. Because the modal is from a compoundproperty that is a hibernate POJO, this will copy what is in the database over, not what is in the field over. I hope I am explaining myself. -jose On Jun 1, 2009, at 8:25 AM, Eyal Golan wrote: I though more something like this: AjaxLink link = new AjaxLink(copyAddress){ @Override public void onClick(AjaxRequestTarget target) { this.address2 = this.address1; target.addComponent(myAddress2); } };//end of Link wouldn't that work? 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 On Mon, Jun 1, 2009 at 5:31 PM, hill180 hill...@gmail.com wrote: AjaxLink link = new AjaxLink(copyAddress){ @Override public void onClick(AjaxRequestTarget target) { myAddress2.setModelObject(myAddress1.getValue()); target.addComponent(myAddress2); } };//end of Link This kinda works. It does update the MyAddress2 Field, but if I change myAddress1 and click on the click, it will get the original value of myAddress1, not the value inside of the forms textfield. -jose On Jun 1, 2009, at 1:48 AM, Eyal Golan wrote: I'm not sure, but give it a try: In the onClick, set the property address2 to be the same as property address1. Add myAddress2 to the target. If you use compoundpropertymodel, it should work. 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 On Mon, Jun 1, 2009 at 12:55 AM, hill180 hill...@gmail.com wrote: I have looked through the archives and there were a couple references to this question but no examples and I was hoping for some help. I have a form with Address One and Address Two, I have a link that I just want to copy the data over. I am thinking it should use Javascript, but I am new to wicket and not sure how to implement. The textfields are a compound property model which is hitting a hibernate POJO. private static class AddressPanel extends Panel { public AddressPanel(String id, Form f,final AssociateDB a) { super(id); final TextField myAddress1 = new TextField(Address1); // First Address add(myAddress1); final TextField myAddress2 = new TextField(Address2); // First Address myAddress2.setOutputMarkupId(true); add(myAddress2); Link link = new Link(copyAddress){ @Override //TODO ADD JAVASCRIPT COPY
Re: Copy Form Fields
apparently no. it may just be my understanding. Because the modal is from a compoundproperty that is a hibernate POJO, this will copy what is in the database over, not what is in the field over. I hope I am explaining myself. -jose On Jun 1, 2009, at 8:25 AM, Eyal Golan wrote: I though more something like this: AjaxLink link = new AjaxLink(copyAddress){ @Override public void onClick(AjaxRequestTarget target) { this.address2 = this.address1; target.addComponent(myAddress2); } };//end of Link wouldn't that work? 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 On Mon, Jun 1, 2009 at 5:31 PM, hill180 hill...@gmail.com wrote: AjaxLink link = new AjaxLink(copyAddress){ @Override public void onClick(AjaxRequestTarget target) { myAddress2.setModelObject(myAddress1.getValue()); target.addComponent(myAddress2); } };//end of Link This kinda works. It does update the MyAddress2 Field, but if I change myAddress1 and click on the click, it will get the original value of myAddress1, not the value inside of the forms textfield. -jose On Jun 1, 2009, at 1:48 AM, Eyal Golan wrote: I'm not sure, but give it a try: In the onClick, set the property address2 to be the same as property address1. Add myAddress2 to the target. If you use compoundpropertymodel, it should work. 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 On Mon, Jun 1, 2009 at 12:55 AM, hill180 hill...@gmail.com wrote: I have looked through the archives and there were a couple references to this question but no examples and I was hoping for some help. I have a form with Address One and Address Two, I have a link that I just want to copy the data over. I am thinking it should use Javascript, but I am new to wicket and not sure how to implement. The textfields are a compound property model which is hitting a hibernate POJO. private static class AddressPanel extends Panel { public AddressPanel(String id, Form f,final AssociateDB a) { super(id); final TextField myAddress1 = new TextField(Address1); // First Address add(myAddress1); final TextField myAddress2 = new TextField(Address2); // First Address myAddress2.setOutputMarkupId(true); add(myAddress2); Link link = new Link(copyAddress){ @Override //TODO ADD JAVASCRIPT COPY, FAILS TO SAVE BEFORE COPY OF DATA public void onClick() { } }; add(link); } }; - 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
Re: Copy Form Fields
AjaxLink link = new AjaxLink(copyAddress){ @Override public void onClick(AjaxRequestTarget target) { myAddress2.setModelObject(myAddress1.getValue()); target.addComponent(myAddress2); } };//end of Link This kinda works. It does update the MyAddress2 Field, but if I change myAddress1 and click on the click, it will get the original value of myAddress1, not the value inside of the forms textfield. -jose On Jun 1, 2009, at 1:48 AM, Eyal Golan wrote: I'm not sure, but give it a try: In the onClick, set the property address2 to be the same as property address1. Add myAddress2 to the target. If you use compoundpropertymodel, it should work. 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 On Mon, Jun 1, 2009 at 12:55 AM, hill180 hill...@gmail.com wrote: I have looked through the archives and there were a couple references to this question but no examples and I was hoping for some help. I have a form with Address One and Address Two, I have a link that I just want to copy the data over. I am thinking it should use Javascript, but I am new to wicket and not sure how to implement. The textfields are a compound property model which is hitting a hibernate POJO. private static class AddressPanel extends Panel { public AddressPanel(String id, Form f,final AssociateDB a) { super(id); final TextField myAddress1 = new TextField(Address1); // First Address add(myAddress1); final TextField myAddress2 = new TextField(Address2); // First Address myAddress2.setOutputMarkupId(true); add(myAddress2); Link link = new Link(copyAddress){ @Override //TODO ADD JAVASCRIPT COPY, FAILS TO SAVE BEFORE COPY OF DATA public void onClick() { } }; add(link); } }; - 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
Copy Form Fields
I have looked through the archives and there were a couple references to this question but no examples and I was hoping for some help. I have a form with Address One and Address Two, I have a link that I just want to copy the data over. I am thinking it should use Javascript, but I am new to wicket and not sure how to implement. The textfields are a compound property model which is hitting a hibernate POJO. private static class AddressPanel extends Panel { public AddressPanel(String id, Form f,final AssociateDB a) { super(id); final TextField myAddress1 = new TextField(Address1); // First Address add(myAddress1); final TextField myAddress2 = new TextField(Address2); // First Address myAddress2.setOutputMarkupId(true); add(myAddress2); Link link = new Link(copyAddress){ @Override //TODO ADD JAVASCRIPT COPY, FAILS TO SAVE BEFORE COPY OF DATA public void onClick() { } }; add(link); } }; - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org