[jira] Updated: (WICKET-1425) appendToInit() method is not called in class DatePicker
[ https://issues.apache.org/jira/browse/WICKET-1425?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Johan Compagner updated WICKET-1425: Fix Version/s: 1.3.5 Assignee: Eelco Hillenius Remaining Estimate: (was: 0.25h) Original Estimate: (was: 0.25h) eelco can you check out that method that doesnt seem to do anything that it supposed to be doing? > appendToInit() method is not called in class DatePicker > --- > > Key: WICKET-1425 > URL: https://issues.apache.org/jira/browse/WICKET-1425 > Project: Wicket > Issue Type: Bug > Components: wicket-datetime >Affects Versions: 1.3.1, 1.3.2 >Reporter: Stephan Koch >Assignee: Eelco Hillenius >Priority: Minor > Fix For: 1.3.5 > > > appendToInit method can be overridden in subclasses to facilitate extension > of the DatePicker component. > The method is currently not called in class DatePicker, so overriding the > method in subclasses would have no effect. > It should be called somewhere in renderHead() I suppose. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Closed: (WICKET-1844) Wizard button implementations should not be final
[ https://issues.apache.org/jira/browse/WICKET-1844?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Johan Compagner closed WICKET-1844. --- Resolution: Fixed Fix Version/s: 1.4-M4 1.3.5 Assignee: Johan Compagner i removed the finals from the class but there are still finals for some methods, but most of them are controlled by the WizardModel (like enabled) > Wizard button implementations should not be final > - > > Key: WICKET-1844 > URL: https://issues.apache.org/jira/browse/WICKET-1844 > Project: Wicket > Issue Type: Improvement > Components: wicket-extensions >Affects Versions: 1.3.4 >Reporter: Matthias Keller >Assignee: Johan Compagner >Priority: Minor > Fix For: 1.3.5, 1.4-M4 > > > I dont know why the wizard buttons are final but this makes it hard to add > custom behaviour to them. For example, we need to hide a button if it's not > enabled. We had to re-create all buttons by ourselves to do that instead of > just overriding the isVisible() method of a button. > Affects: > org/apache/wicket/extensions/wizard/CancelButton > org/apache/wicket/extensions/wizard/FinishButton > org/apache/wicket/extensions/wizard/LastButton > org/apache/wicket/extensions/wizard/NextButton > org/apache/wicket/extensions/wizard/PreviousButton > Suggestion: remove 'final' from class declaration -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
svn commit: r701880 - in /wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard: CancelButton.java FinishButton.java LastButton.java NextButton.java PreviousButton.java
Author: jcompagner Date: Sun Oct 5 13:06:55 2008 New Revision: 701880 URL: http://svn.apache.org/viewvc?rev=701880&view=rev Log: remove the finals from the wizard buttons WICKET-1844 Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/CancelButton.java wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/FinishButton.java wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/LastButton.java wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/NextButton.java wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/PreviousButton.java Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/CancelButton.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/CancelButton.java?rev=701880&r1=701879&r2=701880&view=diff == --- wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/CancelButton.java (original) +++ wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/CancelButton.java Sun Oct 5 13:06:55 2008 @@ -22,7 +22,7 @@ * * @author Eelco Hillenius */ -public final class CancelButton extends WizardButton +public class CancelButton extends WizardButton { private static final long serialVersionUID = 1L; @@ -43,6 +43,7 @@ /** * @see org.apache.wicket.Component#isEnabled() */ + @Override public final boolean isEnabled() { return true; @@ -51,6 +52,7 @@ /** * @see org.apache.wicket.Component#isVisible() */ + @Override public final boolean isVisible() { return getWizardModel().isCancelVisible(); @@ -59,6 +61,7 @@ /** * @see org.apache.wicket.extensions.wizard.WizardButton#onClick() */ + @Override public final void onClick() { getWizardModel().cancel(); Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/FinishButton.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/FinishButton.java?rev=701880&r1=701879&r2=701880&view=diff == --- wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/FinishButton.java (original) +++ wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/FinishButton.java Sun Oct 5 13:06:55 2008 @@ -22,7 +22,7 @@ * * @author Eelco Hillenius */ -public final class FinishButton extends WizardButton +public class FinishButton extends WizardButton { private static final long serialVersionUID = 1L; @@ -42,6 +42,7 @@ /** * @see org.apache.wicket.Component#isEnabled() */ + @Override public final boolean isEnabled() { IWizardStep activeStep = getWizardModel().getActiveStep(); @@ -51,6 +52,7 @@ /** * @see org.apache.wicket.extensions.wizard.WizardButton#onClick() */ + @Override public final void onClick() { IWizardModel wizardModel = getWizardModel(); @@ -67,7 +69,7 @@ else { error(getLocalizer().getString( - "org.apache.wicket.extensions.wizard.FinishButton.step.did.not.complete", this)); + "org.apache.wicket.extensions.wizard.FinishButton.step.did.not.complete", this)); } } } Modified: wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/LastButton.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/LastButton.java?rev=701880&r1=701879&r2=701880&view=diff == --- wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/LastButton.java (original) +++ wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/LastButton.java Sun Oct 5 13:06:55 2008 @@ -23,7 +23,7 @@ * * @author Eelco Hillenius */ -public final class LastButton extends WizardButton +public class LastButton extends WizardButton { private static final long serialVersionUID = 1L; @@ -43,6 +43,7 @@ /** * @see org.apache.wicket.Component#isEnabled() */ + @Override public final boolean isEnabled() { return getWizardModel().isLastAvailable(); @@ -51,6 +52,7 @@ /** * @see org.apache.wicket.
svn commit: r701879 - in /wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard: CancelButton.java FinishButton.java LastButton.java NextButton.java
Author: jcompagner Date: Sun Oct 5 13:06:55 2008 New Revision: 701879 URL: http://svn.apache.org/viewvc?rev=701879&view=rev Log: remove the finals from the wizard buttons WICKET-1844 Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/CancelButton.java wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/FinishButton.java wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/LastButton.java wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/NextButton.java wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/PreviousButton.java Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/CancelButton.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/CancelButton.java?rev=701879&r1=701878&r2=701879&view=diff == --- wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/CancelButton.java (original) +++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/CancelButton.java Sun Oct 5 13:06:55 2008 @@ -22,7 +22,7 @@ * * @author Eelco Hillenius */ -public final class CancelButton extends WizardButton +public class CancelButton extends WizardButton { private static final long serialVersionUID = 1L; Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/FinishButton.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/FinishButton.java?rev=701879&r1=701878&r2=701879&view=diff == --- wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/FinishButton.java (original) +++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/FinishButton.java Sun Oct 5 13:06:55 2008 @@ -22,7 +22,7 @@ * * @author Eelco Hillenius */ -public final class FinishButton extends WizardButton +public class FinishButton extends WizardButton { private static final long serialVersionUID = 1L; @@ -67,7 +67,7 @@ else { error(getLocalizer().getString( - "org.apache.wicket.extensions.wizard.FinishButton.step.did.not.complete", this)); + "org.apache.wicket.extensions.wizard.FinishButton.step.did.not.complete", this)); } } } Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/LastButton.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/LastButton.java?rev=701879&r1=701878&r2=701879&view=diff == --- wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/LastButton.java (original) +++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/LastButton.java Sun Oct 5 13:06:55 2008 @@ -23,7 +23,7 @@ * * @author Eelco Hillenius */ -public final class LastButton extends WizardButton +public class LastButton extends WizardButton { private static final long serialVersionUID = 1L; Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/NextButton.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/NextButton.java?rev=701879&r1=701878&r2=701879&view=diff == --- wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/NextButton.java (original) +++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket-extensions/src/main/java/org/apache/wicket/extensions/wizard/NextButton.java Sun Oct 5 13:06:55 2008 @@ -24,7 +24,7 @@ * * @author Eelco Hillenius */ -public final class NextButton extends WizardButton +public class NextButton extends WizardButton { private static final long serialVersionUID = 1L; @@ -67,7 +67,7 @@ else { error(getLocaliz
[jira] Updated: (WICKET-1785) Ability to add attributes to drop-down-list (select) options
[ https://issues.apache.org/jira/browse/WICKET-1785?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Johan Compagner updated WICKET-1785: Fix Version/s: 1.5-M1 moving to 1.5 but i think its just better to use the Select because that is what it is meant for you do cant use the DDC because you need something advanced > Ability to add attributes to drop-down-list (select) options > > > Key: WICKET-1785 > URL: https://issues.apache.org/jira/browse/WICKET-1785 > Project: Wicket > Issue Type: Improvement > Components: wicket >Affects Versions: 1.4-M3 >Reporter: Martin Makundi >Priority: Minor > Fix For: 1.5-M1 > > Original Estimate: 0.08h > Remaining Estimate: 0.08h > > Time-after-time, there is need to style your select options in a > DropDownChoice component. For example, the different options need to have > different background colour, or something. > This can be accomplished using Select/SelectOption, but here you are required > to re-implement all the intelligence already built into the > dropdownchoice/listchoice component (automatic notnull and localization, for > example). > How could we leverage the existing functionality of the DropDownChoice but > enhance it with the ability to parametrize option attributes individually? > Our suggestion is that we refactor suitable hooks into the rendering phase of > the xxChoice components, i.e., a method along the lines of "String > getOptionAttributes(T t)" to be called, during the render phase of a > DropDownChoice (in order to add attributes for the option tag). > With this kind of impementation it would then be easier for anybody to > 'sugarcoat' their DropDownChoice without breaking the existing > inplementations. For example, one way to use it would be to just add a > getDispayStyle method into your implementation of the IChoiceRenderer, and > implement a respective check in your overriding "getOptionAttributes" -method: > MyDropDownChoice extends DropDownChoice() { > @Override > protected String getOptionAttributes(T t) { > if (renderer instanceof MyChoiceRenderer) { > ... and sugarcoat my option ... > } > } > } > More discussion can be found at: > http://www.nabble.com/color-code-options-in-drop-down-choice-tp16964792p18909328.html -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-1469) New Wicket tag 'wicket:for'
[ https://issues.apache.org/jira/browse/WICKET-1469?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Johan Compagner updated WICKET-1469: Fix Version/s: 1.5-M1 > New Wicket tag 'wicket:for' > --- > > Key: WICKET-1469 > URL: https://issues.apache.org/jira/browse/WICKET-1469 > Project: Wicket > Issue Type: New Feature > Components: wicket >Affects Versions: 1.3.2 >Reporter: Jan Kriesten >Priority: Minor > Fix For: 1.5-M1 > > > This often happens during my daily work: > You create a form with labels and corresponding input fields. As it is now, > you have to bind all those Labels and FormComponents together with some > "boilerplate" code within Java. > I'd like to suggest the following enhancement Wicket tag: > default message > where wicket:for contains the referenced wicket:id -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Closed: (WICKET-1802) Propertyresolver could be more informative
[ https://issues.apache.org/jira/browse/WICKET-1802?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Johan Compagner closed WICKET-1802. --- Resolution: Fixed Fix Version/s: 1.4-M4 1.3.5 Assignee: Johan Compagner applied to 1.3 and 1.4 > Propertyresolver could be more informative > -- > > Key: WICKET-1802 > URL: https://issues.apache.org/jira/browse/WICKET-1802 > Project: Wicket > Issue Type: Improvement > Components: wicket >Affects Versions: 1.4-M3 >Reporter: Martin Makundi >Assignee: Johan Compagner > Fix For: 1.3.5, 1.4-M4 > > Original Estimate: 1h > Remaining Estimate: 1h > > WicketMessage: no set method defined for value: true on object: ... > at > org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.setValue(PropertyResolver.java:1107) > In case there is a getter method defined, it would significantly help > debugging to display the get method name in the exception. > I suggest fixing the problem with: > - " on object: " + object); > + " on object: " + object + " while > respective getMethod being " + getMethod.getName()); -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
svn commit: r701877 - /wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/lang/PropertyResolver.java
Author: jcompagner Date: Sun Oct 5 12:55:06 2008 New Revision: 701877 URL: http://svn.apache.org/viewvc?rev=701877&view=rev Log: more informative error message WICKET-1802 Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/lang/PropertyResolver.java Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/lang/PropertyResolver.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/lang/PropertyResolver.java?rev=701877&r1=701876&r2=701877&view=diff == --- wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/lang/PropertyResolver.java (original) +++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/lang/PropertyResolver.java Sun Oct 5 12:55:06 2008 @@ -36,23 +36,27 @@ * NOTE: THIS CLASS IS NOT PART OF THE WICKET PUBLIC API, DO NOT USE IT UNLESS YOU KNOW WHAT YOU ARE * DOING. * - * This class parses expressions to lookup or set a value on the object that is given. The - * supported expressions are: + * This class parses expressions to lookup or set a value on the object that is given. + * The supported expressions are: * * "property": This can can then be a bean property with get and set method. Or if a map is given as * an object it will be lookup with the property as a key when there is not get method for that - * property. + * property. + * * * "property1.property2": Both properties are lookup as written above. If property1 evaluates to * null then if there is a setMethod (or if it is a map) and the Class of the property has a default - * constructor then the object will be constructed and set on the object. + * constructor then the object will be constructed and set on the object. + * * * "property.index": If the property is a List or Array then the second property can be a index on * that list like: 'mylist.0' this expression will also map on a getProperty(index) or * setProperty(index,value) methods. If the object is a List then the list will grow automatically - * if the index is greater then the size + * if the index is greater then the size + * * - * Index or map properties can also be written as: "property[index]" or "property[key]" + * Index or map properties can also be written as: "property[index]" or "property[key]" + * * * @author jcompagner */ @@ -722,7 +726,7 @@ } /** -* @see org.apache.wicket.util.lang.PropertyResolver.IGetAndSet#setValue( Object, Object, +* @see org.apache.wicket.util.lang.PropertyResolver.IGetAndSet#setValue(Object, Object, * PropertyResolverConverter) */ public void setValue(Object object, Object value, PropertyResolverConverter converter) @@ -759,7 +763,7 @@ } /** -* @see org.apache.wicket.util.lang.PropertyResolver.IGetAndSet#setValue( Object, Object, +* @see org.apache.wicket.util.lang.PropertyResolver.IGetAndSet#setValue(Object, Object, * PropertyResolverConverter) */ public void setValue(Object object, Object value, PropertyResolverConverter converter) @@ -815,7 +819,7 @@ } /** -* @see org.apache.wicket.util.lang.PropertyResolver.IGetAndSet#setValue( Object, Object, +* @see org.apache.wicket.util.lang.PropertyResolver.IGetAndSet#setValue(Object, Object, * PropertyResolverConverter) */ public void setValue(Object object, Object value, PropertyResolverConverter converter) @@ -867,7 +871,7 @@ } /** -* @see org.apache.wicket.util.lang.PropertyResolver.IGetAndSet#setValue( Object, Object, +* @see org.apache.wicket.util.lang.PropertyResolver.IGetAndSet#setValue(Object, Object, * PropertyResolverConverter) */ public void setValue(Object object, Object value, PropertyResolverConverter converter) @@ -943,7 +947,7 @@ } /** -* @see org.apache.wicket.util.lang.PropertyResolver.IGetAndSet#setValue( Object, Object, +* @see org.apache.wicket.util.lang.PropertyResolver.IGetAndSet#setValue(Object, Object, * PropertyResolverConverter) */ public void setValue(Object object, Object value, PropertyResolverConverter converter) @@ -1102,7 +1106,8 @@ else { throw new WicketRuntimeException("no set method defined for value: " + value + -
svn commit: r701876 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/util/lang/PropertyResolver.java
Author: jcompagner Date: Sun Oct 5 12:54:57 2008 New Revision: 701876 URL: http://svn.apache.org/viewvc?rev=701876&view=rev Log: more informative error message WICKET-1802 Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/util/lang/PropertyResolver.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/util/lang/PropertyResolver.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/util/lang/PropertyResolver.java?rev=701876&r1=701875&r2=701876&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/util/lang/PropertyResolver.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/util/lang/PropertyResolver.java Sun Oct 5 12:54:57 2008 @@ -36,23 +36,27 @@ * NOTE: THIS CLASS IS NOT PART OF THE WICKET PUBLIC API, DO NOT USE IT UNLESS YOU KNOW WHAT YOU ARE * DOING. * - * This class parses expressions to lookup or set a value on the object that is given. The - * supported expressions are: + * This class parses expressions to lookup or set a value on the object that is given. + * The supported expressions are: * * "property": This can can then be a bean property with get and set method. Or if a map is given as * an object it will be lookup with the property as a key when there is not get method for that - * property. + * property. + * * * "property1.property2": Both properties are lookup as written above. If property1 evaluates to * null then if there is a setMethod (or if it is a map) and the Class of the property has a default - * constructor then the object will be constructed and set on the object. + * constructor then the object will be constructed and set on the object. + * * * "property.index": If the property is a List or Array then the second property can be a index on * that list like: 'mylist.0' this expression will also map on a getProperty(index) or * setProperty(index,value) methods. If the object is a List then the list will grow automatically - * if the index is greater then the size + * if the index is greater then the size + * * - * Index or map properties can also be written as: "property[index]" or "property[key]" + * Index or map properties can also be written as: "property[index]" or "property[key]" + * * * @author jcompagner */ @@ -721,7 +725,7 @@ } /** -* @see org.apache.wicket.util.lang.PropertyResolver.IGetAndSet#setValue( Object, Object, +* @see org.apache.wicket.util.lang.PropertyResolver.IGetAndSet#setValue(Object, Object, * PropertyResolverConverter) */ @SuppressWarnings("unchecked") @@ -759,7 +763,7 @@ } /** -* @see org.apache.wicket.util.lang.PropertyResolver.IGetAndSet#setValue( Object, Object, +* @see org.apache.wicket.util.lang.PropertyResolver.IGetAndSet#setValue(Object, Object, * PropertyResolverConverter) */ @SuppressWarnings("unchecked") @@ -816,7 +820,7 @@ } /** -* @see org.apache.wicket.util.lang.PropertyResolver.IGetAndSet#setValue( Object, Object, +* @see org.apache.wicket.util.lang.PropertyResolver.IGetAndSet#setValue(Object, Object, * PropertyResolverConverter) */ public void setValue(Object object, Object value, PropertyResolverConverter converter) @@ -869,7 +873,7 @@ } /** -* @see org.apache.wicket.util.lang.PropertyResolver.IGetAndSet#setValue( Object, Object, +* @see org.apache.wicket.util.lang.PropertyResolver.IGetAndSet#setValue(Object, Object, * PropertyResolverConverter) */ public void setValue(Object object, Object value, PropertyResolverConverter converter) @@ -946,7 +950,7 @@ } /** -* @see org.apache.wicket.util.lang.PropertyResolver.IGetAndSet#setValue( Object, Object, +* @see org.apache.wicket.util.lang.PropertyResolver.IGetAndSet#setValue(Object, Object, * PropertyResolverConverter) */ public void setValue(Object object, Object value, PropertyResolverConverter converter) @@ -1106,7 +1110,8 @@ else { throw new WicketRuntimeException("no set method defined for value: " + value + - " on object: " + object); + " on object: " + object + " while respective getMethod being " + + getMethod.getName());
[jira] Updated: (WICKET-1767) Protection against Session Fixation
[ https://issues.apache.org/jira/browse/WICKET-1767?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Johan Compagner updated WICKET-1767: Fix Version/s: 1.4-M4 will try to apply it in 1.4 > Protection against Session Fixation > --- > > Key: WICKET-1767 > URL: https://issues.apache.org/jira/browse/WICKET-1767 > Project: Wicket > Issue Type: Improvement > Components: wicket >Affects Versions: 1.3.4 >Reporter: Jörn Zaefferer >Assignee: Johan Compagner > Fix For: 1.4-M4 > > > Securing a Wicket application against Session Fixation attacks > (http://www.owasp.org/index.php/Session_Fixation) is currently not trivial. > This is especially problematic as most Java webservers fall back to URL > rewriting when the user disabled cookies. The session is gets appended to the > URL and its trivial to steal a session. > To protect against session fixation, the HTTP session must be invalidated and > recreated on login, giving the user a new session id. The following code does > exactly that, it must be called before loggin in the user (eg. store > credentials). A redirect isn't required, though it should be part of the > login-form anyway. > ISessionStore store = Application.get().getSessionStore(); > Request request = RequestCycle.get().getRequest(); > store.invalidate(request); > Session session = Application.get().newSession(request, > RequestCycle.get().getResponse()); > session.bind(); > store.bind(request, session); > Calling session.invalidateNow() does NOT work (I have no idea why). > I'd like to see support for this as part of Wicket - it took me about 6 hours > to figure out the Wicket internals and produce these 6 lines of code. Others > shouldn't have to bother with that. > I can't provide a testcase. Applications work fine without the addition, but > leave users vulnerable to the session-fixation. Manual testing has to look at > the session id (eg. via Firebug's Net tab) before and after a login. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-1651) Extension Points for AutoComplete
[ https://issues.apache.org/jira/browse/WICKET-1651?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Johan Compagner updated WICKET-1651: Fix Version/s: 1.4-M4 Assignee: Johan Compagner > Extension Points for AutoComplete > - > > Key: WICKET-1651 > URL: https://issues.apache.org/jira/browse/WICKET-1651 > Project: Wicket > Issue Type: Improvement > Components: wicket-extensions >Affects Versions: 1.4-M1 >Reporter: Roland Huss >Assignee: Johan Compagner > Fix For: 1.4-M4 > > Attachments: initHead.patch, javascript.patch > > > I'm working on an extension of AutoCompleteTextField for > wicket-extensions for selecting objects and remembering their identity > in the model, as described in this previous thread > http://www.mail-archive.com/[EMAIL PROTECTED]/msg02820.html > (it avoids the semantic problems described there by changing to a > readonly view as soon as the object has been selected). > This extension, which I would like to contribute to wicketstuff, > reuses most of the existing functionality of the wicket-extension > autocomlete feature. However, in order to avoid massive code > duplication a trivial and non-intrusive extension point in > AbstractAutoCompleteBehaviour is required. Here's the diff, it simply > puts on the initiaization stuff into an overwritable, unique > initHead() method which is called from within renderHead(). So > instead: > {code} >public void renderHead(IHeaderResponse response) >{ > super.renderHead(response); > response.renderJavascriptReference(AUTOCOMPLETE_JS); > ... > } > {code} > I need > {code} > public void renderHead(IHeaderResponse response) > { > super.renderHead(response); > initHead(response); > } > protected void initHead(IHeaderResponse response) { > response.renderJavascriptReference(AUTOCOMPLETE_JS); > ... > } > {code} > The reason is obvious: I need to overwrite this to include my own > extended Javascript but I also need a call to super.renderHead(). > In addition, I modified wicket-autocomplete.js, so that the > Wicket.AutoComplete Javascript object is subclassable (needs also only > a handful of changes). The patch make three methods overridable by assigning > it as 'member' methods (instead of being static methods). These are > updateValue() > (introduced for updating the selected value), getSelectedValue() and > getSelectedElement() also introduced for being accesible in a > subclass). As you can see the patch is rather minimal and allows > simple subclasses like: > {code} > Wicketstuff.ObjectAutoComplete=function(elementId, objectElementId, > callbackUrl, cfg){ > Wicket.AutoComplete.call(this,elementId,callbackUrl,cfg); > this.updateValue = function() { > var objElement = wicketGet(objectElementId); > var textElement = wicketGet(elementId); > var selected = this.getSelectedValue(); > objElement.value = selected['idvalue']; > textElement.value = selected['textvalue']; > } > this.getSelectedValue = function() { > var element= this.getSelectedElement(); > var attr = element.attributes['textvalue']; > var idAttr = element.attributes['idvalue']; > var value; > if (attr == undefined) { > value = element.innerHTML; > } else { > value = attr.value; > } > return { 'textvalue': value.replace(/<[^>]+>/g,""), 'idvalue' : > idAttr.value }; > } > } > // Inherit without calling constructor of Wicket.AutoComplete > // > var tmpClass = function() {}; > tmpClass.prototype = Wicket.AutoComplete.prototype; > Wicketstuff.ObjectAutoComplete.prototype = new tmpClass(); > {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-1837) DiskPageStore: 32k directory entries.
[ https://issues.apache.org/jira/browse/WICKET-1837?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Johan Compagner updated WICKET-1837: Fix Version/s: 1.4-M4 Assignee: Matej Knopp matej, can we apply this patch? > DiskPageStore: 32k directory entries. > - > > Key: WICKET-1837 > URL: https://issues.apache.org/jira/browse/WICKET-1837 > Project: Wicket > Issue Type: Improvement > Components: wicket >Affects Versions: 1.4-M3 > Environment: Caucho Resin 3.2 >Reporter: uwe schaefer >Assignee: Matej Knopp > Fix For: 1.4-M4 > > Attachments: sessionId_deep_path_revisited.patch > > > When using JMeter to battletest a Wicket-App, i saw 31999 directories created > (one per session) in the tmp dir to store the pagemaps. > This is a problem because the underlying filesystem might (and does in my > case) prevent wicket from creating more directory entries than that. > i appended a very very simple patch to address this by creating > /ab/cd/ef instead of /abcdef for pagemap storage. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-1602) Wicket resources - wicket is requesting resources every 1 hour
[ https://issues.apache.org/jira/browse/WICKET-1602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Johan Compagner updated WICKET-1602: Fix Version/s: 1.5-M1 Assignee: Johan Compagner > Wicket resources - wicket is requesting resources every 1 hour > -- > > Key: WICKET-1602 > URL: https://issues.apache.org/jira/browse/WICKET-1602 > Project: Wicket > Issue Type: Improvement > Components: wicket >Affects Versions: 1.3.3 >Reporter: Stefan Simik >Assignee: Johan Compagner > Fix For: 1.5-M1 > > > There is a problem with wicket ajax javascripts - there are reloading by > browser every 1 hour, because the Expire header > is hardcoded to 3600 seconds in WebResource#setHeaders() method. > This problem bubbles up to commonly used class ResourceReference class, which > internally works > with PackageResource that uses our problematic class - WebResource. > SIMPLE AND FAST SOLUTION > -- > The only thing, that is needed to fix this, is to change > WebResource#setHeaders() to take > the caching time from some wicket settings, so it is not hardcoded and can be > configured by developer. > NABBLE about this problem: > > http://www.nabble.com/forum/ViewPost.jtp?post=17117009&framed=y -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-1727) Prepending JS in AjaxRequestTarget via listener is unusable
[ https://issues.apache.org/jira/browse/WICKET-1727?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Johan Compagner updated WICKET-1727: Fix Version/s: 1.5-M1 Assignee: Matej Knopp Remaining Estimate: (was: 24h) Original Estimate: (was: 24h) > Prepending JS in AjaxRequestTarget via listener is unusable > --- > > Key: WICKET-1727 > URL: https://issues.apache.org/jira/browse/WICKET-1727 > Project: Wicket > Issue Type: Bug > Components: wicket >Affects Versions: 1.4-M2 > Environment: java 1.6, windows >Reporter: Karel Cabel >Assignee: Matej Knopp > Fix For: 1.5-M1 > > > If component wants prepend javascript in ajax request, the only way to do it > is register itself like listener in ajax request and then implements > method AjaxRequestTarget.IListener.onBeforeRespond. This method is called > before prepending. Other methods (like onRender, onBeforeRender, ...) > are called AFTER prepending, so they can't be used for... > It works, but problem is, who will register this component? Now, it must be > registered manually in ajax method and this method > must know, that this component will be rendered in this ajax request. And > this is very bad. > In other words, component has no chance to register itself BEFORE > prepending... > I think, that there should be some method (like onBeforeRender) called in > AjaxRequestTarget.respond() BEFORE prepending (called on every component)... > Karel -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
svn commit: r701870 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/RequestCycle.java
Author: jcompagner Date: Sun Oct 5 12:35:23 2008 New Revision: 701870 URL: http://svn.apache.org/viewvc?rev=701870&view=rev Log: dont alter the pageparameters of a Page instance WICKET-1740 Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/RequestCycle.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/RequestCycle.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/RequestCycle.java?rev=701870&r1=701869&r2=701870&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/RequestCycle.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/RequestCycle.java Sun Oct 5 12:35:23 2008 @@ -850,6 +850,10 @@ { pageParameters = new PageParameters(); } + else + { + pageParameters = (PageParameters)pageParameters.clone(); + } if (params != null) {
[jira] Closed: (WICKET-1740) RequestCycle.urlFor modifies page parameters
[ https://issues.apache.org/jira/browse/WICKET-1740?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Johan Compagner closed WICKET-1740. --- Resolution: Fixed Fix Version/s: 1.4-M4 1.3.5 > RequestCycle.urlFor modifies page parameters > > > Key: WICKET-1740 > URL: https://issues.apache.org/jira/browse/WICKET-1740 > Project: Wicket > Issue Type: Bug >Affects Versions: 1.3.4 >Reporter: Juliano Viana >Assignee: Johan Compagner > Fix For: 1.3.5, 1.4-M4 > > > The method RequestCycle.urlFor(final Component component,final > RequestListenerInterface listener, ValueMap params) (RequestCycle.java line > 824) obtains a PageParameters instance from the current page or creates a new > instance if the page has no associated PageParameters. It then proceeds to > add to the PageParameters instance all the parameters passed on the 'params' > argument. If its using the PageParameters instance associated with the > current Page that means the parameters of the page are permanently altered > and any code later in the request cycle that depends upon these parameters is > going to be broken. > I believe the soluction would be to clone the PageParameters instance > obtained from the Page, as in: > PageParameters pageParameters = page.getPageParameters(); > if (pageParameters == null) > { > pageParameters = new PageParameters(); > } > else > pageParameters = > (PageParameters)pageParameters.clone(); > The above change doesn't seem to break any test cases. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
svn commit: r701869 - /wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java
Author: jcompagner Date: Sun Oct 5 12:35:05 2008 New Revision: 701869 URL: http://svn.apache.org/viewvc?rev=701869&view=rev Log: dont alter the pageparameters of a Page instance WICKET-1740 Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java?rev=701869&r1=701868&r2=701869&view=diff == --- wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java (original) +++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java Sun Oct 5 12:35:05 2008 @@ -835,6 +835,10 @@ { pageParameters = new PageParameters(); } + else + { + pageParameters = (PageParameters)pageParameters.clone(); + } if (params != null) {
[jira] Updated: (WICKET-1489) Create component "Menu"
[ https://issues.apache.org/jira/browse/WICKET-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Johan Compagner updated WICKET-1489: Fix Version/s: 1.5-M1 have you created a nice menu that we could include into extentions? i would love to see a nice patch > Create component "Menu" > --- > > Key: WICKET-1489 > URL: https://issues.apache.org/jira/browse/WICKET-1489 > Project: Wicket > Issue Type: New Feature > Components: wicket-extensions >Affects Versions: 1.3.2 >Reporter: Sergey Derugo > Fix For: 1.5-M1 > > > Please implement component "Menu". See example - > http://www.telerik.com/products/aspnet/controls/menu/overview.aspx - this is > menu component for ASP.NET (just look at the menu of this site - it's really > nice). I think that Wicket should also have such component and this component > should be included to the Wicket as standard control. > For the begiging it will be nice to have menu the component with basic > functionality. Then it will be possible add new features. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-1675) Widen Generics for Lists/Iteratos
[ https://issues.apache.org/jira/browse/WICKET-1675?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Johan Compagner updated WICKET-1675: Fix Version/s: 1.4-M4 > Widen Generics for Lists/Iteratos > - > > Key: WICKET-1675 > URL: https://issues.apache.org/jira/browse/WICKET-1675 > Project: Wicket > Issue Type: Improvement >Affects Versions: 1.4-M2 >Reporter: Johannes Schneider >Assignee: Igor Vaynberg > Fix For: 1.4-M4 > > Attachments: widening_collections1.patch > > > There are still many issues with collections. > Here is another patch that solves some of them... -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Closed: (WICKET-1692) on Java 6+ DatePicker.localize should use DateFormatSymbols.getInstance(Locale) instead of new DateFormatSymbols(Locale) to support DateFormatSymbolsProviders
[ https://issues.apache.org/jira/browse/WICKET-1692?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Johan Compagner closed WICKET-1692. --- Resolution: Fixed Fix Version/s: 1.4-M4 1.3.5 Assignee: Johan Compagner applied to 1.3 and 1.4 > on Java 6+ DatePicker.localize should use > DateFormatSymbols.getInstance(Locale) instead of new > DateFormatSymbols(Locale) to support DateFormatSymbolsProviders > --- > > Key: WICKET-1692 > URL: https://issues.apache.org/jira/browse/WICKET-1692 > Project: Wicket > Issue Type: Improvement > Components: wicket-extensions >Affects Versions: 1.3.3 > Environment: Sun JDK 1.6.0 >Reporter: Damian Golda >Assignee: Johan Compagner > Fix For: 1.3.5, 1.4-M4 > > > Java 6.0 introduces very usefull possibility to add providers for Locale > specific classes from java.text - for example for DateFormatSymbols it may be > installed DateFormatSymbolsProvider. > Unfortunately such providers are ignored when DateFormatSymbols are created > using constructor DateFormatSymbols(Locale) as it's used in > DatePicker.localize method. > Javadoc says clearly: > "This constructor can only construct instances for the locales supported by > the Java runtime environment, not for those supported by installed > DateFormatSymbolsProvider implementations. For full locale coverage, use the > getInstance method. " > So please change DatePicker to support custom DateFormatSymbolsProviders. > My proposal: > protected void localize(Map widgetProperties) > { > DateFormatSymbols dfSymbols = new DateFormatSymbols(getLocale()); > try > { > // try to use JDK 6 DateFormatSymbols.getInstance(Locale) > Method getInstanceMethod = DateFormatSymbols.getMethod("getInstance", new > Class[] { Locale.class}); > dfSymbols = (DateFormatSymbols)getInstanceMethod.invoke(null, new > Object[] { getLocale() }); > }catch(NoSuchMethodException e) { > // pre JDK 6 - ignore > }catch(IllegalAccessException e) { > // pre JDK 6 - ignore > }catch(IllegalArgumentException e) { > // pre JDK 6 - ignore > }catch(InvocationTargetException e) { > // pre JDK 6 - ignore > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
svn commit: r701866 - /wicket/trunk/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java
Author: jcompagner Date: Sun Oct 5 12:29:12 2008 New Revision: 701866 URL: http://svn.apache.org/viewvc?rev=701866&view=rev Log: try to use java 6 method WICKET-1692 Modified: wicket/trunk/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java Modified: wicket/trunk/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java?rev=701866&r1=701865&r2=701866&view=diff == --- wicket/trunk/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java (original) +++ wicket/trunk/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java Sun Oct 5 12:29:12 2008 @@ -16,6 +16,7 @@ */ package org.apache.wicket.extensions.yui.calendar; +import java.lang.reflect.Method; import java.text.DateFormat; import java.text.DateFormatSymbols; import java.text.SimpleDateFormat; @@ -72,6 +73,21 @@ */ public class DatePicker extends AbstractBehavior implements IHeaderContributor { + private static Method GETINSTANCEMETHOD = null; + static + { + try + { + GETINSTANCEMETHOD = DateFormatSymbols.class.getMethod("getInstance", + new Class[] { Locale.class }); + } + catch (Exception e) + { + // ignore + } + + } + /** * Exception thrown when the bound component does not produce a format this date picker can work * with. @@ -524,7 +540,25 @@ */ protected void localize(Map widgetProperties) { - DateFormatSymbols dfSymbols = new DateFormatSymbols(getLocale()); + DateFormatSymbols dfSymbols = null; + if (GETINSTANCEMETHOD != null) + { + // try to use JDK 6 DateFormatSymbols.getInstance(Locale) + try + { + dfSymbols = (DateFormatSymbols)GETINSTANCEMETHOD.invoke(null, + new Object[] { getLocale() }); + } + catch (Exception e) + { + // ignore + } + } + if (dfSymbols == null) + { + dfSymbols = new DateFormatSymbols(getLocale()); + } + if (Locale.SIMPLIFIED_CHINESE.equals(getLocale())) { dfSymbols.setShortWeekdays(new String[] { "", "\u65E5", "\u4E00", "\u4E8C", "\u4E09", @@ -597,7 +631,8 @@ * selection of month and year. * * @return true if select boxes should be rendered to allow month and year -* selection.false to render just plain text. +* selection. +* false to render just plain text. */ protected boolean enableMonthYearSelection() { @@ -607,9 +642,8 @@ /** * Indicates whether the calendar should be hidden after a date was selected. * -* @return true (default) if the calendar should be hidden after the date selection -* false if the calendar should remain visible after the date -* selection. +* @return true (default) if the calendar should be hidden after the date selection +* false if the calendar should remain visible after the date selection. */ protected boolean hideOnSelect() { @@ -631,8 +665,10 @@ * Override this method to further customize the YUI Calendar with additional Javascript code. * The code returned by this method is executed right after the Calendar has been constructed * and initialized. To refer to the actual Calendar DOM object, use ${calendar} in -* your code.See http://developer.yahoo.com/yui/calendar/";>the widget's -* documentation for more information about the YUI Calendar. Example: +* your code. +* See http://developer.yahoo.com/yui/calendar/";>the widget's documentation for +* more information about the YUI Calendar. +* Example: * * * protected String getAdditionalJavascript()
svn commit: r701865 - /wicket/branches/wicket-1.3.x/jdk-1.4/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java
Author: jcompagner Date: Sun Oct 5 12:28:57 2008 New Revision: 701865 URL: http://svn.apache.org/viewvc?rev=701865&view=rev Log: try to use java 6 method WICKET-1692 Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java?rev=701865&r1=701864&r2=701865&view=diff == --- wicket/branches/wicket-1.3.x/jdk-1.4/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java (original) +++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java Sun Oct 5 12:28:57 2008 @@ -16,6 +16,7 @@ */ package org.apache.wicket.extensions.yui.calendar; +import java.lang.reflect.Method; import java.text.DateFormat; import java.text.DateFormatSymbols; import java.text.SimpleDateFormat; @@ -59,19 +60,34 @@ * only be used with components that either implement [EMAIL PROTECTED] ITextFormatProvider} or that use * [EMAIL PROTECTED] DateConverter} configured with an instance of [EMAIL PROTECTED] SimpleDateFormat} (like Wicket's * default configuration has). - * + * * To use, simply add a new instance to your component, which would typically a TextField, like * [EMAIL PROTECTED] DateTextField}. - * + * * The CalendarNavigator can be configured by overriding [EMAIL PROTECTED] #configure(Map)} and setting the * property or by returning true for [EMAIL PROTECTED] #enableMonthYearSelection()}. - * + * * @see http://developer.yahoo.com/yui/calendar/ - * + * * @author eelcohillenius */ public class DatePicker extends AbstractBehavior implements IHeaderContributor { + private static Method GETINSTANCEMETHOD = null; + static + { + try + { + GETINSTANCEMETHOD = DateFormatSymbols.class.getMethod("getInstance", + new Class[] { Locale.class }); + } + catch (Exception e) + { + // ignore + } + + } + /** * Exception thrown when the bound component does not produce a format this date picker can work * with. @@ -285,7 +301,7 @@ * Check that this behavior can get a date format out of the component it is coupled to. It * checks whether [EMAIL PROTECTED] #getDatePattern()} produces a non-null value. If that method returns * null, and exception will be thrown -* +* * @param component *the component this behavior is being coupled to * @throws UnableToDetermineFormatException @@ -301,7 +317,7 @@ /** * Set widget property if the array is null and has a length greater than 0. -* +* * @param widgetProperties * @param key * @param array @@ -316,7 +332,7 @@ /** * Whether to position the date picker relative to the trigger icon. -* +* * @return If true, the date picker is aligned with the left position of the icon, and with the * top right under. If false, the date picker will skip positioning and will let you do * the positioning yourself. Returns true by default. @@ -330,7 +346,7 @@ * Append javascript to the initialization function for the YUI widget. Can be used by * subclasses to conveniently extend configuration without having to write a separate * contribution. -* +* * @param markupId *The markup id of the calendar component * @param javascriptId @@ -349,11 +365,10 @@ * Gives overriding classes the option of adding (or even changing/ removing) configuration * properties for the javascript widget. See http://developer.yahoo.com/yui/calendar/";>the widget's documentation for the -* available options. If you want to override/ remove properties, you should call -* [EMAIL PROTECTED] super#setWidgetProperties(Properties)} first. If you don't call that, be aware that -* you will have to call [EMAIL PROTECTED] #localize(Map)} manually if you like localized strings to be -* added. -* +* available options. If you want to override/ remove properties, you should call [EMAIL PROTECTED] +* super#setWidgetProperties(Properties)} first. If you don't call that, be aware that you will +* have to call [EMAIL PROTECTED] #localize(Map)} manually if you like localized strings to be
svn commit: r701859 - /wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/convert/converters/BooleanConverter.java
Author: jcompagner Date: Sun Oct 5 12:18:05 2008 New Revision: 701859 URL: http://svn.apache.org/viewvc?rev=701859&view=rev Log: lift the final of all of them so that now getNumberFormat or whatever can be overriden WICKET-1494 Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/convert/converters/BooleanConverter.java Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/convert/converters/BooleanConverter.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/convert/converters/BooleanConverter.java?rev=701859&r1=701858&r2=701859&view=diff == --- wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/convert/converters/BooleanConverter.java (original) +++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/convert/converters/BooleanConverter.java Sun Oct 5 12:18:05 2008 @@ -29,7 +29,7 @@ * @author Eelco Hillenius * @author Jonathan Locke */ -public final class BooleanConverter extends AbstractConverter +public class BooleanConverter extends AbstractConverter { private static final long serialVersionUID = 1L;
[jira] Updated: (WICKET-1629) Scandinavian language files corrupted in wicket-contrib-datepicker and 1.2.x
[ https://issues.apache.org/jira/browse/WICKET-1629?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Johan Compagner updated WICKET-1629: Assignee: (was: Johan Compagner) can somebody pick this up that is working on the wicket contrib project? Or Juha you can do that your self if you ask to be a wicket contrib committer > Scandinavian language files corrupted in wicket-contrib-datepicker and 1.2.x > > > Key: WICKET-1629 > URL: https://issues.apache.org/jira/browse/WICKET-1629 > Project: Wicket > Issue Type: Bug > Components: wicket-extensions >Affects Versions: 1.2.7, 1.3.3 >Reporter: Juha Alatalo > Attachments: calendar-fi.js, calendar-sv-utf8.js > > > PopupDatePicker in wicket-contrib-datepicker and > wicket.extensions.markup.html.datepicker.DatePicker in version 1.2.7 has > corrupted language files for Finnish and Swedish. Scandinavian letters like ä > and ö are replaced with rubbish like ö or ?. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Closed: (WICKET-1674) Provide a method to initialise a component
[ https://issues.apache.org/jira/browse/WICKET-1674?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Johan Compagner closed WICKET-1674. --- Resolution: Won't Fix i dont want to introduce yet another hook, we should remove the once we have not add more it clutters the interface If you want that just use your own boolean flag in onBeforeRender that you set to true once > Provide a method to initialise a component > -- > > Key: WICKET-1674 > URL: https://issues.apache.org/jira/browse/WICKET-1674 > Project: Wicket > Issue Type: New Feature > Components: wicket >Affects Versions: 1.4-M1 >Reporter: John Patterson > > Normally components are initialised in the constructor which does not allow > for use of factory methods that need to access state. This problem was > present in the PagingNavigator. Problem detailed here: > http://www.nabble.com/Re%3A-Alternative-method-to-initialise-page-p16742891.html > The current solution is to use onBeforeRender() but this is called more than > once so care need to be taken to not re-add children and super.onBeforeRender > must be called. > To ease creating extendable components I think it was decided worth using a > flag bit: > http://www.nabble.com/Re%3A-Alternative-method-to-initialise-page-p16974678.html > and creating some hook onBeforeFirstRender or onFirstRender or something like > that. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-1599) RequestUtils.toAbsolutePath()'s bug
[ https://issues.apache.org/jira/browse/WICKET-1599?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12636938#action_12636938 ] Johan Compagner commented on WICKET-1599: - should this be looked at for 1.3.x or can we move this to 1.4/1.5? > RequestUtils.toAbsolutePath()'s bug > --- > > Key: WICKET-1599 > URL: https://issues.apache.org/jira/browse/WICKET-1599 > Project: Wicket > Issue Type: Bug > Components: wicket >Affects Versions: 1.3.3 > Environment: Firefox >Reporter: smallufo >Assignee: Alastair Maw > > Suppose the following code in a bookmarkable page , say "FirstPage" : > When user pushes an AJAX button , the page builds a bookmarkable link : > Map parameterMap = new HashMap(); > parameterMap.put("index" , myObj.getIndex()); > PageParameters pps = new PageParameters(parameterMap); > String absUrl = > RequestUtils.toAbsolutePath(getRequestCycle().urlFor(SecondPage.class , > pps).toString()); > If the user navigates properly (by clicking links to the FirstPage) , > the absUrl is correct : foobar/SecondPage/index/1/ > after pre-adding "http://"; + req.getServerName() + contextPath + "/" , I can > correctly build the (bookmarkable) link like this : > http://www.foobar.com/app/foobar/SecondPage/index/1 > BUT , if the user directly links to the FirstPage(copy / paste the > FirstPage's url in the browser's url bar) , > or clicks the SecondPage's link and back (by browser) , and pushes the AJAX > button again... > SOMETIMES , absUrl becomes : > http://foobar/SecondPage/index/1/ , the preceding "http://"; is redundant !!! > And , my bookmarkable link becomes : > http://www.foobar.com/app/http://foobar/SecondPage/index/1 > I can not successfully re-produce this error every time. but sometimes it > just occurs . > It seems it is a bug... > PS : I know how to build a BookmarkablePageLink in the wicket way , But I > have to do this for a special purpose.(parsing an article and adding > links to some keywords) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-1393) IComponentResolver Ajax injection
[ https://issues.apache.org/jira/browse/WICKET-1393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12636940#action_12636940 ] Johan Compagner commented on WICKET-1393: - what's the status of this one should it be addressed in 1.3 or can we move it ot 1.4/1.5? > IComponentResolver Ajax injection > - > > Key: WICKET-1393 > URL: https://issues.apache.org/jira/browse/WICKET-1393 > Project: Wicket > Issue Type: Bug > Components: wicket >Affects Versions: 1.3.1 >Reporter: Michael Moore >Assignee: Matej Knopp > Attachments: ajaxTest.zip > > > When using the IComponentResolver interface to allow markup to dictate Wicket > components at page request time, if Ajax components are added in this way > their supporting
[jira] Closed: (WICKET-1494) IntegerConvert cannot handle locale specific input/output
[ https://issues.apache.org/jira/browse/WICKET-1494?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Johan Compagner closed WICKET-1494. --- Resolution: Fixed Fix Version/s: 1.3.5 the problem is that then others are not happy anymore: WICKET-1421 and i dont think i want by default grouping enabled because that is most of the time just plain ugly that you get 1.000 or 1,000 if you just want to print 1000 so what i did was lift the final of all the converters we have so you can override getNumberFormat(Locale) on it and do what ever you want. > IntegerConvert cannot handle locale specific input/output > - > > Key: WICKET-1494 > URL: https://issues.apache.org/jira/browse/WICKET-1494 > Project: Wicket > Issue Type: Bug > Components: wicket >Affects Versions: 1.3.3 >Reporter: Matthew Young > Fix For: 1.3.5 > > > IntegerConverter, and possibly anything extends AbstractIntegerConverter > cannot parse locale formatted input or output locale formatted string. E.g., > IntegerConverter.convertToObject("999,999", new Locale("us")) raise > parseexception. IntegerConverter.convertToString(new Integer("99", new > Locale("us")) => "99" instead of "999,999". > This is because in AbstractIntegerConverter: > public NumberFormat getNumberFormat(Locale locale) > { > NumberFormat numberFormat = > (NumberFormat)numberFormats.get(locale); > if (numberFormat == null) > { > numberFormat = NumberFormat.getIntegerInstance(locale); > numberFormat.setParseIntegerOnly(true); > numberFormat.setGroupingUsed(false); > << this is the problem > numberFormats.put(locale, numberFormat); > } > return (NumberFormat)numberFormat.clone(); > } > Is it possible to remove "numberFormat.setGroupingUsed(false);"? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
svn commit: r701851 - /wicket/trunk/wicket/src/main/java/org/apache/wicket/util/convert/converters/
Author: jcompagner Date: Sun Oct 5 12:04:58 2008 New Revision: 701851 URL: http://svn.apache.org/viewvc?rev=701851&view=rev Log: lift the final of all of them so that now getNumberFormat or whatever can be overriden WICKET-1494 Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/util/convert/converters/BooleanConverter.java wicket/trunk/wicket/src/main/java/org/apache/wicket/util/convert/converters/ByteConverter.java wicket/trunk/wicket/src/main/java/org/apache/wicket/util/convert/converters/CharacterConverter.java wicket/trunk/wicket/src/main/java/org/apache/wicket/util/convert/converters/DoubleConverter.java wicket/trunk/wicket/src/main/java/org/apache/wicket/util/convert/converters/FloatConverter.java wicket/trunk/wicket/src/main/java/org/apache/wicket/util/convert/converters/IntegerConverter.java wicket/trunk/wicket/src/main/java/org/apache/wicket/util/convert/converters/LongConverter.java wicket/trunk/wicket/src/main/java/org/apache/wicket/util/convert/converters/ShortConverter.java wicket/trunk/wicket/src/main/java/org/apache/wicket/util/convert/converters/ZeroPaddingIntegerConverter.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/util/convert/converters/BooleanConverter.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/util/convert/converters/BooleanConverter.java?rev=701851&r1=701850&r2=701851&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/util/convert/converters/BooleanConverter.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/util/convert/converters/BooleanConverter.java Sun Oct 5 12:04:58 2008 @@ -29,7 +29,7 @@ * @author Eelco Hillenius * @author Jonathan Locke */ -public final class BooleanConverter extends AbstractConverter +public class BooleanConverter extends AbstractConverter { private static final long serialVersionUID = 1L; Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/util/convert/converters/ByteConverter.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/util/convert/converters/ByteConverter.java?rev=701851&r1=701850&r2=701851&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/util/convert/converters/ByteConverter.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/util/convert/converters/ByteConverter.java Sun Oct 5 12:04:58 2008 @@ -27,7 +27,7 @@ * @author Eelco Hillenius * @author Jonathan Locke */ -public final class ByteConverter extends AbstractIntegerConverter +public class ByteConverter extends AbstractIntegerConverter { private static final long serialVersionUID = 1L; Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/util/convert/converters/CharacterConverter.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/util/convert/converters/CharacterConverter.java?rev=701851&r1=701850&r2=701851&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/util/convert/converters/CharacterConverter.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/util/convert/converters/CharacterConverter.java Sun Oct 5 12:04:58 2008 @@ -27,7 +27,7 @@ * @author Eelco Hillenius * @author Jonathan Locke */ -public final class CharacterConverter extends AbstractConverter +public class CharacterConverter extends AbstractConverter { private static final long serialVersionUID = 1L; Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/util/convert/converters/DoubleConverter.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/util/convert/converters/DoubleConverter.java?rev=701851&r1=701850&r2=701851&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/util/convert/converters/DoubleConverter.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/util/convert/converters/DoubleConverter.java Sun Oct 5 12:04:58 2008 @@ -27,7 +27,7 @@ * @author Eelco Hillenius * @author Jonathan Locke */ -public final class DoubleConverter extends AbstractDecimalConverter +public class DoubleConverter extends AbstractDecimalConverter { private static final long serialVersionUID = 1L; Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/util/convert/converters/FloatConverter.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/util/convert/converters/FloatConverter.java?rev=701851&r1=701850&r2=701851&view=diff
svn commit: r701850 - /wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/convert/converters/
Author: jcompagner Date: Sun Oct 5 12:04:38 2008 New Revision: 701850 URL: http://svn.apache.org/viewvc?rev=701850&view=rev Log: lift the final of all of them so that now getNumberFormat or whatever can be overriden WICKET-1494 Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/convert/converters/ByteConverter.java wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/convert/converters/CharacterConverter.java wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/convert/converters/DoubleConverter.java wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/convert/converters/FloatConverter.java wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/convert/converters/IntegerConverter.java wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/convert/converters/LongConverter.java wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/convert/converters/ShortConverter.java wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/convert/converters/ZeroPaddingIntegerConverter.java Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/convert/converters/ByteConverter.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/convert/converters/ByteConverter.java?rev=701850&r1=701849&r2=701850&view=diff == --- wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/convert/converters/ByteConverter.java (original) +++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/convert/converters/ByteConverter.java Sun Oct 5 12:04:38 2008 @@ -27,7 +27,7 @@ * @author Eelco Hillenius * @author Jonathan Locke */ -public final class ByteConverter extends AbstractIntegerConverter +public class ByteConverter extends AbstractIntegerConverter { private static final long serialVersionUID = 1L; Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/convert/converters/CharacterConverter.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/convert/converters/CharacterConverter.java?rev=701850&r1=701849&r2=701850&view=diff == --- wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/convert/converters/CharacterConverter.java (original) +++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/convert/converters/CharacterConverter.java Sun Oct 5 12:04:38 2008 @@ -27,7 +27,7 @@ * @author Eelco Hillenius * @author Jonathan Locke */ -public final class CharacterConverter extends AbstractConverter +public class CharacterConverter extends AbstractConverter { private static final long serialVersionUID = 1L; Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/convert/converters/DoubleConverter.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/convert/converters/DoubleConverter.java?rev=701850&r1=701849&r2=701850&view=diff == --- wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/convert/converters/DoubleConverter.java (original) +++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/convert/converters/DoubleConverter.java Sun Oct 5 12:04:38 2008 @@ -27,7 +27,7 @@ * @author Eelco Hillenius * @author Jonathan Locke */ -public final class DoubleConverter extends AbstractDecimalConverter +public class DoubleConverter extends AbstractDecimalConverter { private static final long serialVersionUID = 1L; Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/convert/converters/FloatConverter.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/convert/converters/FloatConverter.java?rev=701850&r1=701849&r2=701850&view=diff == --- wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/convert/converters/FloatConverter.java (original) +++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/util/convert/converters/FloatConverter.java Sun Oct 5 12:04:38 2008 @@ -27,7 +27,7 @@ * @author Eelco Hillenius * @author Jonathan Locke */ -public final class FloatConverter extends AbstractDecimalCon
[jira] Updated: (WICKET-1530) Mount resources by locale
[ https://issues.apache.org/jira/browse/WICKET-1530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Johan Compagner updated WICKET-1530: Fix Version/s: 1.5-M1 > Mount resources by locale > - > > Key: WICKET-1530 > URL: https://issues.apache.org/jira/browse/WICKET-1530 > Project: Wicket > Issue Type: Improvement > Components: wicket >Affects Versions: 1.3.3 >Reporter: Sebastiaan van Erk > Fix For: 1.5-M1 > > > When mounting resources (e.g., bookmarkable pages) and using localization, I > find it strange that you have to mount all versions of the resource (all > locales) on 1 path. > This has the following major drawbacks: > 1) The resource is not directly reference-able in any locale other than the > default locale. > 2) An indexer only finds one version of the resource (or if it finds > multiple, the others are not bookmarkable, so they are expired by the time > they're in the index). > 3) It is visitor unfriendly: visitors of the site that press a "change > locale" button get a non-bookmarkable page, which breaks if they copy paste > it to link to your supposedly bookmarkable page. > If it were possible to specify the locale when mounting a resource, this > would allow a different path to be specified per locale, solving all of the > above problems. It would allow links within your pages to the other versions > of the page (other locales) that are stateless, making them crawlable. It > would allow for a stateless locale change link that properly changes the URL > so that users which copy/paste the URL get an URL that actually works. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-1531) Behaviours cannot change tag name
[ https://issues.apache.org/jira/browse/WICKET-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Johan Compagner updated WICKET-1531: Fix Version/s: 1.5-M1 > Behaviours cannot change tag name > - > > Key: WICKET-1531 > URL: https://issues.apache.org/jira/browse/WICKET-1531 > Project: Wicket > Issue Type: Improvement > Components: wicket >Affects Versions: 1.3.3 >Reporter: John Patterson > Fix For: 1.5-M1 > > > IBehaviour.onComponentTag() is called after Component.onComponentTat() which > usually checks the name of the tag and throws an exception if it is not what > is expected. This means I cannot change the name of the tag in the behaviour. > The use case is this: > I am building a kind of "Bean panel" application and it is really awkward to > deal with the input form component as a panel. Simply changing the name of > the tag from to has really made the code a LOT simpler. > I created a Behaviour to change the name to clean up the code a bit more but > it does not work. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Closed: (WICKET-1795) Make it possible for to encode unicode strings in component
[ https://issues.apache.org/jira/browse/WICKET-1795?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Johan Compagner closed WICKET-1795. --- Resolution: Won't Fix > Make it possible for to encode unicode strings in component > --- > > Key: WICKET-1795 > URL: https://issues.apache.org/jira/browse/WICKET-1795 > Project: Wicket > Issue Type: Improvement > Components: wicket >Affects Versions: 1.3.4 >Reporter: Nino Martinez >Priority: Minor > Fix For: 1.3.5 > > Attachments: wicketComponentEncoding.patch > > Original Estimate: 0.33h > Remaining Estimate: 0.33h > > It would be very nice to be able to tell a component for example label that > it had to encode unicode chars into equalent html encoding, I've supplied a > patch aswell. > Additionally im not sure what goes for the wicket:message tag? It would be > very nice to have a switch in markupsettings to decide all encoding. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-1355) Autocomplete window has wrong position in scrolled context
[ https://issues.apache.org/jira/browse/WICKET-1355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12636932#action_12636932 ] Johan Compagner commented on WICKET-1355: - already a patch underway? > Autocomplete window has wrong position in scrolled context > -- > > Key: WICKET-1355 > URL: https://issues.apache.org/jira/browse/WICKET-1355 > Project: Wicket > Issue Type: Bug > Components: wicket-extensions >Affects Versions: 1.3.1 >Reporter: Erik van Oosten >Assignee: Igor Vaynberg > Fix For: 1.3.5 > > Attachments: wicket-autocomplete.js > > > When the autocompleted field is located in a scrolled div, the drop-down > window is positioned too far down. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Closed: (WICKET-1795) Make it possible for to encode unicode strings in component
[ https://issues.apache.org/jira/browse/WICKET-1795?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Johan Compagner closed WICKET-1795. --- Resolution: Fixed closing this one for now Why would you encode it by the way? Just serve it as UTF-8 which is the default in wicket anyway then you dont really need to encode it The whole world should listen to me for one time and switch over to UTF-8 now and drop all other charsets > Make it possible for to encode unicode strings in component > --- > > Key: WICKET-1795 > URL: https://issues.apache.org/jira/browse/WICKET-1795 > Project: Wicket > Issue Type: Improvement > Components: wicket >Affects Versions: 1.3.4 >Reporter: Nino Martinez >Priority: Minor > Fix For: 1.3.5 > > Attachments: wicketComponentEncoding.patch > > Original Estimate: 0.33h > Remaining Estimate: 0.33h > > It would be very nice to be able to tell a component for example label that > it had to encode unicode chars into equalent html encoding, I've supplied a > patch aswell. > Additionally im not sure what goes for the wicket:message tag? It would be > very nice to have a switch in markupsettings to decide all encoding. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Reopened: (WICKET-1795) Make it possible for to encode unicode strings in component
[ https://issues.apache.org/jira/browse/WICKET-1795?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Johan Compagner reopened WICKET-1795: - > Make it possible for to encode unicode strings in component > --- > > Key: WICKET-1795 > URL: https://issues.apache.org/jira/browse/WICKET-1795 > Project: Wicket > Issue Type: Improvement > Components: wicket >Affects Versions: 1.3.4 >Reporter: Nino Martinez >Priority: Minor > Fix For: 1.3.5 > > Attachments: wicketComponentEncoding.patch > > Original Estimate: 0.33h > Remaining Estimate: 0.33h > > It would be very nice to be able to tell a component for example label that > it had to encode unicode chars into equalent html encoding, I've supplied a > patch aswell. > Additionally im not sure what goes for the wicket:message tag? It would be > very nice to have a switch in markupsettings to decide all encoding. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
svn commit: r701844 - in /wicket/trunk/wicket: ./ src/main/java/org/apache/wicket/RequestCycle.java src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
Author: jcompagner Date: Sun Oct 5 11:42:34 2008 New Revision: 701844 URL: http://svn.apache.org/viewvc?rev=701844&view=rev Log: better resetting of the responses and catching exceptions on specific places to reset the buffers and Response objects WICKET-1450 Modified: wicket/trunk/wicket/ (props changed) wicket/trunk/wicket/src/main/java/org/apache/wicket/RequestCycle.java wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java Propchange: wicket/trunk/wicket/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Sun Oct 5 11:42:34 2008 @@ -1 +1 @@ -/wicket/branches/wicket-1.3.x/jdk-1.4/wicket:653208,653212,653215,653226,653231,654304,655446,655466,655786,658141,658189,659118,659120,662360,663058,671549,671885,687145-688996,698530-698577,701132-701133 +/wicket/branches/wicket-1.3.x/jdk-1.4/wicket:653208,653212,653215,653226,653231,654304,655446,655466,655786,658141,658189,659118,659120,662360,663058,671549,671885,687145-688996,698530-698577,701132-701133,701843 Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/RequestCycle.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/RequestCycle.java?rev=701844&r1=701843&r2=701844&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/RequestCycle.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/RequestCycle.java Sun Oct 5 11:42:34 2008 @@ -1352,6 +1352,7 @@ // if a redirect exception has been issued we abort what we // were doing and begin responding to the top target on the // stack + response.reset(); currentStep = RESPOND; } } Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java?rev=701844&r1=701843&r2=701844&view=diff == --- wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java Sun Oct 5 11:42:34 2008 @@ -782,10 +782,22 @@ { // ignore this one could be a result off. } + // Restore original response + RequestCycle.get().setResponse(originalResponse); + encodingBodyResponse.reset(); throw e; } - component.renderComponent(); + try + { + component.renderComponent(); + } + catch (RuntimeException e) + { + RequestCycle.get().setResponse(originalResponse); + encodingBodyResponse.reset(); + throw e; + } page.endComponentRender(component);
svn commit: r701843 - in /wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket: RequestCycle.java ajax/AjaxRequestTarget.java
Author: jcompagner Date: Sun Oct 5 11:36:16 2008 New Revision: 701843 URL: http://svn.apache.org/viewvc?rev=701843&view=rev Log: better resetting of the responses and catching exceptions on specific places to reset the buffers and Response objects WICKET-1450 Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java?rev=701843&r1=701842&r2=701843&view=diff == --- wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java (original) +++ wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/RequestCycle.java Sun Oct 5 11:36:16 2008 @@ -22,7 +22,10 @@ import java.util.Map.Entry; import org.apache.wicket.behavior.IBehavior; -import org.apache.wicket.protocol.http.*; +import org.apache.wicket.protocol.http.BufferedWebResponse; +import org.apache.wicket.protocol.http.IRequestLogger; +import org.apache.wicket.protocol.http.PageExpiredException; +import org.apache.wicket.protocol.http.WicketURLEncoder; import org.apache.wicket.protocol.http.servlet.ServletWebRequest; import org.apache.wicket.request.AbstractRequestCycleProcessor; import org.apache.wicket.request.ClientInfo; @@ -76,8 +79,7 @@ * argument will be used. Links to bookmarkable pages are created by calling the urlFor(Class, * PageParameters) method, where Class is the page class and PageParameters are the parameters to * encode into the URL. - * - * + * * * * 2. @@ -117,9 +119,7 @@ * * * - * Class - * Interface - * Purpose + * Class Interface Purpose * * * Form @@ -844,13 +844,13 @@ final Map.Entry entry = (Entry)it.next(); final String key = entry.getKey().toString(); final String value = entry.getValue().toString(); -// Do not encode values here. It is the encoder's job -// to do the endoding. This leads to double encoding -// - Doug Donohoe -// @see https://issues.apache.org/jira/browse/WICKET-1627 -//pageParameters.add(encodeQueryStringItem(key), encodeQueryStringItem(value)); -pageParameters.add(key, value); -} + // Do not encode values here. It is the encoder's job + // to do the endoding. This leads to double encoding + // - Doug Donohoe + // @see https://issues.apache.org/jira/browse/WICKET-1627 + // pageParameters.add(encodeQueryStringItem(key), encodeQueryStringItem(value)); + pageParameters.add(key, value); + } } target = new BookmarkableListenerInterfaceRequestTarget(page.getPageMapName(), @@ -904,7 +904,7 @@ */ private static String encodeQueryStringItem(String value) { -return WicketURLEncoder.QUERY_INSTANCE.encode(value); + return WicketURLEncoder.QUERY_INSTANCE.encode(value); } /** @@ -1354,6 +1354,7 @@ // if a redirect exception has been issued we abort what we // were doing and begin responding to the top target on the // stack + response.reset(); currentStep = RESPOND; } } @@ -1421,8 +1422,8 @@ /** * Called when an unrecoverable runtime exception during request cycle handling occurred, which * will result in displaying a user facing error page. Clients can override this method in case -* they want to customize logging. NOT called for -* [EMAIL PROTECTED] PageExpiredException page expired exceptions}. +* they want to customize logging. NOT called for [EMAIL PROTECTED] PageExpiredException page expired +* exceptions}. * * @param e *the runtime exception Modified: wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/ajax/AjaxReque
[jira] Closed: (WICKET-1450) Ajax Re-render does not work after AbstractRestartResponseException()
[ https://issues.apache.org/jira/browse/WICKET-1450?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Johan Compagner closed WICKET-1450. --- Resolution: Fixed the responses where not correctly reset when doing a abort when there is already content in the buffers > Ajax Re-render does not work after AbstractRestartResponseException() > - > > Key: WICKET-1450 > URL: https://issues.apache.org/jira/browse/WICKET-1450 > Project: Wicket > Issue Type: Bug > Components: wicket >Affects Versions: 1.3.2 > Environment: Windows XP Java 1.6.0_05-b13 >Reporter: Matthew Young >Assignee: Johan Compagner > Fix For: 1.3.5 > > > To handle possible exception in Model#getObject(): I do > 1) make note of exception has occurred (and subsequently only return some > error value and not cause exception thrown again), > 2) register an error feedback message, > 3) calll page.detach() (for clean up and reset?, I'm not sure but I know > this makes FeedbackPanelErrorMessage reload message from session) and > 4) throw new AbstractRestartResponseException() to re-render response with > the new error message from the model shown. > I'm finding that this works perfectly in non-Ajax. But in Ajax, there are 2 > problems: > 1) the error message register in step 2) above is not rendered in the > FeedbackPanel > 2) the Ajax response is incomplete, it's missing the label component in my > test case and missing the closing tag. > Test case below: if you enter "blowup" in the text field, the label's model > will do the steps outline above. Run this in non-Ajax and you will see two > error messages as expected. Run in Ajax, you will see the problem (open > Wicket Ajax Debug panel to see). > = = = = HomePage.html: > > > message will be here > > > > > FEEDBACK > > = = = = = HomePage.java: > public class HomePage extends WebPage { > private static final long serialVersionUID = 1L; > private String word; > > public HomePage(final PageParameters parameters) { > add(new FeedbackPanel("feedback") { > private static final long serialVersionUID = 1L; > @Override protected void onBeforeRender() { > System.out.println("= = = = FeedbackPanel > onBeforeRender()"); > System.out.println(" > FeedbackbackMessageModel = " + getFeedbackMessagesModel().getObject()); > super.onBeforeRender(); > } > }.setOutputMarkupPlaceholderTag(true)); > // if the word "blowup" is entered, > //this register a error message and throw > IModel model = new Model() { > private static final long serialVersionUID = 1L; > @Override public Object getObject() { > if (word != null && word.equals("blowup")) { > word = "-w-e-b-l-e-w-u-p-"; > HomePage.this.fatal("[2/2]This message > is from Model."); > getPage().detach(); > System.out.println("! ! ! ! ! throwing > new AbstractRestartResponseException()"); > throw new > AbstractRestartResponseException() { > private static final long > serialVersionUID = 1L; > }; > } else { > return "The word is: \"" + (word == > null ? " n u l l " : word) + "\""; > } > } > }; > add(new Label("message", model) { > private static final long serialVersionUID = 1L; > @Override protected void onBeforeRender() { > System.out.println("= = = = Label onBeforeRender(), > model = " + getModel().getObject()); > super.onBeforeRender(); > } > }.setOutputMarkupId(true)); > Form form = new Form("form", new CompoundPropertyModel(this)); > add(form); > form.add(new TextField("word").setRequired(true)); > AjaxFallbackButton submitButton = new > AjaxFallbackButton("submitButton", form) { > private static final long serialVersionUID = 1L; > @Override protected void onSubmit(AjaxRequestTarget target, > Form f) { > if (word != null && word.equals("blowup")) { > HomePage.this.error("[1/2]This message is from > onSubmit. There should also be a message from model"); > } > if (target != null)
[jira] Closed: (WICKET-1478) AbortWithWebErrorCodeException in onBeforeRender causes WicketRuntimeException
[ https://issues.apache.org/jira/browse/WICKET-1478?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Johan Compagner closed WICKET-1478. --- Resolution: Fixed i am closing this one, should be fixed > AbortWithWebErrorCodeException in onBeforeRender causes WicketRuntimeException > -- > > Key: WICKET-1478 > URL: https://issues.apache.org/jira/browse/WICKET-1478 > Project: Wicket > Issue Type: Bug > Components: wicket >Affects Versions: 1.3.2 >Reporter: Michael Sparer >Assignee: Johan Compagner >Priority: Minor > Fix For: 1.3.5 > > Attachments: quickstart404.jar > > > Using custom error pages as described on > http://cwiki.apache.org/WICKET/error-pages-and-feedback-messages.html, a > wicket RTE gets thrown "There is no application attached to current thread > [threadname]" when a AbortWithWebErrorCodeException is thrown in the > onBeforeRender method of a WebPage. Note that this _only_ happens when using > a custom error page defined in web.xml. > See attached quickstart for the complete stacktrace (and my usecase) > See also the mailinglist entry on > http://www.nabble.com/Throw-AbortWithWebErrorCodeException-in-onBeforeRender-to16446341.html#a16473849 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Closed: (WICKET-1413) RequestUtils.toAbsolutePath() has a bug regarding to UTF-8 encoded page parameter.
[ https://issues.apache.org/jira/browse/WICKET-1413?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Johan Compagner closed WICKET-1413. --- Resolution: Won't Fix as far as i can see that is what the web container gives us or the servlet spec/url decoding because if i just test it with nice url example http://www.wicketstuff.org:8090/wicket13/niceurl/my/mounted/package/Page5/param1/-68254/param2/台北市/ then this is what i get from tomcat: my/mounted/package/Page5/param1/-87084664/param2/%E5%8F%B0%E5%8C%97%E5%B8%82/ and the end result is again in the page : 台北市 so the conversion from 台北市 to %E5%8F%B0%E5%8C%97%E5%B8%82 and back to 台北市 seems to be correct. > RequestUtils.toAbsolutePath() has a bug regarding to UTF-8 encoded page > parameter. > -- > > Key: WICKET-1413 > URL: https://issues.apache.org/jira/browse/WICKET-1413 > Project: Wicket > Issue Type: Bug > Components: wicket >Affects Versions: 1.3.0-final > Environment: Wicket 1.3.0 (maybe 1.3.1 too) >Reporter: smallufo >Assignee: Johan Compagner > Fix For: 1.3.5 > > > It seems RequestUtils.toAbsolutePath() has a bug regarding to UTF-8 encoded > page parameter : > I have a bookmarkable page , which takes a UTF-8 encoded parameter "place" : > private PageParameters pps; > pps.put("place", URLEncoder.encode(place , "UTF-8")); > In this Page , I have a TextField that prints the URL for this page (for > users to copy) : > String url = RequestUtils.toAbsolutePath(""); > TextField resultUrl; > resultUrl = new TextField("resultUrl"); > resultUrl.setModel(new Model( url )); > resultUrl.setEscapeModelStrings(false); > resultUrl.setOutputMarkupId(true); > add(resultUrl); > For example , "台北市" (Chinese word : "Taipei" ) is encoded correctly to : > place/%25E5%258F%25B0%25E5%258C%2597%25E5%25B8%2582 > And it is correctly shown in the browser URL bar. > But it is incorrectly shown in the textfield : > place/%E5%8F%B0%E5%8C%97%E5%B8%82 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WICKET-1859) Fail fast if super.init() is not called in MyApplication#init()
[ https://issues.apache.org/jira/browse/WICKET-1859?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Martin Grigorov resolved WICKET-1859. - Resolution: Invalid I just took a deep look at the implementation and here are my findings: Currently (1.3.4 and 1.4-m3) Application#init() and WebApplication#init() have empty implementations. All the default settings are set in WebApplication#internalInit() which is being called separately in WicketFilter.init(FilterConfig). So I don't see a reason to require super.init(). > Fail fast if super.init() is not called in MyApplication#init() > --- > > Key: WICKET-1859 > URL: https://issues.apache.org/jira/browse/WICKET-1859 > Project: Wicket > Issue Type: Improvement > Components: wicket >Affects Versions: 1.3.4, 1.4-M3 > Environment: Any >Reporter: Martin Grigorov >Priority: Minor > > Add a check whether "super.init()" is called in MyApplication#init(). > Something similar to Component#onBeforeRender(). > From Wicket Users mailing list: > On Thu, 2008-10-02 at 09:35 -0700, Jonathan Locke wrote: > > > > btw, shouldn't we fail init if super isn't called in this case like those > > other protections we built in? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.