problem with AjaxFallbackButton.setDefaultFormProcessing and WicketTester
Hi, I have the following simplified situation: A page with one form containing a radiogroup with one option and two AjaxFallbackButtons. One of the two buttons has its defaultFormProcessing set to false (because it does not need to submit the form). When I test the form submission with the FormTester the order in which I add the buttons to the form matter whether or not the selected radio choice is actually set on the model object or not. If I add the button with the defaulFormProcessing = false first is does not submit correctly, if I add it as last it does. This behavior only occurs with the FormTester and not in the real environment. I use Wicket 1.4-m3, JDK 1.5. Is this a bug? If so let me know I'll file a bugreport with a testcase. Cheers, Lars - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problem with generating project using quickstart
Hi, I am trying to generate a wicket project using quickstart but I get these errors: Downloading: http://repo1.maven.org/maven2/org/apache/wicket/wicket-archetype-quickstart/1.4-m3/wicket-archetype-quickstart-1.4-m3.jar 12K downloaded [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '4839111e497beee60c395992f2bab2d9fae386e2'; remote = '27eccc6d347b4dac5 c4c6a7b5441c42a' - RETRYING Downloading: http://repo1.maven.org/maven2/org/apache/wicket/wicket-archetype-quickstart/1.4-m3/wicket-archetype-quickstart-1.4-m3.jar 12K downloaded [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '4839111e497beee60c395992f2bab2d9fae386e2'; remote = '27eccc6d347b4dac5 c4c6a7b5441c42a' - IGNORING . Maven stuff omitted. [ERROR] BUILD ERROR [INFO] - [INFO] Error creating from archetype Embedded error: The META-INF/maven/archetype.xml descriptor cannot be found. This also happens for 1.3.4, if I download the jar manually I can't open it. Does anyone else experience this? It could also be our network I guess. Thanks, Lars - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Url Coding Strategy for choosing Locale by URL Sub Directory
Hi, I'm facing this same problem. It seems still unresolved but, has anyone been able to solve it? Which is the best way to deal with this? -- View this message in context: http://www.nabble.com/Url-Coding-Strategy-for-choosing-Locale-by-URL-%22Sub-Directory%22-tp15803555p18729497.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
WicketSessionFilter Problem: java.lang.IllegalStateException
Hello! I would be grateful for any advice with the below problem I am encountering with the WicketSessionFilter. I managed to convince my colleagues to migrate our www.mypharmisis.com (a drug ordering system for the Pharmaceutical industry) from Struts to Wicket after the success of a greenfield project using Wicket. I don't have the resources to migrate all at once so Struts 1 and Wicket so I have set them up to coexist congruently. However! I am having problems sharing necessary state between Struts 1 and Wicket using the WicketSessionFilter :-( When my Strut controllers tries to access my WebSession, it throws a java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle. My stack trace is: org.apache.wicket.Session.findOrCreate(Session.java:206) org.apache.wicket.Session.get(Session.java:250) com.mypharmsisis.pages.session.PharmisisSession.get(PharmisisSession.java:24) com.mypharmisis.struts.isis.actions.AbstractEasyAction.displayPage(AbstractEasyAction.java:52) com.mypharmisis.struts.isis.actions.EasyOrderHomeAction.displayPage(EasyOrderHomeAction.java:53) Here is a snippet of my web.xml: !-- Wicket configuration using standard JEE filter -- filter filter-namewicket.pharmisis/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param param-nameapplicationClassName/param-name param-valuecom.mypharmisis.pages.PharmisisApplication/param-value /init-param /filter filter filter-nameWicketSessionFilter/filter-name filter-classorg.apache.wicket.protocol.http.servlet.WicketSessionFilter/filter-class init-param param-namefilterName/param-name param-valuewicket.pharmisis/param-value /init-param /filter filter-mapping filter-namewicket.pharmisis/filter-name url-pattern/secure/new/*/url-pattern /filter-mapping filter-mapping filter-nameWicketSessionFilter/filter-name url-pattern*.do/url-pattern /filter-mapping !-- End of Wicket configuration -- context-param param-name javax.servlet.jsp.jstl.fmt.localizationContext /param-name param-value com.mypharmisis.isis.ApplicationResources /param-value /context-param context-param param-namecrystal_image_uri/param-name param-value/isis2/crystalreportviewers11/param-value /context-param distributable/ listener listener-classcom.mypharmisis.struts.isis.framework.IsisContextListener/listener-class /listener servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-namedebug/param-name param-valuetrue/param-value /init-param init-param param-namedetail/param-name param-value9/param-value /init-param init-param param-namenocache/param-name param-valuetrue/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param load-on-startup1/load-on-startup /servlet !-- DWR configuration -- servlet servlet-namedwr-invoker/servlet-name display-nameDWR Servlet/display-name servlet-classorg.directwebremoting.servlet.DwrServlet/servlet-class init-param param-namedebug/param-name param-valuetrue/param-value /init-param /servlet !-- Action Servlet Mappings -- servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping servlet-mapping servlet-namedwr-invoker/servlet-name url-pattern/dwr/*/url-pattern /servlet-mapping !-- The Welcome File List-- welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list error-page error-code400/error-code location/isisErrorAction.do?code=400/location /error-page error-page error-code404/error-code location/isisErrorAction.do?code=404/location /error-page error-page error-code500/error-code location/isisErrorAction.do?code=500/location /error-page !-- Start: Struts Tag Library Descriptors -- !-- taglib taglib-uristruts.jar/taglib-uri taglib-location/meta-inf/taglib.tld/taglib-location /taglib -- taglib taglib-uri/WEB-INF/struts-bean.tld/taglib-uri taglib-location/WEB-INF/struts-bean.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-html.tld/taglib-uri
Re: Einführung in Wicket @ /ch/open
Thomas Mäder schrieb: I will be holding a one day introduction to wicket tutorial at the /ch/open Workshop-Tage in Rapperswil, Switzerland. thx for the hint. i´ll send two coworkers over. cu uwe -- THOMAS DAILY GmbH Adlerstraße 19 79098 Freiburg Deutschland T + 49 761 3 85 59 0 F + 49 761 3 85 59 550 E [EMAIL PROTECTED] www.thomas-daily.de Geschäftsführer/Managing Directors: Wendy Thomas, Susanne Larbig Handelsregister Freiburg i.Br., HRB 3947 Registrieren Sie sich unter http://morningnews.thomas-daily.de für die kostenfreien TD Morning News, eine Auswahl aktueller Themen des Tages morgens um 9:00 in Ihrer Mailbox. Hinweis: Der Redaktionsschluss für unsere TD Morning News ist täglich um 8:30 Uhr. Es werden vorrangig Informationen berücksichtigt, die nach 16:00 Uhr des Vortages eingegangen sind. Die Email-Adresse unserer Redaktion lautet [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WicketSessionFilter Problem: java.lang.IllegalStateException
I think you have to wrap the wicket session filter around your *.do mapping, not your new/* mapping. Martijn On Wed, Jul 30, 2008 at 11:35 AM, James Perry [EMAIL PROTECTED] wrote: Hello! I would be grateful for any advice with the below problem I am encountering with the WicketSessionFilter. I managed to convince my colleagues to migrate our www.mypharmisis.com (a drug ordering system for the Pharmaceutical industry) from Struts to Wicket after the success of a greenfield project using Wicket. I don't have the resources to migrate all at once so Struts 1 and Wicket so I have set them up to coexist congruently. However! I am having problems sharing necessary state between Struts 1 and Wicket using the WicketSessionFilter :-( When my Strut controllers tries to access my WebSession, it throws a java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle. My stack trace is: org.apache.wicket.Session.findOrCreate(Session.java:206) org.apache.wicket.Session.get(Session.java:250) com.mypharmsisis.pages.session.PharmisisSession.get(PharmisisSession.java:24) com.mypharmisis.struts.isis.actions.AbstractEasyAction.displayPage(AbstractEasyAction.java:52) com.mypharmisis.struts.isis.actions.EasyOrderHomeAction.displayPage(EasyOrderHomeAction.java:53) Here is a snippet of my web.xml: !-- Wicket configuration using standard JEE filter -- filter filter-namewicket.pharmisis/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param param-nameapplicationClassName/param-name param-valuecom.mypharmisis.pages.PharmisisApplication/param-value /init-param /filter filter filter-nameWicketSessionFilter/filter-name filter-classorg.apache.wicket.protocol.http.servlet.WicketSessionFilter/filter-class init-param param-namefilterName/param-name param-valuewicket.pharmisis/param-value /init-param /filter filter-mapping filter-namewicket.pharmisis/filter-name url-pattern/secure/new/*/url-pattern /filter-mapping filter-mapping filter-nameWicketSessionFilter/filter-name url-pattern*.do/url-pattern /filter-mapping !-- End of Wicket configuration -- context-param param-name javax.servlet.jsp.jstl.fmt.localizationContext /param-name param-value com.mypharmisis.isis.ApplicationResources /param-value /context-param context-param param-namecrystal_image_uri/param-name param-value/isis2/crystalreportviewers11/param-value /context-param distributable/ listener listener-classcom.mypharmisis.struts.isis.framework.IsisContextListener/listener-class /listener servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-namedebug/param-name param-valuetrue/param-value /init-param init-param param-namedetail/param-name param-value9/param-value /init-param init-param param-namenocache/param-name param-valuetrue/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param load-on-startup1/load-on-startup /servlet !-- DWR configuration -- servlet servlet-namedwr-invoker/servlet-name display-nameDWR Servlet/display-name servlet-classorg.directwebremoting.servlet.DwrServlet/servlet-class init-param param-namedebug/param-name param-valuetrue/param-value /init-param /servlet !-- Action Servlet Mappings -- servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping servlet-mapping servlet-namedwr-invoker/servlet-name url-pattern/dwr/*/url-pattern /servlet-mapping !-- The Welcome File List-- welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list error-page error-code400/error-code location/isisErrorAction.do?code=400/location /error-page error-page error-code404/error-code location/isisErrorAction.do?code=404/location /error-page error-page error-code500/error-code location/isisErrorAction.do?code=500/location /error-page !-- Start: Struts Tag Library Descriptors -- !-- taglib taglib-uristruts.jar/taglib-uri taglib-location/meta-inf/taglib.tld/taglib-location /taglib -- taglib
getRequestUrl behavior difference between page call and ajax call
Hi, When calling (WebRequest)RequestCycle.get().getRequest()).getHttpServletRequest().getRequestURL() on a page with page parameters, I'm seeing different results: - when loading the page from the browser, the URL is returned including the page parameters; - when updating through AJAX, the URL is returned without the page parameters. Shouldn't the AJAX call incorporate these page parameters such that the results are consistent? What's your opinion on this? Thanks, Antoine. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DropDownChoice default value not found because of equal method
Hi, I have a CityListPage, where City objects are listed in a DataView. The City has a many to one relationship to Country (eager fetching). For each item in the list there's a edit link to CityEditPage. When the user clicks the link, the city object is passed to the CityEditPage. There's a DropDownChoice for selecting the Country. This is filled with a list of Countries from the DB. As default selection that Country must be shown, which is connected to the actual city object. It is in the list, but the selection box shows : Choose one Reason is, that the Country class contains an equal() method. Wicket calls this method, but the comparison of the id delivers false (different instances of the Integer object). I removed the id comparison, but now the String.equals() method for the name property delivers false, although the characters in the name string are identical. Should I pass the DetachableCityModel instead of the city object like discussed in http://markmail.org/message/3na4sq765uifvw3i Would this change something in the way of the comparison ? Thanks in advance Andrea public class CityListPage extends SecuredBasePage { @SpringBean private CityService cityService; ... private class CitySearchResultDataView extends DataView { public CitySearchResultDataView(String id, IDataProvider dataProvider) { super(id, dataProvider); } protected void populateItem(final Item item) { final City city = (City) item.getModelObject(); //Edit Link PageLink editLink = new PageLink(editCity, new IPageLink() { public Page getPage() { return new CityEditPage(city, CityListPage.this); --- } public Class getPageIdentity() { return CityEditPage.class; } }); item.add(new Label(id, String.valueOf(city.getId(; item.add(new Label(name, city.getName())); item.add(new Label(country, city.getCountry().getCode())); item.add(editLink); } } private abstract class CitiesDataProvider implements IDataProvider { ... public IModel model(Object object) { return new DetachableCityModel((City) object); } } class CitiesByExampleDataProvider extends CitiesDataProvider { ... protected ListCity load() { if (exampleCity == null) return Collections.emptyList(); return getCityService().loadByExample(exampleCity); } ... } @SuppressWarnings(serial) private class DetachableCityModel extends LoadableDetachableModel { private Integer id; public DetachableCityModel(Integer id) { this.id = id; } public DetachableCityModel(City city) { super(city); this.id = city.getId(); } protected Object load() { return (id != null)? getCityService().loadById(id) : null; } private CityService getCityService() { return CityListPage.this.cityService; } } } --- public CityEditPage(City city, Page source) { private Page sourcePage; private City city; public CityEditPage(City city, Page source) { if(city == null) { isNew = true; city = new City(); } this.city = city; this.sourcePage = source; CityEditForm cityEditForm = new CityEditForm(cityEditForm, city); add(cityEditForm); } private final class CityEditForm extends Form { public CityEditForm(String id, City city) { super(id); add(new RequiredTextField(name, new PropertyModel(city, name))); add(new RequiredTextField(code, new PropertyModel(city, code))); add(new CountryDropDownChoice(countrySelect, city)); --- default value not found ... private final class CountryDropDownChoice extends DropDownChoice { @SpringBean CountryService countryService; public CountryDropDownChoice(String id, Object object) { super(id); setModel(new PropertyModel(object, country)); setChoices(countryService.loadAll()); setChoiceRenderer(new CountryChoiceRenderer()); } } } } --- public class Country implements Serializable { private Integer id; private String name; ... @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; final Country other = (Country) obj; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) -- false return false; if (name == null) { if (other.name != null) return false; } else if (!name.equals(other.name)) -- false return false; ... } ... }
Re: WicketSessionFilter Problem: java.lang.IllegalStateException
Thanks for the swift reply. That's what I originally had but it didn't work and just tried again to re-confirm. :-) Any other suggestions? I've checkout the source code to see if that helps. On Wed, Jul 30, 2008 at 10:42 AM, Martijn Dashorst [EMAIL PROTECTED] wrote: I think you have to wrap the wicket session filter around your *.do mapping, not your new/* mapping. Martijn On Wed, Jul 30, 2008 at 11:35 AM, James Perry [EMAIL PROTECTED] wrote: Hello! I would be grateful for any advice with the below problem I am encountering with the WicketSessionFilter. I managed to convince my colleagues to migrate our www.mypharmisis.com (a drug ordering system for the Pharmaceutical industry) from Struts to Wicket after the success of a greenfield project using Wicket. I don't have the resources to migrate all at once so Struts 1 and Wicket so I have set them up to coexist congruently. However! I am having problems sharing necessary state between Struts 1 and Wicket using the WicketSessionFilter :-( When my Strut controllers tries to access my WebSession, it throws a java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle. My stack trace is: org.apache.wicket.Session.findOrCreate(Session.java:206) org.apache.wicket.Session.get(Session.java:250) com.mypharmsisis.pages.session.PharmisisSession.get(PharmisisSession.java:24) com.mypharmisis.struts.isis.actions.AbstractEasyAction.displayPage(AbstractEasyAction.java:52) com.mypharmisis.struts.isis.actions.EasyOrderHomeAction.displayPage(EasyOrderHomeAction.java:53) Here is a snippet of my web.xml: !-- Wicket configuration using standard JEE filter -- filter filter-namewicket.pharmisis/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param param-nameapplicationClassName/param-name param-valuecom.mypharmisis.pages.PharmisisApplication/param-value /init-param /filter filter filter-nameWicketSessionFilter/filter-name filter-classorg.apache.wicket.protocol.http.servlet.WicketSessionFilter/filter-class init-param param-namefilterName/param-name param-valuewicket.pharmisis/param-value /init-param /filter filter-mapping filter-namewicket.pharmisis/filter-name url-pattern/secure/new/*/url-pattern /filter-mapping filter-mapping filter-nameWicketSessionFilter/filter-name url-pattern*.do/url-pattern /filter-mapping !-- End of Wicket configuration -- context-param param-name javax.servlet.jsp.jstl.fmt.localizationContext /param-name param-value com.mypharmisis.isis.ApplicationResources /param-value /context-param context-param param-namecrystal_image_uri/param-name param-value/isis2/crystalreportviewers11/param-value /context-param distributable/ listener listener-classcom.mypharmisis.struts.isis.framework.IsisContextListener/listener-class /listener servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-namedebug/param-name param-valuetrue/param-value /init-param init-param param-namedetail/param-name param-value9/param-value /init-param init-param param-namenocache/param-name param-valuetrue/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param load-on-startup1/load-on-startup /servlet !-- DWR configuration -- servlet servlet-namedwr-invoker/servlet-name display-nameDWR Servlet/display-name servlet-classorg.directwebremoting.servlet.DwrServlet/servlet-class init-param param-namedebug/param-name param-valuetrue/param-value /init-param /servlet !-- Action Servlet Mappings -- servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping servlet-mapping servlet-namedwr-invoker/servlet-name url-pattern/dwr/*/url-pattern /servlet-mapping !-- The Welcome File List-- welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list error-page error-code400/error-code location/isisErrorAction.do?code=400/location /error-page error-page error-code404/error-code location/isisErrorAction.do?code=404/location /error-page error-page error-code500/error-code
Re: getRequestUrl behavior difference between page call and ajax call
by the way, this is the case for url coding strategies which use /par/ such as the default BookmarkablePageRequestTargetUrlCodingStrategy IMHO these parameters should be stripped but perhaps not in the getRequest method; any method available which does just this? On Wed, Jul 30, 2008 at 11:52 AM, Antoine van Wel [EMAIL PROTECTED] wrote: Hi, When calling (WebRequest)RequestCycle.get().getRequest()).getHttpServletRequest().getRequestURL() on a page with page parameters, I'm seeing different results: - when loading the page from the browser, the URL is returned including the page parameters; - when updating through AJAX, the URL is returned without the page parameters. Shouldn't the AJAX call incorporate these page parameters such that the results are consistent? What's your opinion on this? Thanks, Antoine. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WicketSessionFilter Problem: java.lang.IllegalStateException
I can't work out why it doesn't work so I decided to subclass the WebRequestCycle and access the HTTPSession's attributes via my PharmisisSession. Cheers, Jim. On Wed, Jul 30, 2008 at 11:19 AM, James Perry [EMAIL PROTECTED] wrote: Thanks for the swift reply. That's what I originally had but it didn't work and just tried again to re-confirm. :-) Any other suggestions? I've checkout the source code to see if that helps. On Wed, Jul 30, 2008 at 10:42 AM, Martijn Dashorst [EMAIL PROTECTED] wrote: I think you have to wrap the wicket session filter around your *.do mapping, not your new/* mapping. Martijn On Wed, Jul 30, 2008 at 11:35 AM, James Perry [EMAIL PROTECTED] wrote: Hello! I would be grateful for any advice with the below problem I am encountering with the WicketSessionFilter. I managed to convince my colleagues to migrate our www.mypharmisis.com (a drug ordering system for the Pharmaceutical industry) from Struts to Wicket after the success of a greenfield project using Wicket. I don't have the resources to migrate all at once so Struts 1 and Wicket so I have set them up to coexist congruently. However! I am having problems sharing necessary state between Struts 1 and Wicket using the WicketSessionFilter :-( When my Strut controllers tries to access my WebSession, it throws a java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle. My stack trace is: org.apache.wicket.Session.findOrCreate(Session.java:206) org.apache.wicket.Session.get(Session.java:250) com.mypharmsisis.pages.session.PharmisisSession.get(PharmisisSession.java:24) com.mypharmisis.struts.isis.actions.AbstractEasyAction.displayPage(AbstractEasyAction.java:52) com.mypharmisis.struts.isis.actions.EasyOrderHomeAction.displayPage(EasyOrderHomeAction.java:53) Here is a snippet of my web.xml: !-- Wicket configuration using standard JEE filter -- filter filter-namewicket.pharmisis/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param param-nameapplicationClassName/param-name param-valuecom.mypharmisis.pages.PharmisisApplication/param-value /init-param /filter filter filter-nameWicketSessionFilter/filter-name filter-classorg.apache.wicket.protocol.http.servlet.WicketSessionFilter/filter-class init-param param-namefilterName/param-name param-valuewicket.pharmisis/param-value /init-param /filter filter-mapping filter-namewicket.pharmisis/filter-name url-pattern/secure/new/*/url-pattern /filter-mapping filter-mapping filter-nameWicketSessionFilter/filter-name url-pattern*.do/url-pattern /filter-mapping !-- End of Wicket configuration -- context-param param-name javax.servlet.jsp.jstl.fmt.localizationContext /param-name param-value com.mypharmisis.isis.ApplicationResources /param-value /context-param context-param param-namecrystal_image_uri/param-name param-value/isis2/crystalreportviewers11/param-value /context-param distributable/ listener listener-classcom.mypharmisis.struts.isis.framework.IsisContextListener/listener-class /listener servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-namedebug/param-name param-valuetrue/param-value /init-param init-param param-namedetail/param-name param-value9/param-value /init-param init-param param-namenocache/param-name param-valuetrue/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param load-on-startup1/load-on-startup /servlet !-- DWR configuration -- servlet servlet-namedwr-invoker/servlet-name display-nameDWR Servlet/display-name servlet-classorg.directwebremoting.servlet.DwrServlet/servlet-class init-param param-namedebug/param-name param-valuetrue/param-value /init-param /servlet !-- Action Servlet Mappings -- servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping servlet-mapping servlet-namedwr-invoker/servlet-name url-pattern/dwr/*/url-pattern /servlet-mapping !-- The Welcome File List-- welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list error-page error-code400/error-code
Re: WicketSessionFilter Problem: java.lang.IllegalStateException
he? And what you are trying to do is completely the opposite (accessing the wicket session in struts) But if you want to get the wicket session in struts then that filter should be ok Does the filter hit just before your struts things? johan On Wed, Jul 30, 2008 at 1:31 PM, James Perry [EMAIL PROTECTED]wrote: I can't work out why it doesn't work so I decided to subclass the WebRequestCycle and access the HTTPSession's attributes via my PharmisisSession. Cheers, Jim. On Wed, Jul 30, 2008 at 11:19 AM, James Perry [EMAIL PROTECTED] wrote: Thanks for the swift reply. That's what I originally had but it didn't work and just tried again to re-confirm. :-) Any other suggestions? I've checkout the source code to see if that helps. On Wed, Jul 30, 2008 at 10:42 AM, Martijn Dashorst [EMAIL PROTECTED] wrote: I think you have to wrap the wicket session filter around your *.do mapping, not your new/* mapping. Martijn On Wed, Jul 30, 2008 at 11:35 AM, James Perry [EMAIL PROTECTED] wrote: Hello! I would be grateful for any advice with the below problem I am encountering with the WicketSessionFilter. I managed to convince my colleagues to migrate our www.mypharmisis.com (a drug ordering system for the Pharmaceutical industry) from Struts to Wicket after the success of a greenfield project using Wicket. I don't have the resources to migrate all at once so Struts 1 and Wicket so I have set them up to coexist congruently. However! I am having problems sharing necessary state between Struts 1 and Wicket using the WicketSessionFilter :-( When my Strut controllers tries to access my WebSession, it throws a java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle. My stack trace is: org.apache.wicket.Session.findOrCreate(Session.java:206) org.apache.wicket.Session.get(Session.java:250) com.mypharmsisis.pages.session.PharmisisSession.get(PharmisisSession.java:24) com.mypharmisis.struts.isis.actions.AbstractEasyAction.displayPage(AbstractEasyAction.java:52) com.mypharmisis.struts.isis.actions.EasyOrderHomeAction.displayPage(EasyOrderHomeAction.java:53) Here is a snippet of my web.xml: !-- Wicket configuration using standard JEE filter -- filter filter-namewicket.pharmisis/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param param-nameapplicationClassName/param-name param-valuecom.mypharmisis.pages.PharmisisApplication/param-value /init-param /filter filter filter-nameWicketSessionFilter/filter-name filter-classorg.apache.wicket.protocol.http.servlet.WicketSessionFilter/filter-class init-param param-namefilterName/param-name param-valuewicket.pharmisis/param-value /init-param /filter filter-mapping filter-namewicket.pharmisis/filter-name url-pattern/secure/new/*/url-pattern /filter-mapping filter-mapping filter-nameWicketSessionFilter/filter-name url-pattern*.do/url-pattern /filter-mapping !-- End of Wicket configuration -- context-param param-name javax.servlet.jsp.jstl.fmt.localizationContext /param-name param-value com.mypharmisis.isis.ApplicationResources /param-value /context-param context-param param-namecrystal_image_uri/param-name param-value/isis2/crystalreportviewers11/param-value /context-param distributable/ listener listener-classcom.mypharmisis.struts.isis.framework.IsisContextListener/listener-class /listener servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-namedebug/param-name param-valuetrue/param-value /init-param init-param param-namedetail/param-name param-value9/param-value /init-param init-param param-namenocache/param-name param-valuetrue/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param load-on-startup1/load-on-startup /servlet !-- DWR configuration -- servlet servlet-namedwr-invoker/servlet-name display-nameDWR Servlet/display-name servlet-classorg.directwebremoting.servlet.DwrServlet/servlet-class init-param param-namedebug/param-name param-valuetrue/param-value /init-param /servlet !-- Action Servlet Mappings --
How to protect against Session Fixation attacks?
Hi wicket users, we are currently in the process of securing our Wicket-powered application against various attack vectors. One of them is Session Fixation, as described here: http://www.owasp.org/index.php/Session_Fixation The recommended protection in Java is to invalidate the Session before authenticating the user, with something like this: HttpSession s = request.getSession(false); if (s != null) s.invalidate(); s = request.getSession(true); Invalidating the session can be done with Session.get().invalidate() or invalidateNow(), but that leaves, as far as I can tell, Wicket's Session in a broken state, preventing the login alltogether. Instead of continuing to tamper with Wicket internals, is there a solution available? Regards, Enes F.
Please comment the Branding Link idea
This idea dont need a propertyfile! But I want to repeat that I'm using a jar that the branded webapplication depends on. The jar is the core functionallity that all brands depends on. As you see in the replace Im keeping the package structure in the webapplication(on overrided component/pages). Beside the WhateverName_brand.class I also have a WhateverName_bran.html markupfile and css if it needed. I wonder if it might be some memory/performance problem in this 'spike'. If the branded version does not exist it will keep on throwing the exception. public class NavLink extends PageLink { public NavLink(String s, Class pClass) { super(s, GetBrandedClass(pClass)); } private static Class GetBrandedClass(Class pClass) { String simpleName = pClass.getSimpleName(); String name = pClass.getName().replace(simpleName, simpleName + _ + Session.get().getStyle()); try { return Thread.currentThread().getContextClassLoader().loadClass(name); } catch (ClassNotFoundException e) { e.printStackTrace(); //Should be logged } return pClass; //returns the core version } } I still need to try the wicket:link idea from above. Then you only brand the markup file and change wicket:link. But I need to check out if absolute paths in the markup will be nice. -- View this message in context: http://www.nabble.com/Branding-a-PageLink-target-Page-tp18382006p18735873.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem with AjaxFallbackButton.setDefaultFormProcessing and WicketTester
yep, file a jira issue -igor On Wed, Jul 30, 2008 at 1:53 AM, lars vonk [EMAIL PROTECTED] wrote: Hi, I have the following simplified situation: A page with one form containing a radiogroup with one option and two AjaxFallbackButtons. One of the two buttons has its defaultFormProcessing set to false (because it does not need to submit the form). When I test the form submission with the FormTester the order in which I add the buttons to the form matter whether or not the selected radio choice is actually set on the model object or not. If I add the button with the defaulFormProcessing = false first is does not submit correctly, if I add it as last it does. This behavior only occurs with the FormTester and not in the real environment. I use Wicket 1.4-m3, JDK 1.5. Is this a bug? If so let me know I'll file a bugreport with a testcase. Cheers, Lars - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem with generating project using quickstart
jar opens just fine over here... -igor On Wed, Jul 30, 2008 at 2:32 AM, lars vonk [EMAIL PROTECTED] wrote: Hi, I am trying to generate a wicket project using quickstart but I get these errors: Downloading: http://repo1.maven.org/maven2/org/apache/wicket/wicket-archetype-quickstart/1.4-m3/wicket-archetype-quickstart-1.4-m3.jar 12K downloaded [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '4839111e497beee60c395992f2bab2d9fae386e2'; remote = '27eccc6d347b4dac5 c4c6a7b5441c42a' - RETRYING Downloading: http://repo1.maven.org/maven2/org/apache/wicket/wicket-archetype-quickstart/1.4-m3/wicket-archetype-quickstart-1.4-m3.jar 12K downloaded [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '4839111e497beee60c395992f2bab2d9fae386e2'; remote = '27eccc6d347b4dac5 c4c6a7b5441c42a' - IGNORING . Maven stuff omitted. [ERROR] BUILD ERROR [INFO] - [INFO] Error creating from archetype Embedded error: The META-INF/maven/archetype.xml descriptor cannot be found. This also happens for 1.3.4, if I download the jar manually I can't open it. Does anyone else experience this? It could also be our network I guess. Thanks, Lars - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to protect against Session Fixation attacks?
doing that should be fine, just make sure that after login you redirect to a bookmarkable url which will then create a new session. so session.invalidate(); loginuser(); setrequesttarget(new bookmarkablepagetarget(...)); getrequest().setredirect(true); -igor On Wed, Jul 30, 2008 at 7:15 AM, Enes Fazli [EMAIL PROTECTED] wrote: Hi wicket users, we are currently in the process of securing our Wicket-powered application against various attack vectors. One of them is Session Fixation, as described here: http://www.owasp.org/index.php/Session_Fixation The recommended protection in Java is to invalidate the Session before authenticating the user, with something like this: HttpSession s = request.getSession(false); if (s != null) s.invalidate(); s = request.getSession(true); Invalidating the session can be done with Session.get().invalidate() or invalidateNow(), but that leaves, as far as I can tell, Wicket's Session in a broken state, preventing the login alltogether. Instead of continuing to tamper with Wicket internals, is there a solution available? Regards, Enes F. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DropDownChoice default value not found because of equal method
On Wed, Jul 30, 2008 at 3:02 AM, Andrea Jahn [EMAIL PROTECTED] wrote: Reason is, that the Country class contains an equal() method. Wicket calls this method, but the comparison of the id delivers false (different instances of the Integer object). this doesnt make any sense unless you do int1==int2, which you dont, you use equals which does not care about instance identity. so if your ids do not match you have another problem with your db somewhere. use the debugger and check that the values are actually the same. -igor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WicketSessionFilter Problem: java.lang.IllegalStateException
also make sure that there is an actual session to be set...there is session.exists() iirc. -igor On Wed, Jul 30, 2008 at 4:38 AM, Johan Compagner [EMAIL PROTECTED] wrote: he? And what you are trying to do is completely the opposite (accessing the wicket session in struts) But if you want to get the wicket session in struts then that filter should be ok Does the filter hit just before your struts things? johan On Wed, Jul 30, 2008 at 1:31 PM, James Perry [EMAIL PROTECTED]wrote: I can't work out why it doesn't work so I decided to subclass the WebRequestCycle and access the HTTPSession's attributes via my PharmisisSession. Cheers, Jim. On Wed, Jul 30, 2008 at 11:19 AM, James Perry [EMAIL PROTECTED] wrote: Thanks for the swift reply. That's what I originally had but it didn't work and just tried again to re-confirm. :-) Any other suggestions? I've checkout the source code to see if that helps. On Wed, Jul 30, 2008 at 10:42 AM, Martijn Dashorst [EMAIL PROTECTED] wrote: I think you have to wrap the wicket session filter around your *.do mapping, not your new/* mapping. Martijn On Wed, Jul 30, 2008 at 11:35 AM, James Perry [EMAIL PROTECTED] wrote: Hello! I would be grateful for any advice with the below problem I am encountering with the WicketSessionFilter. I managed to convince my colleagues to migrate our www.mypharmisis.com (a drug ordering system for the Pharmaceutical industry) from Struts to Wicket after the success of a greenfield project using Wicket. I don't have the resources to migrate all at once so Struts 1 and Wicket so I have set them up to coexist congruently. However! I am having problems sharing necessary state between Struts 1 and Wicket using the WicketSessionFilter :-( When my Strut controllers tries to access my WebSession, it throws a java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle. My stack trace is: org.apache.wicket.Session.findOrCreate(Session.java:206) org.apache.wicket.Session.get(Session.java:250) com.mypharmsisis.pages.session.PharmisisSession.get(PharmisisSession.java:24) com.mypharmisis.struts.isis.actions.AbstractEasyAction.displayPage(AbstractEasyAction.java:52) com.mypharmisis.struts.isis.actions.EasyOrderHomeAction.displayPage(EasyOrderHomeAction.java:53) Here is a snippet of my web.xml: !-- Wicket configuration using standard JEE filter -- filter filter-namewicket.pharmisis/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param param-nameapplicationClassName/param-name param-valuecom.mypharmisis.pages.PharmisisApplication/param-value /init-param /filter filter filter-nameWicketSessionFilter/filter-name filter-classorg.apache.wicket.protocol.http.servlet.WicketSessionFilter/filter-class init-param param-namefilterName/param-name param-valuewicket.pharmisis/param-value /init-param /filter filter-mapping filter-namewicket.pharmisis/filter-name url-pattern/secure/new/*/url-pattern /filter-mapping filter-mapping filter-nameWicketSessionFilter/filter-name url-pattern*.do/url-pattern /filter-mapping !-- End of Wicket configuration -- context-param param-name javax.servlet.jsp.jstl.fmt.localizationContext /param-name param-value com.mypharmisis.isis.ApplicationResources /param-value /context-param context-param param-namecrystal_image_uri/param-name param-value/isis2/crystalreportviewers11/param-value /context-param distributable/ listener listener-classcom.mypharmisis.struts.isis.framework.IsisContextListener/listener-class /listener servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-namedebug/param-name param-valuetrue/param-value /init-param init-param param-namedetail/param-name param-value9/param-value /init-param init-param param-namenocache/param-name param-valuetrue/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param load-on-startup1/load-on-startup /servlet !-- DWR configuration -- servlet servlet-namedwr-invoker/servlet-name display-nameDWR Servlet/display-name servlet-classorg.directwebremoting.servlet.DwrServlet/servlet-class
Perfomance Benefits Question
Hi All, Please I was wondering generally, Are there any Performance Benefits in 1. Breaking a Wicket Page Down into many tiny components in seperate Java-HTML files thus simplyfing code and component reuse AGAINST 2. Coding all the UI components in one long, long:) WebPage Code which obviously always leads to spagetti convoluted code. I am asumming (2) will be faster because wicket will not be loading too many .HTML files in order to assemble one page even though optimizing code will become very difficult. Too many anonymous inner classes. Please does anyone have a take on this. Has anyone done a benchmark on this case. Thanks -- Aladejebi Ayodeji A., DabarObjects Solutions
RE: WicketSessionFilter Problem: java.lang.IllegalStateException
One more suggestion is to declare the filter so that it is invoked when request dispatcher methods are called: filter-mapping filter-nameWicketSessionFilter/filter-name url-pattern*.do/url-pattern dispatcherREQUEST/dispatcher dispatcherINCLUDE/dispatcher /filter-mapping I'm not sure if that is what is happening in this situation, but it might be worth a shot. -Original Message- From: James Perry [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 30, 2008 7:31 AM To: users@wicket.apache.org Subject: Re: WicketSessionFilter Problem: java.lang.IllegalStateException I can't work out why it doesn't work so I decided to subclass the WebRequestCycle and access the HTTPSession's attributes via my PharmisisSession. Cheers, Jim. On Wed, Jul 30, 2008 at 11:19 AM, James Perry [EMAIL PROTECTED] wrote: Thanks for the swift reply. That's what I originally had but it didn't work and just tried again to re-confirm. :-) Any other suggestions? I've checkout the source code to see if that helps. On Wed, Jul 30, 2008 at 10:42 AM, Martijn Dashorst [EMAIL PROTECTED] wrote: I think you have to wrap the wicket session filter around your *.do mapping, not your new/* mapping. Martijn On Wed, Jul 30, 2008 at 11:35 AM, James Perry [EMAIL PROTECTED] wrote: Hello! I would be grateful for any advice with the below problem I am encountering with the WicketSessionFilter. I managed to convince my colleagues to migrate our www.mypharmisis.com (a drug ordering system for the Pharmaceutical industry) from Struts to Wicket after the success of a greenfield project using Wicket. I don't have the resources to migrate all at once so Struts 1 and Wicket so I have set them up to coexist congruently. However! I am having problems sharing necessary state between Struts 1 and Wicket using the WicketSessionFilter :-( When my Strut controllers tries to access my WebSession, it throws a java.lang.IllegalStateException: you can only locate or create sessions in the context of a request cycle. My stack trace is: org.apache.wicket.Session.findOrCreate(Session.java:206) org.apache.wicket.Session.get(Session.java:250) com.mypharmsisis.pages.session.PharmisisSession.get(PharmisisSession.jav a:24) com.mypharmisis.struts.isis.actions.AbstractEasyAction.displayPage(Abstr actEasyAction.java:52) com.mypharmisis.struts.isis.actions.EasyOrderHomeAction.displayPage(Easy OrderHomeAction.java:53) Here is a snippet of my web.xml: !-- Wicket configuration using standard JEE filter -- filter filter-namewicket.pharmisis/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param param-nameapplicationClassName/param-name param-valuecom.mypharmisis.pages.PharmisisApplication/param-value /init-param /filter filter filter-nameWicketSessionFilter/filter-name filter-classorg.apache.wicket.protocol.http.servlet.WicketSessionFilte r/filter-class init-param param-namefilterName/param-name param-valuewicket.pharmisis/param-value /init-param /filter filter-mapping filter-namewicket.pharmisis/filter-name url-pattern/secure/new/*/url-pattern /filter-mapping filter-mapping filter-nameWicketSessionFilter/filter-name url-pattern*.do/url-pattern /filter-mapping !-- End of Wicket configuration -- context-param param-name javax.servlet.jsp.jstl.fmt.localizationContext /param-name param-value com.mypharmisis.isis.ApplicationResources /param-value /context-param context-param param-namecrystal_image_uri/param-name param-value/isis2/crystalreportviewers11/param-value /context-param distributable/ listener listener-classcom.mypharmisis.struts.isis.framework.IsisContextListene r/listener-class /listener servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-namedebug/param-name param-valuetrue/param-value /init-param init-param param-namedetail/param-name param-value9/param-value /init-param init-param param-namenocache/param-name param-valuetrue/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param load-on-startup1/load-on-startup /servlet !-- DWR configuration -- servlet servlet-namedwr-invoker/servlet-name display-nameDWR Servlet/display-name servlet-classorg.directwebremoting.servlet.DwrServlet/servlet-class init-param param-namedebug/param-name
Conditional Form Validation
Hi, I am trying to implement conditional form validation according to the wiki artcle http://cwiki.apache.org/WICKET/conditional-validation.html Seems like one has to manually call updateFormComponentModels() to update the form model which is not mentioned in the wiki which is fine, but the problem is updateFormComponentModels() is protected method, so it cannot be called from button's onSubmit() method. Am I missing anything? -- View this message in context: http://www.nabble.com/Conditional-Form-Validation-tp18737747p18737747.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Conditional Form Validation
What about formComponent.processInput() -Original Message- From: Ritesh Trivedi [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 30, 2008 12:52 PM To: users@wicket.apache.org Subject: Conditional Form Validation Hi, I am trying to implement conditional form validation according to the wiki artcle http://cwiki.apache.org/WICKET/conditional-validation.html Seems like one has to manually call updateFormComponentModels() to update the form model which is not mentioned in the wiki which is fine, but the problem is updateFormComponentModels() is protected method, so it cannot be called from button's onSubmit() method. Am I missing anything? -- View this message in context: http://www.nabble.com/Conditional-Form-Validation-tp18737747p18737747.ht ml Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Mapping url params to instance variables
When using setResponsePage(SearchPage.class, PageParameters) in a page with a QueryStringUrlCodingStrategy, is there a way to automatically map parameters values from the url to the instance variables in the response page component?
Complex URL mapping
Hi, I am currently trying to convert a custom application to Wicket and hit an issue regarding URL mappings. We have the requirement for URL-to-page mappings as follows: 1) http://localhost/app/ - WelcomePage.java 2) http://localhost/app/info - InfoPage.java 3) http://localhost/app/e/entry/ - EntryPage.java 4) http://localhost/app/category/ - CategoryPage.java 5) http://localhost/app/category/subcategory/ - SubCategoryPage.java The problem is that I would need to mount the /app/ four times but Wicket throws an exception. An additional difficulty is that for URL mapping 3) the parameter e is always the first character of entry. category can never be only one character, thus the URLs 3) and 4)/5) are - from a logical point - distinguishable based on the URL pattern. Which URL encoding strategies would I need to configure how to achieve such a mapping? Is it possible at all with Wicket? Thanks in advance, Seb - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Asynchronous Components
I used the onBeforeRender/onRender methods and was able to implement the desired feature using Callable and Future objects from the java.concurrent API. Thanks a lot. Seb Igor Vaynberg wrote: if you want the page to render all at once you have to spin off as many threads as there are components and block rendering until all threads are done. you can do this in page#onbeforerender() which is called before any components start to render. the problem with this is that if it takes a while someone can easily dos your app because you are blocking servlet thread pool. a better way to do this would be to drop each component into an iframe and make it poll for data which is retrieved using some global threadpool. -igor On Tue, Jul 22, 2008 at 2:12 PM, Sebastian [EMAIL PROTECTED] wrote: Hi, I have not yet looked much into Wicket but am quite interested in the project. We have a specific requirement where I could not yet find the right information/documentation for. We need to put multiple components onto a page receiving data through web services. A single web services call takes some time. In our scenario it would be bad to have the different components of a page to request their data sequentially, therefore we'd like to have components retrieve the required data in parallel by firing the web services call concurrenlty. What is the best approach to achieve this (preferable in a generic, reusable fashion). I do not want to use AJAX for this, the whole page needs to be rendered at once on the server side. Thanks for any hints and thoughts in advance, Seb - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
UploadProgressBar detect size before in action
Hi All, I'm newbie in wicket stuff. I have one question regarding UploadProgessBar. How I can detect the size of uploaded file BEFORE the UploadProgressBar in action? What I want to do is something like this: If a user upload a file, the application will detect the file size and if the file size more than max size, error message will display. But right now, the example in Quickstart is showing that a user uploaded a file and the progress bar wil display directly if more than max size (100k) than the error message will display. Many thanks, Cindy. -- View this message in context: http://www.nabble.com/UploadProgressBar-detect-size-before-in-action-tp18742940p18742940.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to open a Modal Window by clicking a button
Hey, I'm new to wicket and I'm completing a web app that was left behind by someone else. I have to take a functionality (opening a modal window) that was called by clicking an AjaxLink in a panel and bring it in a button on another panel ... I moved the code, it compiles and all but when I click the AjaxSubmitButton (that calls myModalWindow.show(arg0) ), nothing happens ... Does anybody know what the problem could be / what I forgot ? I looked at the example on www.wicket-library.com on how to open modal windows but that was with AjaxLinks ... -- View this message in context: http://www.nabble.com/How-to-open-a-Modal-Window-by-clicking-a-button-tp18743263p18743263.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem with generating project using quickstart
Tried at from home and no problem rom here as well. Must have been the network @ work. Thanks for trying Igor. -- Lars On Wed, Jul 30, 2008 at 5:53 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: jar opens just fine over here... -igor On Wed, Jul 30, 2008 at 2:32 AM, lars vonk [EMAIL PROTECTED] wrote: Hi, I am trying to generate a wicket project using quickstart but I get these errors: Downloading: http://repo1.maven.org/maven2/org/apache/wicket/wicket-archetype-quickstart/1.4-m3/wicket-archetype-quickstart-1.4-m3.jar 12K downloaded [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '4839111e497beee60c395992f2bab2d9fae386e2'; remote = '27eccc6d347b4dac5 c4c6a7b5441c42a' - RETRYING Downloading: http://repo1.maven.org/maven2/org/apache/wicket/wicket-archetype-quickstart/1.4-m3/wicket-archetype-quickstart-1.4-m3.jar 12K downloaded [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '4839111e497beee60c395992f2bab2d9fae386e2'; remote = '27eccc6d347b4dac5 c4c6a7b5441c42a' - IGNORING . Maven stuff omitted. [ERROR] BUILD ERROR [INFO] - [INFO] Error creating from archetype Embedded error: The META-INF/maven/archetype.xml descriptor cannot be found. This also happens for 1.3.4, if I download the jar manually I can't open it. Does anyone else experience this? It could also be our network I guess. Thanks, Lars - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Setting error message component name
I have the following simple form: public MyForm(final String id) { { add(new PasswordTextField(verifyPassword)); } If the user leaves the verifyPassword field blank when they submit the form, it displays the message: * Field 'verifyPassword' is required. How can I make the error message say 'Verify Password' instead of 'verifyPassword'? -- View this message in context: http://www.nabble.com/Setting-error-message-component-name-tp18743731p18743731.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to open a Modal Window by clicking a button
I believe that you really do need it to be a AjaxLink... but if you can send the code to the list we can see if there are any other issues. plb a_godin wrote: Hey, I'm new to wicket and I'm completing a web app that was left behind by someone else. I have to take a functionality (opening a modal window) that was called by clicking an AjaxLink in a panel and bring it in a button on another panel ... I moved the code, it compiles and all but when I click the AjaxSubmitButton (that calls myModalWindow.show(arg0) ), nothing happens ... Does anybody know what the problem could be / what I forgot ? I looked at the example on www.wicket-library.com on how to open modal windows but that was with AjaxLinks ... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Complex URL mapping
There is no need to map 4 applications in your web.xml. Mount your pages to a URL using Application#mount() in your Application#init(). In your case IndexedUrlCodingstrategy sounds like a good starting point. Martijn On Wed, Jul 30, 2008 at 10:57 PM, Sebastian [EMAIL PROTECTED] wrote: Hi, I am currently trying to convert a custom application to Wicket and hit an issue regarding URL mappings. We have the requirement for URL-to-page mappings as follows: 1) http://localhost/app/ - WelcomePage.java 2) http://localhost/app/info - InfoPage.java 3) http://localhost/app/e/entry/ - EntryPage.java 4) http://localhost/app/category/- CategoryPage.java 5) http://localhost/app/category/subcategory/ - SubCategoryPage.java The problem is that I would need to mount the /app/ four times but Wicket throws an exception. An additional difficulty is that for URL mapping 3) the parameter e is always the first character of entry. category can never be only one character, thus the URLs 3) and 4)/5) are - from a logical point - distinguishable based on the URL pattern. Which URL encoding strategies would I need to configure how to achieve such a mapping? Is it possible at all with Wicket? Thanks in advance, Seb - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.4 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Complex URL mapping
Also, you could throw RestartRequestException (iirc) and start at a different page. Or you could roll your own URL coding strategy. Martijn On Thu, Jul 31, 2008 at 12:08 AM, Martijn Dashorst [EMAIL PROTECTED] wrote: There is no need to map 4 applications in your web.xml. Mount your pages to a URL using Application#mount() in your Application#init(). In your case IndexedUrlCodingstrategy sounds like a good starting point. Martijn On Wed, Jul 30, 2008 at 10:57 PM, Sebastian [EMAIL PROTECTED] wrote: Hi, I am currently trying to convert a custom application to Wicket and hit an issue regarding URL mappings. We have the requirement for URL-to-page mappings as follows: 1) http://localhost/app/ - WelcomePage.java 2) http://localhost/app/info - InfoPage.java 3) http://localhost/app/e/entry/ - EntryPage.java 4) http://localhost/app/category/- CategoryPage.java 5) http://localhost/app/category/subcategory/ - SubCategoryPage.java The problem is that I would need to mount the /app/ four times but Wicket throws an exception. An additional difficulty is that for URL mapping 3) the parameter e is always the first character of entry. category can never be only one character, thus the URLs 3) and 4)/5) are - from a logical point - distinguishable based on the URL pattern. Which URL encoding strategies would I need to configure how to achieve such a mapping? Is it possible at all with Wicket? Thanks in advance, Seb - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.4 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.4 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Setting error message component name
public MyForm(final String id) { { PasswordTextField pwd = new PasswordTextField(verifyPassword); pwd.setLabel(new Model(Verify Password)); add(pwd); } insom wrote: I have the following simple form: public MyForm(final String id) { { add(new PasswordTextField(verifyPassword)); } If the user leaves the verifyPassword field blank when they submit the form, it displays the message: * Field 'verifyPassword' is required. How can I make the error message say 'Verify Password' instead of 'verifyPassword'? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AjaxFallbackDefaultDataTable - goto page number on return from another page
Wicket 1.3.4. I have a Page (ThingListing) containing an AjaxFallbackDefaultDataTable - created like: private WebMarkupContainer listContainer = new WebMarkupContainer(listContainer); private MySortableDealProvider dataProvider; private Thing thing = null; public ThingListing(PageParameters params) { // this is a reload from the CRUD page if (params != null) { setThing(getThingManager().findById(params.getString(thingId))); } // else load everything ... dataProvider = new SortableDealDataProvider(getThingManager(), thing); String sort = params.getString(sort); Boolean isAscending = params.getBoolean(ascending); dataProvider.setSort(sort, isAscending); ... listContainer.add(new AjaxFallbackDefaultDataTable(mything, columns, dataProvider, TABLE_ROWS)); I add an AbstractColumn to the AjaxFallbackDefaultDataTable to handle forwarding to a page to do CRUD work on the selected item from the table - like : columns.add(new AbstractColumn(new Model(Edit)) { public void populateItem(Item cellItem, String componentId, IModel model) { cellItem.add(new ActionPanel(componentId, model)); } public String getCssClass() { return edit; } }); class ActionPanel extends Panel { public ActionPanel(String id, IModel model) { super(id, model); add(new Link(edit) { public void onClick() { Integer thingId = ((Thing) getParent().getModelObject()).getId(); PageParameters params = new PageParameters(); params.put(thingId, thingId); params.put(sort, dataProvider.getSort().getProperty()); params.put(ascending, dataProvider.getSort().isAscending()); setResponsePage(ThingEdit.class, params); } }); } } Note - I am attempting to pass the id of the selected row in the table, plus the sort column, and the ascending direction to the CRUD page. The ThingEdit CRUD page takes all the page params from the ThingListing page, does normal CRUD work, then passes back all the params back into the main listing page constructor so that when the listing page reloads, it maintains its state (main selection criteria, sort column, sort order) from the page the user selected before triggering the CRUD page - eg: public class ThingEdit { private PageParameters pageParams; public ThingEdit(PageParameters p) { pageParams = p; ... } ... private void addCancelButton(Form form) { Button cancel = new Button(cancelbutton) { public void onSubmit() { setResponsePage(ThingListing.class, pageParams); } }; cancel.setDefaultFormProcessing(false); form.add(cancel); } However, I can't work out how to go back to the page number that the user was on before he loaded the CRUD page. That is, if the user was on page 3 of 20, then after clicking a record to edit goes to the CRUD page, then he goes back to the listing the correct order and sort are maintaine, but he's always at page 1 of 20 instead of page 3. I have tried manually setting the ThingSortableDataProvider.iterator() first and count and with additional page params - but this just ends up with it being called twice - once with my page params, and again by the default 0 and count. So, any way to make this work? I think am probably still missing the point with Wicket (can't really get my head around Models) and revert to attempting to use page params and manually adding to session to pass data from one page to another and back again. Steve -- View this message in context: http://www.nabble.com/AjaxFallbackDefaultDataTable---goto-page-number-on-return-from-another-page-tp18744983p18744983.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: UploadProgressBar detect size before in action
You might be able to do that with some sort of ajax'y script in the browser (but I don't think so). The problem is essentially that until you submit the page, the server will know nothing about the form component (that stateless thing again). - Brill On 30-Jul-08, at 5:11 PM, cindyvr wrote: Hi All, I'm newbie in wicket stuff. I have one question regarding UploadProgessBar. How I can detect the size of uploaded file BEFORE the UploadProgressBar in action? What I want to do is something like this: If a user upload a file, the application will detect the file size and if the file size more than max size, error message will display. But right now, the example in Quickstart is showing that a user uploaded a file and the progress bar wil display directly if more than max size (100k) than the error message will display. Many thanks, Cindy. -- View this message in context: http://www.nabble.com/UploadProgressBar-detect-size-before-in-action-tp18742940p18742940.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Refreshing a form inside a Modal Window
Hi all, I have Modal Window which contains a panel. Inside the panel I am trying to perform a search and the results of the search are populating inside a ListView. There is an apply button which applies the list on the main page and closes the modal window. However when I want to do another search and bring up the Modal window the previous List is still present in it. I think that when the Modal window is closed it just becomes invisible and is not closing actually and thats why this is happening. But I was just wondering if there is a way so as to refresh the (search)form or the panel whenever it is loaded inside the Modal window. Any kind of help will be appreciated. Thanks, vishy -- View this message in context: http://www.nabble.com/Refreshing-a-form-inside-a-Modal-Window-tp18745307p18745307.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Mapping url params to instance variables
no, but i suppose you can write a utility to do that... -igor On Wed, Jul 30, 2008 at 1:37 PM, Ryan O'Hara [EMAIL PROTECTED] wrote: When using setResponsePage(SearchPage.class, PageParameters) in a page with a QueryStringUrlCodingStrategy, is there a way to automatically map parameters values from the url to the instance variables in the response page component? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Guiedlines in Wicket
My superior ask me to submit a Guidelines in Wicket. He assign it to me because I trained the new employee the wicket framework (we are using wicket as our UI framework along with Hibernate and Spring...actually we already develop two application in wicket and third one is migration from asp to wicket). Is there really a Guidelines or it is just we follow the guidelines in java programming naming convention and etci appreciate any suggestion/s or comment/s. Thanks a lot. Cheers. -- View this message in context: http://www.nabble.com/Guiedlines-in-Wicket-tp18745859p18745859.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket Datepicker javascript not loaded in portlet environment
Hi Serkan, Did you fix this issue. I am also facing the same issue in portlet environment when using firefox 2.0 I really appreciate, if you give some pointers on how to fix this if you already fixed this issue. Thanks Prasanna Serkan Camurcuoglu-2 wrote: Hi all, I'm trying to use an org.apache.wicket.datetime.markup.html.form.DateTextField component which contains a org.apache.wicket.extensions.yui.calendar.DatePicker in my portlet application. The field is contained in a panel with the markup like: wicket:panel input type=text wicket:id=dateInput/ /wicket:panel and the panel is contained in a listview, which is also contained within a form. When I access the application directly, the date picker works fine. But when I access it as a portlet, the date picker is displayed correctly but it does not show the calendar when I click the icon. When I check with the javascript debugger, I see that wicket-event.js and yuiloader-beta.js files are loaded, but calendar.js and wicket-date.js are not loaded. I've included a related excerpt from the generated html page below. As far as I understand, these javascript files are dynamically included by YUI loader. But in a portlet environment they are not loaded, and I cannot use the venkman javascript debugger since this happens during page load. I'm using Wicket 1.3.3 and Firefox 2.0. Does anybody have any idea why these js files are not loaded? It would be great if anybody would tell me what could be wrong and give me some pointers on debugging this javascript code. Best regards, SerkanC script type=text/javascript src=/subscriber-web/buyOffer/ps:681/resources/org.apache.wicket.extensions.yui.YuiLib/yuiloader-beta.js/script script type=text/javascript src=/subscriber-web/buyOffer/ps:681/resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js/script script type=text/javascript !--/*--![CDATA[/*!--*/ Wicket.Event.add(window, domready, function() { /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the License); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ if (typeof wicketCalendarInits == 'undefined') { wicketCalendarInits = new Array(); wicketCalendarInitFinished = false; } initdateInputjs__6818 = function() { Wicket.DateTime.init( { widgetId: dateInputjs__6818, componentId: dateInputjs__6818, calendarInit: { WEEKDAYS_MEDIUM:[Sun,Mon,Tue,Wed,Thu,Fri,Sat],WEEKDAYS_1CHAR:[S,M,T,W,T,F,S],MONTHS_LONG:[January,February,March,April,May,June,July,August,September,October,November,December],WEEKDAYS_LONG:[Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday],MONTHS_SHORT:[Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec],START_WEEKDAY:0,close:true,WEEKDAYS_SHORT:[Su,Mo,Tu,We,Th,Fr,Sa] }, datePattern: M/d/yy, alignWithIcon: true, fireChangeEvent: true, hideOnSelect: true }); }; if (wicketCalendarInitFinished) { // when a DatePicker is added via ajax, the loader is already finished, so // we call the init function directly. initdateInputjs__6818(); } else { // when page is rendered, all calendar components will be initialized after // the required js libraries have been loaded. wicketCalendarInits.push(initdateInputjs__6818); } if (typeof wicketYuiLoader == 'undefined'){ wicketYuiLoader = new YAHOO.util.YUILoader({ base: /subscriber-web/buyOffer/ps:681/resources/org.apache.wicket.extensions.yui.YuiLib/, filter: RAW, allowRollup: false, require: [wicket-date], onSuccess: function() { wicketCalendarInitFinished = true; while (wicketCalendarInits.length 0) { wicketCalendarInits.pop()(); } } }); wicketYuiLoader.addModule({ name: wicket-date, type: js, requires: [calendar], fullpath:
Re: TreeGrid and DataGrid open source
Hi Matej, The website (http://www.inmethod.com/) seems to be down. I've got a tomcat welcome page instead. Is this project still active? Regards, Gabriel. -- View this message in context: http://www.nabble.com/TreeGrid-and-DataGrid-open-source-tp14768511p18746082.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FusionCharts - How to
Hi, I digged through various dynamic chart options and found fusion charts free good enough for the current requirements. Can someone help me in using FusionCharts with wicket. How to embed flash objects? How do we feed xml data to these objects ? Is JSON the only way ? Any alternative ? - thanks cresc -- View this message in context: http://www.nabble.com/FusionCharts---How-to-tp18747498p18747498.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]