Palette problem
Hello, I have a problem about palette. here is the scenario: if there is already values in selected side and when I add values from available side there is only n-1 values get. If there is currently 2 values in the selected side then i add 2 values from available side, i only get 3 values. The last one is not included in the result. Any idea? Thanks a lot. Cheers.
Re: Pre-built wicket sample app for a starter to copy?
David Brown-48 wrote: > > Hello, please excuse if the wicket-security project is readily visible. > Otherwise, reply with the link. Much appreciated. Regards, David. > Google is your friend :) http://lmgtfy.com/?q=wicket+security -- View this message in context: http://www.nabble.com/Pre-built-wicket-sample-app-for-a-starter-to-copy--tp23487461p23534408.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: objectautocomplete on a form with CompoundPropertyModel
I'd actually rather it worked as expected and simply set the object on the model property :) However, it's usable so I'll live with it. - brill On 13-May-09, at 3:10 PM, nino martinez wael wrote: Yeah or just another way of thinking.. :) 2009/5/11 Brill Pappin : Thanks that worked... although its a bit of a pain in the behind :) - Brill Pappin On 11-May-09, at 6:55 AM, nino martinez wael wrote: You do something like this: // compound model private final IModel cityModel = new PropertyModel( searchWrapper, "cityId"); builderCity .updateOnSelectionChange(new ObjectAutoCompleteSelectionChangeListener() { public void selectionChanged(AjaxRequestTarget target, IModel model) { cityModel.setObject(model.getObject()); } }); So it does not update on submit, but instead onSelectionChange of the builder.. 2009/5/11 Brill Pappin : I'm trying to use ObjectAutoComplete from wicketstuff on a form where the model is a CompoundPropertyModel. The auto compete field doesn't seem to be setting its value on the form model at all during a submit. I've looked at the examples for this component and not a single one actually includes the onSubmit implementation. Is there something special i have to do with this component? - Brill Pappin - 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 smime.p7s Description: S/MIME cryptographic signature
Re: Serialization
Great link site Clint... should be called STFW though :) - Brill On 13-May-09, at 2:44 PM, Clint Popetz wrote: http://lmgtfy.com/?q=java+serialization+default+constructor&l=1 -Clint On Wed, May 13, 2009 at 1:39 PM, Douglas Ferguson wrote: Why do Wicket-serialized objects require a default constructor? Exception is: smime.p7s Description: S/MIME cryptographic signature
Re: Fast, easy and friendly ORM (Alternative to Hibernate or JPA)
I was going to let you folks come to your own conclusions and hopefully we wouldn't re-hash the discussion here. On Wed, May 13, 2009 at 8:21 PM, Clint Popetz wrote: > Is that a way of saying "please don't spend wicket users bandwidth > with 100+ explanations of why this is not a good ORM for any > reasonably complex use case? :) > > Oops, too late. > > -Clint > > On Wed, May 13, 2009 at 7:07 PM, James Carman > wrote: >> Fellow Wicketeers, >> >> Please see the discussion at TSS about this framework: >> >> http://www.theserverside.com/news/thread.tss?thread_id=54535 >> >> >> >> On Wed, May 13, 2009 at 7:25 PM, Jim Xie wrote: >>> Dear Wicket Users, >>> >>> >>> Dreamsource ORM has been used in three major applications for over three >>> years. It solves the following problems: >>> >>> >>> 1. Whatever you codes happens in database. >>> 2. No detached enhanced object. So it can be used with any frameworks >>> like Spring, GWT. >>> 3. No lazy loading. Just eager loading because you can expect whatever >>> you want during coding. Eager loading removes n + 1 queries. >>> 4. Queries can be defined through *Select* or *Query* with support of >>> built-in Converters.*Select* can be constructed based on objects *Table* >>> , *Column*, And. *Column* can be obtained from *Table* and it has a lot >>> of methods such as *greaterThan()*, *betweenAnd()*, which can be used to >>> define predicates. *Select* supports pagination control. *Query* can be >>> constructed from a string SQL statement. It supports parameter binding. >>> 5. It provides more flexible query features than JPA 2.0. It eliminates >>> the regeneration of a metamodel class from a annotated entity. >>> 6. built-in converter that can be used to convert a Java Object into a >>> frontend String or a frontend String into a backend Java Object. The >>> converter prevents data conversion from scattering different pages and >>> layers. >>> 7. built-in validator that can be used to validate an input POJO object >>> before it is saved or updated. The validation prevents invalid data from >>> being persisted. >>> 8. Each database table needs the following objects: >>> >>> - an entity object which extends *POJO*. >>> - a primary key object which extends *TablePK* if there is a composite >>> primary key. >>> - a table object which extends *Table*. >>> - a converter which extends *Converter* (optional). >>> - a validator which extends *Validatable* (optional). >>> >>> The above code can be generated using Dreamsource ORM Code Generator >>> which is an Eclipse plugin. >>> >>> 9. It provides most demanding features in a small library (522,217 >>> bytes). >>> 10. Easy to learn and use because it just mirrors SQL statements. >>> 11. High performance compared to Hibernate. >>> 12. High productivity compared to Hibernate. >>> >>> >>> You can find Spring and GWT examples from >>> http://www.leeonsoft.com/examples.jsp. >>> >>> Whoever makes a serious comparison of Dreamsource ORM with Hibernate or JPA >>> will be rewarded one license. Any feedback is appreciated. >>> >>> Best regards, >>> >>> Jim Xie >>> http://www.leeonsoft.com >>> http://code.google.com/p/dreamsource-orm/ >>> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > > > > -- > Clint Popetz > http://42lines.net > Scalable Web Application Development > > - > 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: Fast, easy and friendly ORM (Alternative to Hibernate or JPA)
lets keep this list reserved for wicket-related flamewars only, keep the other ones on tss :) -igor On Wed, May 13, 2009 at 5:21 PM, Clint Popetz wrote: > Is that a way of saying "please don't spend wicket users bandwidth > with 100+ explanations of why this is not a good ORM for any > reasonably complex use case? :) > > Oops, too late. > > -Clint > > On Wed, May 13, 2009 at 7:07 PM, James Carman > wrote: >> Fellow Wicketeers, >> >> Please see the discussion at TSS about this framework: >> >> http://www.theserverside.com/news/thread.tss?thread_id=54535 >> >> >> >> On Wed, May 13, 2009 at 7:25 PM, Jim Xie wrote: >>> Dear Wicket Users, >>> >>> >>> Dreamsource ORM has been used in three major applications for over three >>> years. It solves the following problems: >>> >>> >>> 1. Whatever you codes happens in database. >>> 2. No detached enhanced object. So it can be used with any frameworks >>> like Spring, GWT. >>> 3. No lazy loading. Just eager loading because you can expect whatever >>> you want during coding. Eager loading removes n + 1 queries. >>> 4. Queries can be defined through *Select* or *Query* with support of >>> built-in Converters.*Select* can be constructed based on objects *Table* >>> , *Column*, And. *Column* can be obtained from *Table* and it has a lot >>> of methods such as *greaterThan()*, *betweenAnd()*, which can be used to >>> define predicates. *Select* supports pagination control. *Query* can be >>> constructed from a string SQL statement. It supports parameter binding. >>> 5. It provides more flexible query features than JPA 2.0. It eliminates >>> the regeneration of a metamodel class from a annotated entity. >>> 6. built-in converter that can be used to convert a Java Object into a >>> frontend String or a frontend String into a backend Java Object. The >>> converter prevents data conversion from scattering different pages and >>> layers. >>> 7. built-in validator that can be used to validate an input POJO object >>> before it is saved or updated. The validation prevents invalid data from >>> being persisted. >>> 8. Each database table needs the following objects: >>> >>> - an entity object which extends *POJO*. >>> - a primary key object which extends *TablePK* if there is a composite >>> primary key. >>> - a table object which extends *Table*. >>> - a converter which extends *Converter* (optional). >>> - a validator which extends *Validatable* (optional). >>> >>> The above code can be generated using Dreamsource ORM Code Generator >>> which is an Eclipse plugin. >>> >>> 9. It provides most demanding features in a small library (522,217 >>> bytes). >>> 10. Easy to learn and use because it just mirrors SQL statements. >>> 11. High performance compared to Hibernate. >>> 12. High productivity compared to Hibernate. >>> >>> >>> You can find Spring and GWT examples from >>> http://www.leeonsoft.com/examples.jsp. >>> >>> Whoever makes a serious comparison of Dreamsource ORM with Hibernate or JPA >>> will be rewarded one license. Any feedback is appreciated. >>> >>> Best regards, >>> >>> Jim Xie >>> http://www.leeonsoft.com >>> http://code.google.com/p/dreamsource-orm/ >>> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > > > > -- > Clint Popetz > http://42lines.net > Scalable Web Application Development > > - > 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: Fast, easy and friendly ORM (Alternative to Hibernate or JPA)
Is that a way of saying "please don't spend wicket users bandwidth with 100+ explanations of why this is not a good ORM for any reasonably complex use case? :) Oops, too late. -Clint On Wed, May 13, 2009 at 7:07 PM, James Carman wrote: > Fellow Wicketeers, > > Please see the discussion at TSS about this framework: > > http://www.theserverside.com/news/thread.tss?thread_id=54535 > > > > On Wed, May 13, 2009 at 7:25 PM, Jim Xie wrote: >> Dear Wicket Users, >> >> >> Dreamsource ORM has been used in three major applications for over three >> years. It solves the following problems: >> >> >> 1. Whatever you codes happens in database. >> 2. No detached enhanced object. So it can be used with any frameworks >> like Spring, GWT. >> 3. No lazy loading. Just eager loading because you can expect whatever >> you want during coding. Eager loading removes n + 1 queries. >> 4. Queries can be defined through *Select* or *Query* with support of >> built-in Converters.*Select* can be constructed based on objects *Table* >> , *Column*, And. *Column* can be obtained from *Table* and it has a lot >> of methods such as *greaterThan()*, *betweenAnd()*, which can be used to >> define predicates. *Select* supports pagination control. *Query* can be >> constructed from a string SQL statement. It supports parameter binding. >> 5. It provides more flexible query features than JPA 2.0. It eliminates >> the regeneration of a metamodel class from a annotated entity. >> 6. built-in converter that can be used to convert a Java Object into a >> frontend String or a frontend String into a backend Java Object. The >> converter prevents data conversion from scattering different pages and >> layers. >> 7. built-in validator that can be used to validate an input POJO object >> before it is saved or updated. The validation prevents invalid data from >> being persisted. >> 8. Each database table needs the following objects: >> >> - an entity object which extends *POJO*. >> - a primary key object which extends *TablePK* if there is a composite >> primary key. >> - a table object which extends *Table*. >> - a converter which extends *Converter* (optional). >> - a validator which extends *Validatable* (optional). >> >> The above code can be generated using Dreamsource ORM Code Generator >> which is an Eclipse plugin. >> >> 9. It provides most demanding features in a small library (522,217 >> bytes). >> 10. Easy to learn and use because it just mirrors SQL statements. >> 11. High performance compared to Hibernate. >> 12. High productivity compared to Hibernate. >> >> >> You can find Spring and GWT examples from >> http://www.leeonsoft.com/examples.jsp. >> >> Whoever makes a serious comparison of Dreamsource ORM with Hibernate or JPA >> will be rewarded one license. Any feedback is appreciated. >> >> Best regards, >> >> Jim Xie >> http://www.leeonsoft.com >> http://code.google.com/p/dreamsource-orm/ >> > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Clint Popetz http://42lines.net Scalable Web Application Development - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Fast, easy and friendly ORM (Alternative to Hibernate or JPA)
Fellow Wicketeers, Please see the discussion at TSS about this framework: http://www.theserverside.com/news/thread.tss?thread_id=54535 On Wed, May 13, 2009 at 7:25 PM, Jim Xie wrote: > Dear Wicket Users, > > > Dreamsource ORM has been used in three major applications for over three > years. It solves the following problems: > > > 1. Whatever you codes happens in database. > 2. No detached enhanced object. So it can be used with any frameworks > like Spring, GWT. > 3. No lazy loading. Just eager loading because you can expect whatever > you want during coding. Eager loading removes n + 1 queries. > 4. Queries can be defined through *Select* or *Query* with support of > built-in Converters.*Select* can be constructed based on objects *Table* > , *Column*, And. *Column* can be obtained from *Table* and it has a lot > of methods such as *greaterThan()*, *betweenAnd()*, which can be used to > define predicates. *Select* supports pagination control. *Query* can be > constructed from a string SQL statement. It supports parameter binding. > 5. It provides more flexible query features than JPA 2.0. It eliminates > the regeneration of a metamodel class from a annotated entity. > 6. built-in converter that can be used to convert a Java Object into a > frontend String or a frontend String into a backend Java Object. The > converter prevents data conversion from scattering different pages and > layers. > 7. built-in validator that can be used to validate an input POJO object > before it is saved or updated. The validation prevents invalid data from > being persisted. > 8. Each database table needs the following objects: > > - an entity object which extends *POJO*. > - a primary key object which extends *TablePK* if there is a composite > primary key. > - a table object which extends *Table*. > - a converter which extends *Converter* (optional). > - a validator which extends *Validatable* (optional). > > The above code can be generated using Dreamsource ORM Code Generator > which is an Eclipse plugin. > > 9. It provides most demanding features in a small library (522,217 > bytes). > 10. Easy to learn and use because it just mirrors SQL statements. > 11. High performance compared to Hibernate. > 12. High productivity compared to Hibernate. > > > You can find Spring and GWT examples from > http://www.leeonsoft.com/examples.jsp. > > Whoever makes a serious comparison of Dreamsource ORM with Hibernate or JPA > will be rewarded one license. Any feedback is appreciated. > > Best regards, > > Jim Xie > http://www.leeonsoft.com > http://code.google.com/p/dreamsource-orm/ > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Fast, easy and friendly ORM (Alternative to Hibernate or JPA)
Dear Wicket Users, Dreamsource ORM has been used in three major applications for over three years. It solves the following problems: 1. Whatever you codes happens in database. 2. No detached enhanced object. So it can be used with any frameworks like Spring, GWT. 3. No lazy loading. Just eager loading because you can expect whatever you want during coding. Eager loading removes n + 1 queries. 4. Queries can be defined through *Select* or *Query* with support of built-in Converters.*Select* can be constructed based on objects *Table* , *Column*, And. *Column* can be obtained from *Table* and it has a lot of methods such as *greaterThan()*, *betweenAnd()*, which can be used to define predicates. *Select* supports pagination control. *Query* can be constructed from a string SQL statement. It supports parameter binding. 5. It provides more flexible query features than JPA 2.0. It eliminates the regeneration of a metamodel class from a annotated entity. 6. built-in converter that can be used to convert a Java Object into a frontend String or a frontend String into a backend Java Object. The converter prevents data conversion from scattering different pages and layers. 7. built-in validator that can be used to validate an input POJO object before it is saved or updated. The validation prevents invalid data from being persisted. 8. Each database table needs the following objects: - an entity object which extends *POJO*. - a primary key object which extends *TablePK* if there is a composite primary key. - a table object which extends *Table*. - a converter which extends *Converter* (optional). - a validator which extends *Validatable* (optional). The above code can be generated using Dreamsource ORM Code Generator which is an Eclipse plugin. 9. It provides most demanding features in a small library (522,217 bytes). 10. Easy to learn and use because it just mirrors SQL statements. 11. High performance compared to Hibernate. 12. High productivity compared to Hibernate. You can find Spring and GWT examples from http://www.leeonsoft.com/examples.jsp. Whoever makes a serious comparison of Dreamsource ORM with Hibernate or JPA will be rewarded one license. Any feedback is appreciated. Best regards, Jim Xie http://www.leeonsoft.com http://code.google.com/p/dreamsource-orm/
Re: HybridUrlCodingStrategy and parameters with "."
i am guessing "." is a special char in hybrid strategy so it should escape it. a patch would be welcome, and at least a jira issue. -igor On Wed, May 13, 2009 at 4:09 PM, Ryan McKinley wrote: > any thoughts? thanks > > > On May 7, 2009, at 4:04 PM, Ryan McKinley wrote: > >> I'm using the HybridUrlCodingStrategy and ran into a glitch when I have >> parameter values that include the character "." >> >> For example, if I make a link with: >> params.add( "p", "Hello 2.01.00" ) >> >> This creates a link to: >> http://host/context/path/p/Hello%202.01.00 >> >> and then that gets redirected to: >> http://host/context/path/p/Hello%202.${page version here} >> >> and the parameter value is lost. >> >> Things work fine if I escape "." with "%2E": >> http://host/context/path/p/Hello%202%2E01%2E00 >> >> I'm trying to follow the parameter setting code to where it actually does >> the escaping with little success. What would be the recommended way to get >> around this limitation? Is it something that should be fixed for >> HybridUrlCodingStrategy in general? >> >> thanks >> ryan > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: HybridUrlCodingStrategy and parameters with "."
any thoughts? thanks On May 7, 2009, at 4:04 PM, Ryan McKinley wrote: I'm using the HybridUrlCodingStrategy and ran into a glitch when I have parameter values that include the character "." For example, if I make a link with: params.add( "p", "Hello 2.01.00" ) This creates a link to: http://host/context/path/p/Hello%202.01.00 and then that gets redirected to: http://host/context/path/p/Hello%202.${page version here} and the parameter value is lost. Things work fine if I escape "." with "%2E": http://host/context/path/p/Hello%202%2E01%2E00 I'm trying to follow the parameter setting code to where it actually does the escaping with little success. What would be the recommended way to get around this limitation? Is it something that should be fixed for HybridUrlCodingStrategy in general? thanks ryan
Validator class cast exception wicket 1.3.5
Hello,I have a converter which I can verify is being called, but when the validator is being called it is not being called on the String value but the object which causes a ClassCastException. Here is my converter: @Override protected IConverterLocator newConverterLocator() { ConverterLocator locator = new ConverterLocator(); locator.set(types.thing.wc.microsoft.com.CodableValue.class, newIConverter() { public Object convertToObject(String arg0, Locale arg1) { types.thing.wc.microsoft.com.CodableValue cv = newtypes.thing.wc.microsoft.com.CodableValue(); cv.setText(arg0); return cv; } public String convertToString(Object arg0, Locale arg1) { return ((types.thing.wc.microsoft.com.CodableValue) arg0).getText(); } }); return locator; } Here is my form: TextField treatment = new TextField("treatment", new PropertyModel(allergy, "treatment")); treatment.setType(CodableValue.class); treatment.add(StringValidator.lengthBetween(2, 200)); add(treatment); Here is the error: org.apache.wicket.WicketRuntimeException: Exception 'java.lang.ClassCastException: types.thing.wc.microsoft.com.CodableValue' occurred during validation org.apache.wicket.validation.validator.StringValidator$LengthBetweenValidator on component 4:border:addAllergy:treatment at org.apache.wicket.markup.html.form.FormComponent.validateValidators(FormComponent.java:1510) at org.apache.wicket.markup.html.form.FormComponent.validate(FormComponent.java:1102) at org.apache.wicket.markup.html.form.Form$21.validate(Form.java:1876) at org.apache.wicket.markup.html.form.Form$ValidationVisitor.formComponent(Form.java:165) at org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:421) at org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:408) at org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrder(FormComponent.java:385)
Re: Override properties in Fragments?
not getString new Label("label", new ResourceModel("yourkey")); -- Jeremy Thomerson http://www.wickettraining.com On Wed, May 13, 2009 at 4:16 PM, Kaspar Fischer wrote: > > On 13.05.2009, at 18:40, Jeremy Thomerson wrote: > >> Good questoin - I'm not sure how that works with wicket:message. But >> I suppose you could easily add a label to the fragment and control the >> property key to your label easily > > Programmatically, you mean, right? Using Component#getString() for instance. > > I was curious whether there is a solution where that is not necessary...? > > > - > 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: Override properties in Fragments?
On 13.05.2009, at 18:40, Jeremy Thomerson wrote: Good questoin - I'm not sure how that works with wicket:message. But I suppose you could easily add a label to the fragment and control the property key to your label easily Programmatically, you mean, right? Using Component#getString() for instance. I was curious whether there is a solution where that is not necessary...? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Validator class cast exception wicket 1.3.5
I see, thanks. -jim igor.vaynberg wrote: > > no, validators work on a converted type - same type as the model object > > notice your converter is converting the value to a codablevalue type - > that is the object that the validators will work on - they validate > the same object that will be put into the model if validation passes. > > it looks like in your case your validation is a conversion-related > validation so that check should go into your converter - the > converttoobject() method - you can throw ConversionException and set > the appropriate error message on it. > > -igor > > On Wed, May 13, 2009 at 10:51 AM, jobiwankanobi > wrote: >> >> Hi Igor, >> I'm a little confused. I attached a StringValidator - shouldn't that >> work >> on a String? >> --jim >> >> >> igor.vaynberg wrote: >>> >>> validators work on objects not on raw string values. >>> >>> -igor >>> >>> On Wed, May 13, 2009 at 10:00 AM, james o'brien >>> wrote: Hello,I have a converter which I can verify is being called, but when the validator is being called it is not being called on the String value but the object which causes a ClassCastException. Here is my converter: @Override protected IConverterLocator newConverterLocator() { ConverterLocator locator = new ConverterLocator(); locator.set(types.thing.wc.microsoft.com.CodableValue.class, new IConverter() { public Object convertToObject(String arg0, Locale arg1) { types.thing.wc.microsoft.com.CodableValue cv = new types.thing.wc.microsoft.com.CodableValue(); cv.setText(arg0); return cv; } public String convertToString(Object arg0, Locale arg1) { return ((types.thing.wc.microsoft.com.CodableValue) arg0).getText(); } }); return locator; } Here is my form: TextField treatment = new TextField("treatment", new PropertyModel(allergy, "treatment")); treatment.setType(CodableValue.class); treatment.add(StringValidator.lengthBetween(2, 200)); add(treatment); Here is the error: org.apache.wicket.WicketRuntimeException: Exception 'java.lang.ClassCastException: types.thing.wc.microsoft.com.CodableValue' occurred during validation org.apache.wicket.validation.validator.StringValidator$LengthBetweenValidator on component 4:border:addAllergy:treatment at org.apache.wicket.markup.html.form.FormComponent.validateValidators(FormComponent.java:1510) at org.apache.wicket.markup.html.form.FormComponent.validate(FormComponent.java:1102) at org.apache.wicket.markup.html.form.Form$21.validate(Form.java:1876) at org.apache.wicket.markup.html.form.Form$ValidationVisitor.formComponent(Form.java:165) at org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:421) at org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:408) at org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrder(FormComponent.java:385) >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>> For additional commands, e-mail: users-h...@wicket.apache.org >>> >>> >>> >> >> -- >> View this message in context: >> http://www.nabble.com/Validator-class-cast-exception-wicket-1.3.5-tp23525957p23526648.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > > -- View this message in context: http://www.nabble.com/Validator-class-cast-exception-wicket-1.3.5-tp23525957p23528642.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: objectautocomplete on a form with CompoundPropertyModel
Yeah or just another way of thinking.. :) 2009/5/11 Brill Pappin : > Thanks that worked... although its a bit of a pain in the behind :) > > - Brill Pappin > > On 11-May-09, at 6:55 AM, nino martinez wael wrote: > >> You do something like this: >> >> // compound model >> private final IModel cityModel = new PropertyModel( >> searchWrapper, "cityId"); >> >> >> >> builderCity >> .updateOnSelectionChange(new >> ObjectAutoCompleteSelectionChangeListener() { >> public void >> selectionChanged(AjaxRequestTarget target, >> IModel >> model) { >> >> cityModel.setObject(model.getObject()); >> >> } >> }); >> So it does not update on submit, but instead onSelectionChange of the >> builder.. >> >> 2009/5/11 Brill Pappin : >>> >>> I'm trying to use ObjectAutoComplete from wicketstuff on a form where the >>> model is a CompoundPropertyModel. >>> >>> The auto compete field doesn't seem to be setting its value on the form >>> model at all during a submit. >>> >>> I've looked at the examples for this component and not a single one >>> actually >>> includes the onSubmit implementation. >>> Is there something special i have to do with this component? >>> >>> - Brill Pappin >> >> - >> 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: Serialization
http://lmgtfy.com/?q=java+serialization+default+constructor&l=1 -Clint On Wed, May 13, 2009 at 1:39 PM, Douglas Ferguson wrote: > Why do Wicket-serialized objects require a default constructor? > > Exception is: > > Caused by: > java.io.InvalidClassException:com.conducive.logic.scraper.impl.media.MediaScraperResult; > com.conducive.logic.scraper.impl.media.MediaScraperResult; no valid > constructor > java.io.ObjectStreamClass.checkDeserialize(ObjectStreamClass.java:713) > > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1733) > > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) > > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945) > > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1869) > > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753) > > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) > > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945) > > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1869) > > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753) > > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) > > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945) > > java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:480) > > org.apache.wicket.Component.readObject(Component.java:4228) > > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > > java.lang.reflect.Method.invoke(Method.java:597) > > java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974) > > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1846) > > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753) > > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) > > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945) > > java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:480) > > org.apache.wicket.Component.readObject(Component.java:4228) > > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > > java.lang.reflect.Method.invoke(Method.java:597) > > java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974) > > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1846) > > -- Clint Popetz http://42lines.net Scalable Web Application Development - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Serialization
Why do Wicket-serialized objects require a default constructor? Exception is: Caused by: java.io.InvalidClassException:com.conducive.logic.scraper.impl.media.MediaScraperResult; com.conducive.logic.scraper.impl.media.MediaScraperResult; no valid constructor java.io.ObjectStreamClass.checkDeserialize(ObjectStreamClass.java:713) java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1733) java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945) java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1869) java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753) java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945) java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1869) java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753) java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945) java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:480) org.apache.wicket.Component.readObject(Component.java:4228) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974) java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1846) java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753) java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945) java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:480) org.apache.wicket.Component.readObject(Component.java:4228) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974) java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1846)
Re: Validator class cast exception wicket 1.3.5
Hi Igor, I'm a little confused. I attached a StringValidator - shouldn't that work on a String? Also I assumed Validators work on the values of form fields after converted to String?Thanks, --jim On Wed, May 13, 2009 at 10:00 AM, james o'brien wrote: > Hello,I have a converter which I can verify is being called, but when the > validator is being called it is not being called on the String value but the > object which causes a ClassCastException. > > Here is my converter: > > @Override > > protected IConverterLocator newConverterLocator() { > > ConverterLocator locator = new ConverterLocator(); > > > locator.set(types.thing.wc.microsoft.com.CodableValue.class, new IConverter() > { > > > public Object convertToObject(String arg0, Locale arg1) { > > types.thing.wc.microsoft.com.CodableValue cv = new > types.thing.wc.microsoft.com.CodableValue(); > > cv.setText(arg0); > > return cv; > > } > > > public String convertToString(Object arg0, Locale arg1) { > > return ((types.thing.wc.microsoft.com.CodableValue) arg0).getText(); > > } > > }); > > > return locator; > > } > > > Here is my form: > > TextField treatment = new TextField("treatment", new > PropertyModel(allergy, "treatment")); > > treatment.setType(CodableValue.class); > > treatment.add(StringValidator.lengthBetween(2, 200)); > > add(treatment); > > > Here is the error: > > > org.apache.wicket.WicketRuntimeException: Exception > 'java.lang.ClassCastException: types.thing.wc.microsoft.com.CodableValue' > occurred during validation > org.apache.wicket.validation.validator.StringValidator$LengthBetweenValidator > on component 4:border:addAllergy:treatment > > at > org.apache.wicket.markup.html.form.FormComponent.validateValidators(FormComponent.java:1510) > > at > org.apache.wicket.markup.html.form.FormComponent.validate(FormComponent.java:1102) > > at org.apache.wicket.markup.html.form.Form$21.validate(Form.java:1876) > > at > org.apache.wicket.markup.html.form.Form$ValidationVisitor.formComponent(Form.java:165) > > at > org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:421) > > at > org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:408) > > at > org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrder(FormComponent.java:385) >
Re: System test for a Wicket based web application. Do you do it? How?
Hello Günther, stiq looks very promising. Can you please provide some small snippets howto use it in correlation with wicket? Cheers Per - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Validator class cast exception wicket 1.3.5
no, validators work on a converted type - same type as the model object notice your converter is converting the value to a codablevalue type - that is the object that the validators will work on - they validate the same object that will be put into the model if validation passes. it looks like in your case your validation is a conversion-related validation so that check should go into your converter - the converttoobject() method - you can throw ConversionException and set the appropriate error message on it. -igor On Wed, May 13, 2009 at 10:51 AM, jobiwankanobi wrote: > > Hi Igor, > I'm a little confused. I attached a StringValidator - shouldn't that work > on a String? > --jim > > > igor.vaynberg wrote: >> >> validators work on objects not on raw string values. >> >> -igor >> >> On Wed, May 13, 2009 at 10:00 AM, james o'brien >> wrote: >>> Hello,I have a converter which I can verify is being called, but when the >>> validator is being called it is not being called on the String value but >>> the >>> object which causes a ClassCastException. >>> >>> Here is my converter: >>> >>> @Override >>> >>> protected IConverterLocator newConverterLocator() { >>> >>> ConverterLocator locator = new ConverterLocator(); >>> >>> >>> locator.set(types.thing.wc.microsoft.com.CodableValue.class, new >>> IConverter() >>> { >>> >>> >>> public Object convertToObject(String arg0, Locale arg1) { >>> >>> types.thing.wc.microsoft.com.CodableValue cv = new >>> types.thing.wc.microsoft.com.CodableValue(); >>> >>> cv.setText(arg0); >>> >>> return cv; >>> >>> } >>> >>> >>> public String convertToString(Object arg0, Locale arg1) { >>> >>> return ((types.thing.wc.microsoft.com.CodableValue) arg0).getText(); >>> >>> } >>> >>> }); >>> >>> >>> return locator; >>> >>> } >>> >>> >>> Here is my form: >>> >>> TextField treatment = new TextField("treatment", new >>> PropertyModel(allergy, >>> "treatment")); >>> >>> treatment.setType(CodableValue.class); >>> >>> treatment.add(StringValidator.lengthBetween(2, 200)); >>> >>> add(treatment); >>> >>> >>> Here is the error: >>> >>> >>> org.apache.wicket.WicketRuntimeException: Exception >>> 'java.lang.ClassCastException: types.thing.wc.microsoft.com.CodableValue' >>> occurred during validation >>> org.apache.wicket.validation.validator.StringValidator$LengthBetweenValidator >>> on component 4:border:addAllergy:treatment >>> >>> at >>> org.apache.wicket.markup.html.form.FormComponent.validateValidators(FormComponent.java:1510) >>> >>> at >>> org.apache.wicket.markup.html.form.FormComponent.validate(FormComponent.java:1102) >>> >>> at org.apache.wicket.markup.html.form.Form$21.validate(Form.java:1876) >>> >>> at >>> org.apache.wicket.markup.html.form.Form$ValidationVisitor.formComponent(Form.java:165) >>> >>> at >>> org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:421) >>> >>> at >>> org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:408) >>> >>> at >>> org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrder(FormComponent.java:385) >>> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> >> > > -- > View this message in context: > http://www.nabble.com/Validator-class-cast-exception-wicket-1.3.5-tp23525957p23526648.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Validator class cast exception wicket 1.3.5
Hi Igor, I'm a little confused. I attached a StringValidator - shouldn't that work on a String? --jim igor.vaynberg wrote: > > validators work on objects not on raw string values. > > -igor > > On Wed, May 13, 2009 at 10:00 AM, james o'brien > wrote: >> Hello,I have a converter which I can verify is being called, but when the >> validator is being called it is not being called on the String value but >> the >> object which causes a ClassCastException. >> >> Here is my converter: >> >> @Override >> >> protected IConverterLocator newConverterLocator() { >> >> ConverterLocator locator = new ConverterLocator(); >> >> >> locator.set(types.thing.wc.microsoft.com.CodableValue.class, new >> IConverter() >> { >> >> >> public Object convertToObject(String arg0, Locale arg1) { >> >> types.thing.wc.microsoft.com.CodableValue cv = new >> types.thing.wc.microsoft.com.CodableValue(); >> >> cv.setText(arg0); >> >> return cv; >> >> } >> >> >> public String convertToString(Object arg0, Locale arg1) { >> >> return ((types.thing.wc.microsoft.com.CodableValue) arg0).getText(); >> >> } >> >> }); >> >> >> return locator; >> >> } >> >> >> Here is my form: >> >> TextField treatment = new TextField("treatment", new >> PropertyModel(allergy, >> "treatment")); >> >> treatment.setType(CodableValue.class); >> >> treatment.add(StringValidator.lengthBetween(2, 200)); >> >> add(treatment); >> >> >> Here is the error: >> >> >> org.apache.wicket.WicketRuntimeException: Exception >> 'java.lang.ClassCastException: types.thing.wc.microsoft.com.CodableValue' >> occurred during validation >> org.apache.wicket.validation.validator.StringValidator$LengthBetweenValidator >> on component 4:border:addAllergy:treatment >> >> at >> org.apache.wicket.markup.html.form.FormComponent.validateValidators(FormComponent.java:1510) >> >> at >> org.apache.wicket.markup.html.form.FormComponent.validate(FormComponent.java:1102) >> >> at org.apache.wicket.markup.html.form.Form$21.validate(Form.java:1876) >> >> at >> org.apache.wicket.markup.html.form.Form$ValidationVisitor.formComponent(Form.java:165) >> >> at >> org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:421) >> >> at >> org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:408) >> >> at >> org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrder(FormComponent.java:385) >> > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > > -- View this message in context: http://www.nabble.com/Validator-class-cast-exception-wicket-1.3.5-tp23525957p23526648.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Validator class cast exception wicket 1.3.5
validators work on objects not on raw string values. -igor On Wed, May 13, 2009 at 10:00 AM, james o'brien wrote: > Hello,I have a converter which I can verify is being called, but when the > validator is being called it is not being called on the String value but the > object which causes a ClassCastException. > > Here is my converter: > > @Override > > protected IConverterLocator newConverterLocator() { > > ConverterLocator locator = new ConverterLocator(); > > > locator.set(types.thing.wc.microsoft.com.CodableValue.class, new IConverter() > { > > > public Object convertToObject(String arg0, Locale arg1) { > > types.thing.wc.microsoft.com.CodableValue cv = new > types.thing.wc.microsoft.com.CodableValue(); > > cv.setText(arg0); > > return cv; > > } > > > public String convertToString(Object arg0, Locale arg1) { > > return ((types.thing.wc.microsoft.com.CodableValue) arg0).getText(); > > } > > }); > > > return locator; > > } > > > Here is my form: > > TextField treatment = new TextField("treatment", new PropertyModel(allergy, > "treatment")); > > treatment.setType(CodableValue.class); > > treatment.add(StringValidator.lengthBetween(2, 200)); > > add(treatment); > > > Here is the error: > > > org.apache.wicket.WicketRuntimeException: Exception > 'java.lang.ClassCastException: types.thing.wc.microsoft.com.CodableValue' > occurred during validation > org.apache.wicket.validation.validator.StringValidator$LengthBetweenValidator > on component 4:border:addAllergy:treatment > > at > org.apache.wicket.markup.html.form.FormComponent.validateValidators(FormComponent.java:1510) > > at > org.apache.wicket.markup.html.form.FormComponent.validate(FormComponent.java:1102) > > at org.apache.wicket.markup.html.form.Form$21.validate(Form.java:1876) > > at > org.apache.wicket.markup.html.form.Form$ValidationVisitor.formComponent(Form.java:165) > > at > org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:421) > > at > org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:408) > > at > org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrder(FormComponent.java:385) > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Nested form bug?
> I think Igor meant for you to post some code. There's nothing special.. form = new form form.add(nestedform = new form) nestedform.add(new textfield(propertymodel).setRequired(true)); It works most of the time, but sometimes I get the exception. ** Martin > > cheers, > Steve > > > > On 13 May 2009, at 17:27, Martin Makundi wrote: > >> Ok, I was hoping someone has experienced the same stacktrace. >> >> I will try to reproduce the bug still, maybe I find something. >> >> ** >> Martin >> >> 2009/5/13 Igor Vaynberg : >>> >>> hard to say without having something to play against. >>> >>> -igor >>> >>> On Wed, May 13, 2009 at 8:19 AM, Martin Makundi >>> wrote: Hi! I have a data object Dummy whose attribute "value" has a setMethod (setValue) that does not allow the given value to be an empty string or null. This model object is attached to a property model new PropertyModel(dummy, "value") and the propertymodel is passed to a TextField component whose "setRequired=true".. Normally, when I access the page, the form works perfectly. It requires the field and does not allow submitting the form without the required value. However, on the log I find following errors and I do not understand how they occur because the field is required. Is it possible that there is a bug in wicket (rc4) processing invisible forms or something? It is difficult to repeat the error because it occurs randomly in production: 2009-05-13 15:31:00,225 2816867 [btpool0-27] ERROR RequestCycle - Error calling method: public void com.myapp.dto.Dummy.setValue(java.lang.String) on object: com.myapp.dto.du...@3140994e org.apache.wicket.WicketRuntimeException: Error calling method: public void com.myapp.dto.Dummy.setValue(java.lang.String) on object: com.myapp.dto.du...@3140994e at org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.setValue(PropertyResolver.java:1119) at org.apache.wicket.util.lang.PropertyResolver$ObjectAndGetSetter.setValue(PropertyResolver.java:582) at org.apache.wicket.util.lang.PropertyResolver.setValue(PropertyResolver.java:136) at org.apache.wicket.model.AbstractPropertyModel.setObject(AbstractPropertyModel.java:169) at org.apache.wicket.Component.setDefaultModelObject(Component.java:3061) at org.apache.wicket.markup.html.form.FormComponent.updateModel(FormComponent.java:1141) at org.apache.wicket.markup.html.form.Form$FormModelUpdateVisitor.component(Form.java:224) at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:488) at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:467) at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:467) at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:467) at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:467) at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrder(FormComponent.java:439) at org.apache.wicket.markup.html.form.Form.internalUpdateFormComponentModels(Form.java:2022) at org.apache.wicket.markup.html.form.Form.access$300(Form.java:140) at org.apache.wicket.markup.html.form.Form$20.component(Form.java:2007) at org.apache.wicket.markup.html.form.Form$20.component(Form.java:2003) at org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:871) at org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:886) at org.apache.wicket.markup.html.form.Form.updateNestedFormComponentModels(Form.java:2001) at org.apache.wicket.markup.html.form.Form.updateFormComponentModels(Form.java:1991) at org.apache.wicket.markup.html.form.Form.process(Form.java:959) at org.apache.wicket.markup.html.form.Form.process(Form.java:907) at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:875) at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:182) at org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92) at wicket.quickstart.
Re: Nested form bug?
I think Igor meant for you to post some code. cheers, Steve On 13 May 2009, at 17:27, Martin Makundi wrote: Ok, I was hoping someone has experienced the same stacktrace. I will try to reproduce the bug still, maybe I find something. ** Martin 2009/5/13 Igor Vaynberg : hard to say without having something to play against. -igor On Wed, May 13, 2009 at 8:19 AM, Martin Makundi wrote: Hi! I have a data object Dummy whose attribute "value" has a setMethod (setValue) that does not allow the given value to be an empty string or null. This model object is attached to a property model new PropertyModel(dummy, "value") and the propertymodel is passed to a TextField component whose "setRequired=true".. Normally, when I access the page, the form works perfectly. It requires the field and does not allow submitting the form without the required value. However, on the log I find following errors and I do not understand how they occur because the field is required. Is it possible that there is a bug in wicket (rc4) processing invisible forms or something? It is difficult to repeat the error because it occurs randomly in production: 2009-05-13 15:31:00,225 2816867 [btpool0-27] ERROR RequestCycle - Error calling method: public void com.myapp.dto.Dummy.setValue(java.lang.String) on object: com.myapp.dto.du...@3140994e org.apache.wicket.WicketRuntimeException: Error calling method: public void com.myapp.dto.Dummy.setValue(java.lang.String) on object: com.myapp.dto.du...@3140994e at org.apache.wicket.util.lang.PropertyResolver $MethodGetAndSet.setValue(PropertyResolver.java:1119) at org.apache.wicket.util.lang.PropertyResolver $ObjectAndGetSetter.setValue(PropertyResolver.java:582) at org .apache .wicket.util.lang.PropertyResolver.setValue(PropertyResolver.java: 136) at org .apache .wicket .model.AbstractPropertyModel.setObject(AbstractPropertyModel.java: 169) at org.apache.wicket.Component.setDefaultModelObject(Component.java: 3061) at org .apache .wicket .markup.html.form.FormComponent.updateModel(FormComponent.java:1141) at org.apache.wicket.markup.html.form.Form $FormModelUpdateVisitor.component(Form.java:224) at org .apache .wicket .markup .html .form .FormComponent.visitComponentsPostOrderHelper(FormComponent.java: 488) at org .apache .wicket .markup .html .form .FormComponent.visitComponentsPostOrderHelper(FormComponent.java: 467) at org .apache .wicket .markup .html .form .FormComponent.visitComponentsPostOrderHelper(FormComponent.java: 467) at org .apache .wicket .markup .html .form .FormComponent.visitComponentsPostOrderHelper(FormComponent.java: 467) at org .apache .wicket .markup .html .form .FormComponent.visitComponentsPostOrderHelper(FormComponent.java: 467) at org .apache .wicket .markup .html .form.FormComponent.visitComponentsPostOrder(FormComponent.java:439) at org .apache .wicket .markup.html.form.Form.internalUpdateFormComponentModels(Form.java: 2022) at org.apache.wicket.markup.html.form.Form.access $300(Form.java:140) at org.apache.wicket.markup.html.form.Form $20.component(Form.java:2007) at org.apache.wicket.markup.html.form.Form $20.component(Form.java:2003) at org .apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java: 871) at org .apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java: 886) at org .apache .wicket .markup.html.form.Form.updateNestedFormComponentModels(Form.java: 2001) at org .apache .wicket.markup.html.form.Form.updateFormComponentModels(Form.java: 1991) at org.apache.wicket.markup.html.form.Form.process(Form.java: 959) at org.apache.wicket.markup.html.form.Form.process(Form.java: 907) at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java: 875) at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source) at sun .reflect .DelegatingMethodAccessorImpl .invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org .apache .wicket .RequestListenerInterface.invoke(RequestListenerInterface.java:182) at org .apache .wicket .request .target .component .listener .ListenerInterfaceRequestTarget .processEvents(ListenerInterfaceRequestTarget.java:73) at org .apache .wicket .request .AbstractRequestCycleProcessor .processEvents(AbstractRequestCycleProcessor.java:92) at wicket.quickstart.TakpApplication $2.processEvents(TakpApplication.java:842) at org .apache .wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1240) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1319) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1418) at org.apache.wicket.RequestCycle.request(RequestCycle.java: 544) at org .apache.wicket.protocol.http.WicketFilter.doGet(
Validator class cast exception wicket 1.3.5
Hello,I have a converter which I can verify is being called, but when the validator is being called it is not being called on the String value but the object which causes a ClassCastException. Here is my converter: @Override protected IConverterLocator newConverterLocator() { ConverterLocator locator = new ConverterLocator(); locator.set(types.thing.wc.microsoft.com.CodableValue.class, new IConverter() { public Object convertToObject(String arg0, Locale arg1) { types.thing.wc.microsoft.com.CodableValue cv = new types.thing.wc.microsoft.com.CodableValue(); cv.setText(arg0); return cv; } public String convertToString(Object arg0, Locale arg1) { return ((types.thing.wc.microsoft.com.CodableValue) arg0).getText(); } }); return locator; } Here is my form: TextField treatment = new TextField("treatment", new PropertyModel(allergy, "treatment")); treatment.setType(CodableValue.class); treatment.add(StringValidator.lengthBetween(2, 200)); add(treatment); Here is the error: org.apache.wicket.WicketRuntimeException: Exception 'java.lang.ClassCastException: types.thing.wc.microsoft.com.CodableValue' occurred during validation org.apache.wicket.validation.validator.StringValidator$LengthBetweenValidator on component 4:border:addAllergy:treatment at org.apache.wicket.markup.html.form.FormComponent.validateValidators(FormComponent.java:1510) at org.apache.wicket.markup.html.form.FormComponent.validate(FormComponent.java:1102) at org.apache.wicket.markup.html.form.Form$21.validate(Form.java:1876) at org.apache.wicket.markup.html.form.Form$ValidationVisitor.formComponent(Form.java:165) at org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:421) at org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper(FormComponent.java:408) at org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrder(FormComponent.java:385)
Re: Override properties in Fragments?
Good questoin - I'm not sure how that works with wicket:message. But I suppose you could easily add a label to the fragment and control the property key to your label easily -- Jeremy Thomerson http://www.wickettraining.com On Wed, May 13, 2009 at 11:37 AM, Kaspar Fischer wrote: > How can one override properties in Fragments? > > Given a component: > > > > which I instantiate twice, say, in > > > > > > > I can override c1's property foo via > > c1.foo=Bar > > but neither c2.foo=Bar nor fragment.c2.foo=Bar work. > > What is the property path to access c2's foo? > > Kaspar > > - > 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
Override properties in Fragments?
How can one override properties in Fragments? Given a component: which I instantiate twice, say, in I can override c1's property foo via c1.foo=Bar but neither c2.foo=Bar nor fragment.c2.foo=Bar work. What is the property path to access c2's foo? Kaspar - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
wicketstuff-dojo and wicket 1.3.4
Hi, I will be compiling wicketstuff-dojo with a dependency on wicket 1.3.4 for an internal project. Does anyone know if there are any integration issues between those two versions? Alternatively, is there a better component to use for a floating div than DojoFloatingPane? I did notice that DojoFloatingPane is not (yet?) in wicketstuff-dojo-1.1. Thank you.
Re: Nested form bug?
Ok, I was hoping someone has experienced the same stacktrace. I will try to reproduce the bug still, maybe I find something. ** Martin 2009/5/13 Igor Vaynberg : > hard to say without having something to play against. > > -igor > > On Wed, May 13, 2009 at 8:19 AM, Martin Makundi > wrote: >> Hi! >> >> I have a data object Dummy whose attribute "value" has a setMethod >> (setValue) that does not allow the given value to be an empty string >> or null. >> >> This model object is attached to a property model new >> PropertyModel(dummy, "value") and the propertymodel is passed to a >> TextField component whose "setRequired=true".. >> >> Normally, when I access the page, the form works perfectly. It >> requires the field and does not allow submitting the form without the >> required value. >> >> However, on the log I find following errors and I do not understand >> how they occur because the field is required. Is it possible that >> there is a bug in wicket (rc4) processing invisible forms or >> something? It is difficult to repeat the error because it occurs >> randomly in production: >> >> 2009-05-13 15:31:00,225 2816867 [btpool0-27] ERROR RequestCycle - >> Error calling method: public void >> com.myapp.dto.Dummy.setValue(java.lang.String) on object: >> com.myapp.dto.du...@3140994e >> org.apache.wicket.WicketRuntimeException: Error calling method: public >> void com.myapp.dto.Dummy.setValue(java.lang.String) on object: >> com.myapp.dto.du...@3140994e >> at >> org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.setValue(PropertyResolver.java:1119) >> at >> org.apache.wicket.util.lang.PropertyResolver$ObjectAndGetSetter.setValue(PropertyResolver.java:582) >> at >> org.apache.wicket.util.lang.PropertyResolver.setValue(PropertyResolver.java:136) >> at >> org.apache.wicket.model.AbstractPropertyModel.setObject(AbstractPropertyModel.java:169) >> at >> org.apache.wicket.Component.setDefaultModelObject(Component.java:3061) >> at >> org.apache.wicket.markup.html.form.FormComponent.updateModel(FormComponent.java:1141) >> at >> org.apache.wicket.markup.html.form.Form$FormModelUpdateVisitor.component(Form.java:224) >> at >> org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:488) >> at >> org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:467) >> at >> org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:467) >> at >> org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:467) >> at >> org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:467) >> at >> org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrder(FormComponent.java:439) >> at >> org.apache.wicket.markup.html.form.Form.internalUpdateFormComponentModels(Form.java:2022) >> at org.apache.wicket.markup.html.form.Form.access$300(Form.java:140) >> at org.apache.wicket.markup.html.form.Form$20.component(Form.java:2007) >> at org.apache.wicket.markup.html.form.Form$20.component(Form.java:2003) >> at >> org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:871) >> at >> org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:886) >> at >> org.apache.wicket.markup.html.form.Form.updateNestedFormComponentModels(Form.java:2001) >> at >> org.apache.wicket.markup.html.form.Form.updateFormComponentModels(Form.java:1991) >> at org.apache.wicket.markup.html.form.Form.process(Form.java:959) >> at org.apache.wicket.markup.html.form.Form.process(Form.java:907) >> at >> org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:875) >> at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> at java.lang.reflect.Method.invoke(Method.java:597) >> at >> org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:182) >> at >> org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73) >> at >> org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92) >> at >> wicket.quickstart.TakpApplication$2.processEvents(TakpApplication.java:842) >> at >> org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1240) >> at org.apache.wicket.RequestCycle.step(RequestCycle.java:1319) >> at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1418) >> at org.apache.wicket.RequestCycle.request(RequestCycle.java:544) >> at >> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456) >> at
Re: Nested form bug?
hard to say without having something to play against. -igor On Wed, May 13, 2009 at 8:19 AM, Martin Makundi wrote: > Hi! > > I have a data object Dummy whose attribute "value" has a setMethod > (setValue) that does not allow the given value to be an empty string > or null. > > This model object is attached to a property model new > PropertyModel(dummy, "value") and the propertymodel is passed to a > TextField component whose "setRequired=true".. > > Normally, when I access the page, the form works perfectly. It > requires the field and does not allow submitting the form without the > required value. > > However, on the log I find following errors and I do not understand > how they occur because the field is required. Is it possible that > there is a bug in wicket (rc4) processing invisible forms or > something? It is difficult to repeat the error because it occurs > randomly in production: > > 2009-05-13 15:31:00,225 2816867 [btpool0-27] ERROR RequestCycle - > Error calling method: public void > com.myapp.dto.Dummy.setValue(java.lang.String) on object: > com.myapp.dto.du...@3140994e > org.apache.wicket.WicketRuntimeException: Error calling method: public > void com.myapp.dto.Dummy.setValue(java.lang.String) on object: > com.myapp.dto.du...@3140994e > at > org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.setValue(PropertyResolver.java:1119) > at > org.apache.wicket.util.lang.PropertyResolver$ObjectAndGetSetter.setValue(PropertyResolver.java:582) > at > org.apache.wicket.util.lang.PropertyResolver.setValue(PropertyResolver.java:136) > at > org.apache.wicket.model.AbstractPropertyModel.setObject(AbstractPropertyModel.java:169) > at > org.apache.wicket.Component.setDefaultModelObject(Component.java:3061) > at > org.apache.wicket.markup.html.form.FormComponent.updateModel(FormComponent.java:1141) > at > org.apache.wicket.markup.html.form.Form$FormModelUpdateVisitor.component(Form.java:224) > at > org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:488) > at > org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:467) > at > org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:467) > at > org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:467) > at > org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:467) > at > org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrder(FormComponent.java:439) > at > org.apache.wicket.markup.html.form.Form.internalUpdateFormComponentModels(Form.java:2022) > at org.apache.wicket.markup.html.form.Form.access$300(Form.java:140) > at org.apache.wicket.markup.html.form.Form$20.component(Form.java:2007) > at org.apache.wicket.markup.html.form.Form$20.component(Form.java:2003) > at > org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:871) > at > org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:886) > at > org.apache.wicket.markup.html.form.Form.updateNestedFormComponentModels(Form.java:2001) > at > org.apache.wicket.markup.html.form.Form.updateFormComponentModels(Form.java:1991) > at org.apache.wicket.markup.html.form.Form.process(Form.java:959) > at org.apache.wicket.markup.html.form.Form.process(Form.java:907) > at > org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:875) > at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:182) > at > org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73) > at > org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92) > at > wicket.quickstart.TakpApplication$2.processEvents(TakpApplication.java:842) > at > org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1240) > at org.apache.wicket.RequestCycle.step(RequestCycle.java:1319) > at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1418) > at org.apache.wicket.RequestCycle.request(RequestCycle.java:544) > at > org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456) > at > org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:160) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) > at wicket.quickstart.TakpServlet.service(TakpServlet.java:48) > at javax.servlet.http.HttpServlet
Nested form bug?
Hi! I have a data object Dummy whose attribute "value" has a setMethod (setValue) that does not allow the given value to be an empty string or null. This model object is attached to a property model new PropertyModel(dummy, "value") and the propertymodel is passed to a TextField component whose "setRequired=true".. Normally, when I access the page, the form works perfectly. It requires the field and does not allow submitting the form without the required value. However, on the log I find following errors and I do not understand how they occur because the field is required. Is it possible that there is a bug in wicket (rc4) processing invisible forms or something? It is difficult to repeat the error because it occurs randomly in production: 2009-05-13 15:31:00,225 2816867 [btpool0-27] ERROR RequestCycle - Error calling method: public void com.myapp.dto.Dummy.setValue(java.lang.String) on object: com.myapp.dto.du...@3140994e org.apache.wicket.WicketRuntimeException: Error calling method: public void com.myapp.dto.Dummy.setValue(java.lang.String) on object: com.myapp.dto.du...@3140994e at org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.setValue(PropertyResolver.java:1119) at org.apache.wicket.util.lang.PropertyResolver$ObjectAndGetSetter.setValue(PropertyResolver.java:582) at org.apache.wicket.util.lang.PropertyResolver.setValue(PropertyResolver.java:136) at org.apache.wicket.model.AbstractPropertyModel.setObject(AbstractPropertyModel.java:169) at org.apache.wicket.Component.setDefaultModelObject(Component.java:3061) at org.apache.wicket.markup.html.form.FormComponent.updateModel(FormComponent.java:1141) at org.apache.wicket.markup.html.form.Form$FormModelUpdateVisitor.component(Form.java:224) at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:488) at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:467) at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:467) at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:467) at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:467) at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrder(FormComponent.java:439) at org.apache.wicket.markup.html.form.Form.internalUpdateFormComponentModels(Form.java:2022) at org.apache.wicket.markup.html.form.Form.access$300(Form.java:140) at org.apache.wicket.markup.html.form.Form$20.component(Form.java:2007) at org.apache.wicket.markup.html.form.Form$20.component(Form.java:2003) at org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:871) at org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:886) at org.apache.wicket.markup.html.form.Form.updateNestedFormComponentModels(Form.java:2001) at org.apache.wicket.markup.html.form.Form.updateFormComponentModels(Form.java:1991) at org.apache.wicket.markup.html.form.Form.process(Form.java:959) at org.apache.wicket.markup.html.form.Form.process(Form.java:907) at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:875) at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:182) at org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92) at wicket.quickstart.TakpApplication$2.processEvents(TakpApplication.java:842) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1240) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1319) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1418) at org.apache.wicket.RequestCycle.request(RequestCycle.java:544) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456) at org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:160) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at wicket.quickstart.TakpServlet.service(TakpServlet.java:48) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367) at org.mortbay.jetty.security.SecurityHandler.handle(Securi
Cancelling pending Ajax requests
Problem: I want to validate input as user types it, but validation takes a long time on the server. When validation result for the first input is returned, user might have caused several more input events to be validated. These validation requests are pending execution on Wicket Ajax Channel. At this point I'm only interested in validating the latest input, but before this happens, all pending validation requests are processed. This is unnecessary and takes a lot of time so I want to cancel all the pending requests. Solution: I did this by using named Channel and clearing all pending requests before requesting the latest validation. I couldn't find a solution for this problem, so I'm posting it here. Hopefully this might help someone else and please give me some feedback if this solution was not a good one. Thanks, Antti Mattila Here's the code: public class ClearPendingAjaxRequests extends AjaxCallDecorator { private final String clearPendingRequestsScript; public ClearPendingAjaxRequests(final String channel) { clearPendingRequestsScript = "if (typeof Wicket.channelManager.channels['" + channel + "'] != 'undefined') Wicket.channelManager.channels['" + channel + "'].callbacks = new Array();"; } @Override public CharSequence decorateScript(final CharSequence script) { return clearPendingRequestsScript + script; } } public class UsersInputFieldOnChangeAjaxBehavior extends AjaxFormComponentUpdatingBehavior { public UsersInputFieldOnChangeAjaxBehavior() { super("onkeyup"); setThrottleDelay(Duration.milliseconds(500)); } @Override protected IAjaxCallDecorator getAjaxCallDecorator() { return new ClearPendingAjaxRequests(getChannelName()); } @Override protected String getChannelName() { return "ChannelForValidatingThisSpecificInput"; } @Override protected void onUpdate(final AjaxRequestTarget target) { // Validate user's input, this takes a long time. // Update UI. } } - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AjaxFallbackLink problem on Internet Explorer 6
I found the solutionit is not a wicket problem. The problem was in my CSS files. marius1maru wrote: > > Hello, > I'm using a ListView of links limited to only 5 links, an > AjaxFallbackLink (showMore) that will remove the limitation, and another > AjaxFallbackLink > (showLess) that will enable the limitation. > Works fine on every browser except IE6. On IE6, after the user presses > showMore link, the list will expand, but the links are frosen(I can see > them, but > can not click on them). > The code looks like this: > > in html: > > > # > > > > # > # > > > > in java: > > final AjaxFallbackLink showLessLink = new AjaxLink("showLessLink") > { > �...@override > public void onClick(AjaxRequestTarget target) > { > linksList.setViewSize(5); > showMoreSpan.setVisible(true); > showLessSpan.setVisible(false); > target.addComponent(listContainer); > } > }; > showLessLink.add(new Label("showLess", "< final AjaxFallbackLink showMoreLink = new AjaxLink("showMoreLink") > { > �...@override > public void onClick(AjaxRequestTarget target) > { > linksList.setViewSize(linksList.getList().size()); > showMoreSpan.setVisible(false); > showLessSpan.setVisible(true); > target.addComponent(listContainer); > } > }; > showMoreLink.add(new Label("showMore", "more>>")); > final WebMarkupContainer showLessSpan = new > WebMarkupContainer("showLessSpan"); > showLessSpan.setOutputMarkupId(true); > showLessSpan.setVisible(false); > final WebMarkupContainer showMoreSpan = new > WebMarkupContainer("showMoreSpan"); > showLessSpan.setOutputMarkupId(true); > showLessSpan.setVisible(true); > showLessSpan.add(showLessLink); > showMoreSpan.add(showMoreLink); > listContainer.add(showLessSpan); > listContainer.add(showMoreSpan); > > After the first ajax request(by clicking on "showMore" link), the > "showLess" link is displayed, but frozen. The same results is when I'm > using AjaxLink. > I am using wicket 1.4 rc2. > Can please someone help me? > > > > -- View this message in context: http://www.nabble.com/AjaxFallbackLink-problem-on-Internet-Explorer-6-tp23501338p23523016.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Refresh a BaseTree?
I create a BaseTree like this: final DefaultTreeModel model = new DefaultTreeModel(...); IModel< new AbstractReadOnlyModel() { @Override public TreeModel getObject() { return model; } }; add(new BaseTree("tree", model) { /* ... */ }); When the user clicks a certain link (outside the tree), I change some data that affects the tree and want the tree to get recreated. How can I achieve this? I tried BaseTree#updateTree() with no success. Also, BaseTree#setDefaultModel(new DefaultTreeModel(...)) doesn't work; the tree becomes empty. Any ideas? Thanks, Kaspar - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Apache Tomcat & CSS
You can set up IntelliJ to not exclude them. Just go to the compiler properties for your project and set the exclude to something like !?*.java. 2009/5/13 Erik van Oosten : > I always get this for a new app when I run/build it from Eclipse or > IntelliJ. Both default to exclude resources from the java packages. Build > with Maven (change the pom or use quickstart to start with a correct pom) > and the file should be there. > > Regards, > Erik. > > > Tomáš Mihok wrote: >> >> Hi there, >> >> has anyone ever encountered problem with these two? I have a simple >> application and I wanted to add a css file with but after >> deploying nothing happens. >> >> So I copied the CSS in index.html between
Re: Apache Tomcat & CSS
I always get this for a new app when I run/build it from Eclipse or IntelliJ. Both default to exclude resources from the java packages. Build with Maven (change the pom or use quickstart to start with a correct pom) and the file should be there. Regards, Erik. Tomáš Mihok wrote: Hi there, has anyone ever encountered problem with these two? I have a simple application and I wanted to add a css file with but after deploying nothing happens. So I copied the CSS in index.html between
Re: CheckboxMultipleChoice in Ajax style
When I try this code it works. Can you please post some code for us -- View this message in context: http://www.nabble.com/CheckboxMultipleChoice-in-Ajax-style-tp23458553p23520363.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Datatable columns converter
Hi Michael, thank you for your suggestion. what do you think about overriding the AbstractColumn#populateItem() to add a Label to the cellItem and setting up a proper IConverter to that component? bye alf Michael O'Cleirigh wrote: > > > This question came up last week aswell, here is an example of how you to > subclass PropertyColumn to convert an integer into an arbitrary string: > > > http://www.nabble.com/Re%3A-How-to-manipulate-values-in-a-data-table--p23413680.html > > Essentially you wrap the PropertyModel with a custom IModel > implementation that does the conversion you want (on each cell). Then > you build the DataTable using your custom column implementation. > > -- View this message in context: http://www.nabble.com/Datatable-columns-converter-tp23502460p23519993.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: System test for a Wicket based web application. Do you do it? How?
I've been using http://storytestiq.solutionsiq.com/ STiQ for integration testing on my current project. It's a mashup of Selenium & Fitnesse. It makes for a really comfortable test construction & running environment. I've used JUnit driven Selenium tests in the past, but the tests were impossible to read, and they weren't particularly refactorable (losing any benefit of having them driven from code). Having the front end tests written in a user-legible DSL forces you to think about the tests from the point of view of the end user. Commenting is a easy and natural thing to do in this environment. It actually looks a lot like Literate Programming. Many of the functional tests I'd written for this project exercised execution paths around session timeouts, something that'd be difficult (or impossible) to test from a unit-test perspective, but which were easy to write in STiQ. The fact that the tests are running in the SOE is a comfort too. It's apparently possible to drive it from JUnit/Maven/Ant/whatever, but I haven't got around to doing that. An similar FOSS alternative to STiQ is http://www.fitnesse.info/webtest WebTest , and an alternative to Selenium is http://watij.com/ Watij -- View this message in context: http://www.nabble.com/System-test-for-a-Wicket-based-web-application.-Do-you-do-it--How--tp23513449p23519414.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Tomcat Publishing and Hot-Swapping with Wicket (solved)
;-) If in a soft wall room they hear you taking about "tomcat" (what kind of a cat?), "hot-swapping", well, aeh, ... they might keep you a little longer... On 05.05.2009, at 13:23, nino martinez wael wrote: I like these kind of monologs, I often do them myself also known as parrot talks :) We both need to remember not to do them too often, if too often then we end up in a room with soft walls :) regards Nino 2009/5/4 Kaspar Fischer : I intended to post the following questions but found the answer myself, finally. I post it anyway in the hope that it helps others. Kaspar Fischer almost posted the following: My app takes quite some time to start up, so I don't want changes to my Wicket HTML or Wicket Java files to cause Tomcat to completely "reload" the web app. Is it (at all) possible that only the changed Wicket HTML/Java/.properties file get reloaded and the rest (Spring beans, etc.) stays? Yes. It is working for HTML, Java, and .properties files under Eclipse with WTP and Tomcat. I am a little confused about the terms used in this context. Here's how I see; please correct me if I am wrong. - Hotswapping means replacing a given class implementation with another one. - Publishing (as seen in the server configuration panel in Eclipse when clicking on a Tomcat server in the "Servers" view) means shutting a webapp down and restarting it, hithout actually shutting Tomcat down. I can't answer myself on this. But I guess it's more or less fine ;-) There is also an option "Update context paths" in the Tomcat Server configuration panel (under "Publishing"). Is it related? It is checked in my set up but I don't know whether it is related. Finally, *how* can I get Tomcat/Eclipse/Wicket to only reload Wicket HTML/Java/.properties files that changed? In particular, I am unsure whether I have to: - "Debug" instead of "Run" the server (i.e., click "Debug" in the Eclipse "Servers" view)? With "Debug" it works. - Should the server have "Automatically publish when resources change" selected (in the server's configuration panel in Eclipse)? I have this checkbox checked. - What Tomcat configuration must I use? I currently have something like: reloadable="true" source="org.eclipse.jst.j2ee.server:myproject"/> This works for me. - In the server's configuration panel, in tab "Modules", should I check "Auto reloading enabled"? No. Otherwise Tomcat reloads the *whole* webapp. I know that Wicket must be running in development mode. I think so, too ;-) Many thanks for any pointers and sharing your settings! Kaspar, you're welcome. Kaspar - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org