[jira] Created: (WICKET-2805) DateTextField and DatePicker do not work properly with four digit year patterns in 1.4.7
DateTextField and DatePicker do not work properly with four digit year patterns in 1.4.7 Key: WICKET-2805 URL: https://issues.apache.org/jira/browse/WICKET-2805 Project: Wicket Issue Type: Bug Components: wicket-extensions Affects Versions: 1.4.7 Environment: Windows XP Java(TM) SE Runtime Environment (build 1.6.0_17-b04) Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode) Tomcat 6.0.20 Reporter: Marcin Palka Date patterns that contains four digit year does not work properly with DatePicker and DateTextField in 1.4.7. Steps to reproduce the error: 1. Create a form with a DateTextField, a DatePicker with a four digit year pattern like -MM-dd and a submit button. 2. Run the project. Click on the DatePicker and select a date. For example 2010-03-25. 3. Submit the Form and check what's submitted to the server. Server receives the date as 0010-03-25. A quickstart to reproduce the problem is attached. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-2805) DateTextField and DatePicker do not work properly with four digit year patterns in 1.4.7
[ https://issues.apache.org/jira/browse/WICKET-2805?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marcin Palka updated WICKET-2805: - Attachment: quickstart.zip A quickstart project to reproduce the issue. DateTextField and DatePicker do not work properly with four digit year patterns in 1.4.7 Key: WICKET-2805 URL: https://issues.apache.org/jira/browse/WICKET-2805 Project: Wicket Issue Type: Bug Components: wicket-extensions Affects Versions: 1.4.7 Environment: Windows XP Java(TM) SE Runtime Environment (build 1.6.0_17-b04) Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode) Tomcat 6.0.20 Reporter: Marcin Palka Attachments: quickstart.zip Date patterns that contains four digit year does not work properly with DatePicker and DateTextField in 1.4.7. Steps to reproduce the error: 1. Create a form with a DateTextField, a DatePicker with a four digit year pattern like -MM-dd and a submit button. 2. Run the project. Click on the DatePicker and select a date. For example 2010-03-25. 3. Submit the Form and check what's submitted to the server. Server receives the date as 0010-03-25. A quickstart to reproduce the problem is attached. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-2805) DateTextField and DatePicker do not work properly with four digit year patterns in 1.4.7
[ https://issues.apache.org/jira/browse/WICKET-2805?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12850044#action_12850044 ] Marcin Palka commented on WICKET-2805: -- The problem does not exist in 1.4.6. I have just reverted my project back to Wicket 1.4.6 the problem is gone. DateTextField and DatePicker do not work properly with four digit year patterns in 1.4.7 Key: WICKET-2805 URL: https://issues.apache.org/jira/browse/WICKET-2805 Project: Wicket Issue Type: Bug Components: wicket-extensions Affects Versions: 1.4.7 Environment: Windows XP Java(TM) SE Runtime Environment (build 1.6.0_17-b04) Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode) Tomcat 6.0.20 Reporter: Marcin Palka Attachments: quickstart.zip Date patterns that contains four digit year does not work properly with DatePicker and DateTextField in 1.4.7. Steps to reproduce the error: 1. Create a form with a DateTextField, a DatePicker with a four digit year pattern like -MM-dd and a submit button. 2. Run the project. Click on the DatePicker and select a date. For example 2010-03-25. 3. Submit the Form and check what's submitted to the server. Server receives the date as 0010-03-25. A quickstart to reproduce the problem is attached. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (WICKET-2648) DatePicker javascript uses 4 symbols for year although pattern contains just yy
[ https://issues.apache.org/jira/browse/WICKET-2648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12849097#action_12849097 ] Marcin Palka edited comment on WICKET-2648 at 3/24/10 8:11 AM: --- In my application I use the -MM-dd pattern. It results in dates saved as 0010-03-23 instead of 2010-03-23. I had to to fall back to wicket 1.4.6. Is there any other bug filled for this? It seems that now all the four digit year patterns are affected. was (Author: mpalka): In my application I use the -MM-dd pattern. It results in dates saved as 0010-03-23 instead of 2010-03-23. I had to to revert to fall back to wicket 1.4.6. Is there any other bug filled for this? It seems that now all the four digit year patterns are affected. DatePicker javascript uses 4 symbols for year although pattern contains just yy --- Key: WICKET-2648 URL: https://issues.apache.org/jira/browse/WICKET-2648 Project: Wicket Issue Type: Bug Components: wicket-extensions Affects Versions: 1.4.5 Reporter: Marat Radchenko Assignee: Igor Vaynberg Fix For: 1.4.7, 1.5-M1 Attachments: wicket-datetime.patch Steps to reproduce: 1. Create TextField 2. Add DatePicker with yy for year (en_US locale, SHORT format, for example). 3. Set some date to textfield 4. Open page (year is correctly shown with two digits) 5. Click datepicker icon Expected: year is still 2-digit Actual: year becomes 4-digit -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Created: (WICKET-2433) Ajax support for multipart forms broken in a nested form
Ajax support for multipart forms broken in a nested form Key: WICKET-2433 URL: https://issues.apache.org/jira/browse/WICKET-2433 Project: Wicket Issue Type: Bug Components: wicket Affects Versions: 1.4.1 Environment: Java: 1.6.0_13; Java HotSpot(TM) Client VM 11.3-b02 System: Windows XP version 5.1 running on x86; Cp1250; pl_PL (nb) Reporter: Marcin Palka Ajax support for multipart forms broken in case of using a nested multipart form. The file does not get uploaded, uploadField.getFileUpload() returns null. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-2433) Ajax support for multipart forms broken in a nested form
[ https://issues.apache.org/jira/browse/WICKET-2433?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marcin Palka updated WICKET-2433: - Attachment: NestedUploadForm.zip A quickstart project to reproduce the issue. Ajax support for multipart forms broken in a nested form Key: WICKET-2433 URL: https://issues.apache.org/jira/browse/WICKET-2433 Project: Wicket Issue Type: Bug Components: wicket Affects Versions: 1.4.1 Environment: Java: 1.6.0_13; Java HotSpot(TM) Client VM 11.3-b02 System: Windows XP version 5.1 running on x86; Cp1250; pl_PL (nb) Reporter: Marcin Palka Attachments: NestedUploadForm.zip Ajax support for multipart forms broken in case of using a nested multipart form. The file does not get uploaded, uploadField.getFileUpload() returns null. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-2214) Form tag in ModalWindow html code causes nested html forms when ModalWindow is used with panel that contain forms
[ https://issues.apache.org/jira/browse/WICKET-2214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12738427#action_12738427 ] Marcin Palka commented on WICKET-2214: -- Same here. I've got a modal window with an ajaxtabbed panel inside. Each tab contains a form. In my case the form tag on the 2nd tab does not get rendered. It looks like somehow only contents of the form are being rendered. I can see proper html being send in a ajax response but it does not get rendered properly. Form tag in ModalWindow html code causes nested html forms when ModalWindow is used with panel that contain forms - Key: WICKET-2214 URL: https://issues.apache.org/jira/browse/WICKET-2214 Project: Wicket Issue Type: Bug Components: wicket-extensions Affects Versions: 1.3.5, 1.3.6, 1.4-RC2 Reporter: Jor Assignee: Matej Knopp Attachments: modal.js.patch There is an extra form tag in modal window html code (modal.js - Wicket.Window.getMarkup function), it causes problems when ModalWindow is used with panel that contain forms. I haven't found any use for that form tag as it cannot be referenced from java code (it has no wicket id) and it only causes problems by creating nested form tags (outter form from modal html with no wicket id and inner form from panel with wicket id) that some browsers cant handle and its againts W3C html specification. I had to replace it with div tag to get my panel working. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Created: (WICKET-2414) Form tag does not get rendered on a Panel placed in a TabbedPanel within a ModalWindow
Form tag does not get rendered on a Panel placed in a TabbedPanel within a ModalWindow -- Key: WICKET-2414 URL: https://issues.apache.org/jira/browse/WICKET-2414 Project: Wicket Issue Type: Bug Components: wicket-extensions Affects Versions: 1.4.0 Environment: Windows Vista 64-bit, Tomcat 6.0.18, JDK 16u14 Reporter: Marcin Palka Form tag does not get rendered on a Panel placed in an AjaxTabbedPanel within a ModalWindow. Form contents are rendered properly but the form tag itself does not. The first tab of an AjaxTabbedPanel is not affected by this issue when rendered for the first time. But if one navigates to the second tab and returns back to the first tab then the form tag no longer exist there. This makes any forms on a tabbed panel placed on a modal window unusable. See attached quickstart project. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-2414) Form tag does not get rendered on a Panel placed in a TabbedPanel within a ModalWindow
[ https://issues.apache.org/jira/browse/WICKET-2414?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marcin Palka updated WICKET-2414: - Attachment: ModalFormProblem.zip A quickstart to reproduce the problem Form tag does not get rendered on a Panel placed in a TabbedPanel within a ModalWindow -- Key: WICKET-2414 URL: https://issues.apache.org/jira/browse/WICKET-2414 Project: Wicket Issue Type: Bug Components: wicket-extensions Affects Versions: 1.4.0 Environment: Windows Vista 64-bit, Tomcat 6.0.18, JDK 16u14 Reporter: Marcin Palka Attachments: ModalFormProblem.zip Form tag does not get rendered on a Panel placed in an AjaxTabbedPanel within a ModalWindow. Form contents are rendered properly but the form tag itself does not. The first tab of an AjaxTabbedPanel is not affected by this issue when rendered for the first time. But if one navigates to the second tab and returns back to the first tab then the form tag no longer exist there. This makes any forms on a tabbed panel placed on a modal window unusable. See attached quickstart project. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-2345) ModalWindow.setResizable(false) does not work after 1.4-rc4
[ https://issues.apache.org/jira/browse/WICKET-2345?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marcin Palka updated WICKET-2345: - Comment: was deleted (was: A patch file that fixes the issue. The problem is in getWindowOpenJavascript method that has been changed a couple of months ago (April or so). It converts the boolean value of sResizable() method to String. appendAssignment(buffer, settings.resizable, Boolean.toString(isResizable())); Then it calls the appendAssignment method that actually appends a String value to the output javascript code. The problem is that the appendAssignment quotes Strings. This makes the generated javascript code line look like the following: settings.resizable=false Which I believie is not a boolean value in Javascript. I created another appendAssignment method that takes a boolean as a value parameter and puts it into the script in unquoted form: private void appendAssignment(final AppendingStringBuffer buffer, final CharSequence key, final boolean value) { buffer.append(key).append(=); buffer.append(Boolean.toString(value)); buffer.append(;\n); } Then I replaced a line in the getWindowOpenJavascript to call my method instead of the one that takes String value. From: appendAssignment(buffer, settings.resizable, Boolean.toString(isResizable())); to: appendAssignment(buffer, settings.resizable, isResizable());) ModalWindow.setResizable(false) does not work after 1.4-rc4 --- Key: WICKET-2345 URL: https://issues.apache.org/jira/browse/WICKET-2345 Project: Wicket Issue Type: Bug Components: wicket-extensions Affects Versions: 1.4-RC4 Environment: Windows Vista 64-bit, Tomcat 6.0.18, JDK 16u14 Reporter: Marcin Palka Priority: Minor Attachments: ModalWindow.java.patch, quickstart.zip I haven't been able to make a fixed size modal window since I migrated my application to Wicket 1.4-rc5. The same problem exists while using Wicket 1.4-rc4. On the other hand everything works just fine with the 1.4rc-2. I will attach a quickstart that allows to reproduce the problem. It's looks like that there were some modification made to the ModalWindow component between rc2 and rc4 because my application crashes when switching between those two versions. It crashes with an exception as follows: java.lang.NoSuchMethodError: nl.stuq.SelectModalWindow.setInitialWidth(I)Lorg/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow. A clean and build makes the trick to make it work again. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-2345) ModalWindow.setResizable(false) does not work after 1.4-rc4
[ https://issues.apache.org/jira/browse/WICKET-2345?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marcin Palka updated WICKET-2345: - Attachment: ModalWindow.java.patch A patch file that fixes the issue. The problem is in getWindowOpenJavascript method that has been changed a couple of months ago (April or so). It converts the boolean value of sResizable() method to String. appendAssignment(buffer, settings.resizable, Boolean.toString(isResizable())); Then it calls the appendAssignment method that actually appends a String value to the output javascript code. The problem is that the appendAssignment quotes Strings. This makes the generated javascript code line look like the following: settings.resizable=false Which I believie is not a boolean value in Javascript. I created another appendAssignment method that takes a boolean as a value parameter and puts it into the script in unquoted form: private void appendAssignment(final AppendingStringBuffer buffer, final CharSequence key, final boolean value) { buffer.append(key).append(=); buffer.append(Boolean.toString(value)); buffer.append(;\n); } Then I replaced a line in the getWindowOpenJavascript to call my method instead of the one that takes String value. From: appendAssignment(buffer, settings.resizable, Boolean.toString(isResizable())); to: appendAssignment(buffer, settings.resizable, isResizable()); ModalWindow.setResizable(false) does not work after 1.4-rc4 --- Key: WICKET-2345 URL: https://issues.apache.org/jira/browse/WICKET-2345 Project: Wicket Issue Type: Bug Components: wicket-extensions Affects Versions: 1.4-RC4 Environment: Windows Vista 64-bit, Tomcat 6.0.18, JDK 16u14 Reporter: Marcin Palka Priority: Minor Attachments: quickstart.zip I haven't been able to make a fixed size modal window since I migrated my application to Wicket 1.4-rc5. The same problem exists while using Wicket 1.4-rc4. On the other hand everything works just fine with the 1.4rc-2. I will attach a quickstart that allows to reproduce the problem. It's looks like that there were some modification made to the ModalWindow component between rc2 and rc4 because my application crashes when switching between those two versions. It crashes with an exception as follows: java.lang.NoSuchMethodError: nl.stuq.SelectModalWindow.setInitialWidth(I)Lorg/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow. A clean and build makes the trick to make it work again. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-2345) ModalWindow.setResizable(false) does not work after 1.4-rc4
[ https://issues.apache.org/jira/browse/WICKET-2345?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marcin Palka updated WICKET-2345: - Attachment: (was: ModalWindow.java.patch) ModalWindow.setResizable(false) does not work after 1.4-rc4 --- Key: WICKET-2345 URL: https://issues.apache.org/jira/browse/WICKET-2345 Project: Wicket Issue Type: Bug Components: wicket-extensions Affects Versions: 1.4-RC4 Environment: Windows Vista 64-bit, Tomcat 6.0.18, JDK 16u14 Reporter: Marcin Palka Priority: Minor Attachments: quickstart.zip I haven't been able to make a fixed size modal window since I migrated my application to Wicket 1.4-rc5. The same problem exists while using Wicket 1.4-rc4. On the other hand everything works just fine with the 1.4rc-2. I will attach a quickstart that allows to reproduce the problem. It's looks like that there were some modification made to the ModalWindow component between rc2 and rc4 because my application crashes when switching between those two versions. It crashes with an exception as follows: java.lang.NoSuchMethodError: nl.stuq.SelectModalWindow.setInitialWidth(I)Lorg/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow. A clean and build makes the trick to make it work again. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Created: (WICKET-2345) ModalWindow.setResizable(false) stopped does not work after 1.4-rc4
ModalWindow.setResizable(false) stopped does not work after 1.4-rc4 --- Key: WICKET-2345 URL: https://issues.apache.org/jira/browse/WICKET-2345 Project: Wicket Issue Type: Bug Components: wicket-extensions Affects Versions: 1.4-RC4 Environment: Windows Vista 64-bit, Tomcat 6.0.18, JDK 16u14 Reporter: Marcin Palka Priority: Minor I haven't been able to make a fixed size modal window since I migrated my application to Wicket 1.4-rc5. The same problem exists while using Wicket 1.4-rc4. On the other hand everything works just fine with the 1.4rc-2. I will attach a quickstart that allows to reproduce the problem. It's looks like that there were some modification made to the ModalWindow component between rc2 and rc4 because my application crashes when switching between those two versions. It crashes with an exception as follows: java.lang.NoSuchMethodError: nl.stuq.SelectModalWindow.setInitialWidth(I)Lorg/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow. A clean and build makes the trick to make it work again. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-2345) ModalWindow.setResizable(false) stopped does not work after 1.4-rc4
[ https://issues.apache.org/jira/browse/WICKET-2345?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marcin Palka updated WICKET-2345: - Attachment: quickstart.zip A quickstart that allows to reproduce the problem. It's basically a modal window example from http://stuq.nl/weblog/2008-06-05/wicket-how-to-write-a-reusable-modal-window-popup. ModalWindow.setResizable(false) stopped does not work after 1.4-rc4 --- Key: WICKET-2345 URL: https://issues.apache.org/jira/browse/WICKET-2345 Project: Wicket Issue Type: Bug Components: wicket-extensions Affects Versions: 1.4-RC4 Environment: Windows Vista 64-bit, Tomcat 6.0.18, JDK 16u14 Reporter: Marcin Palka Priority: Minor Attachments: quickstart.zip I haven't been able to make a fixed size modal window since I migrated my application to Wicket 1.4-rc5. The same problem exists while using Wicket 1.4-rc4. On the other hand everything works just fine with the 1.4rc-2. I will attach a quickstart that allows to reproduce the problem. It's looks like that there were some modification made to the ModalWindow component between rc2 and rc4 because my application crashes when switching between those two versions. It crashes with an exception as follows: java.lang.NoSuchMethodError: nl.stuq.SelectModalWindow.setInitialWidth(I)Lorg/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow. A clean and build makes the trick to make it work again. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-2345) ModalWindow.setResizable(false) does not work after 1.4-rc4
[ https://issues.apache.org/jira/browse/WICKET-2345?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marcin Palka updated WICKET-2345: - Summary: ModalWindow.setResizable(false) does not work after 1.4-rc4 (was: ModalWindow.setResizable(false) stopped does not work after 1.4-rc4) ModalWindow.setResizable(false) does not work after 1.4-rc4 --- Key: WICKET-2345 URL: https://issues.apache.org/jira/browse/WICKET-2345 Project: Wicket Issue Type: Bug Components: wicket-extensions Affects Versions: 1.4-RC4 Environment: Windows Vista 64-bit, Tomcat 6.0.18, JDK 16u14 Reporter: Marcin Palka Priority: Minor Attachments: quickstart.zip I haven't been able to make a fixed size modal window since I migrated my application to Wicket 1.4-rc5. The same problem exists while using Wicket 1.4-rc4. On the other hand everything works just fine with the 1.4rc-2. I will attach a quickstart that allows to reproduce the problem. It's looks like that there were some modification made to the ModalWindow component between rc2 and rc4 because my application crashes when switching between those two versions. It crashes with an exception as follows: java.lang.NoSuchMethodError: nl.stuq.SelectModalWindow.setInitialWidth(I)Lorg/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow. A clean and build makes the trick to make it work again. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-2345) ModalWindow.setResizable(false) does not work after 1.4-rc4
[ https://issues.apache.org/jira/browse/WICKET-2345?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marcin Palka updated WICKET-2345: - Attachment: ModalWindow.java.patch A patch file that fixes the issue. The problem is in getWindowOpenJavascript method that has been changed a couple of months ago (April or so). It converts the boolean value of sResizable() method to String. appendAssignment(buffer, settings.resizable, Boolean.toString(isResizable())); Then it calls the appendAssignment method that actually appends a String value to the output javascript code. The problem is that the appendAssignment quotes Strings. This makes the generated javascript code line look like the following: settings.resizable=false Which I believie is not a boolean value in Javascript. I created another appendAssignment method that takes a boolean as a value parameter and puts it into the script in unquoted form: private void appendAssignment(final AppendingStringBuffer buffer, final CharSequence key, final boolean value) { buffer.append(key).append(=); buffer.append(Boolean.valueOf(value)); buffer.append(;\n); } Then I replaced a line in the getWindowOpenJavascript to call my method instead of the one that takes String value. From: appendAssignment(buffer, settings.resizable, Boolean.toString(isResizable())); to: appendAssignment(buffer, settings.resizable, isResizable()); ModalWindow.setResizable(false) does not work after 1.4-rc4 --- Key: WICKET-2345 URL: https://issues.apache.org/jira/browse/WICKET-2345 Project: Wicket Issue Type: Bug Components: wicket-extensions Affects Versions: 1.4-RC4 Environment: Windows Vista 64-bit, Tomcat 6.0.18, JDK 16u14 Reporter: Marcin Palka Priority: Minor Attachments: ModalWindow.java.patch, quickstart.zip I haven't been able to make a fixed size modal window since I migrated my application to Wicket 1.4-rc5. The same problem exists while using Wicket 1.4-rc4. On the other hand everything works just fine with the 1.4rc-2. I will attach a quickstart that allows to reproduce the problem. It's looks like that there were some modification made to the ModalWindow component between rc2 and rc4 because my application crashes when switching between those two versions. It crashes with an exception as follows: java.lang.NoSuchMethodError: nl.stuq.SelectModalWindow.setInitialWidth(I)Lorg/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow. A clean and build makes the trick to make it work again. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Created: (WICKET-2043) Tab (\t) character in a DropDownChoice value causes the returned selected value to be null
Tab (\t) character in a DropDownChoice value causes the returned selected value to be null -- Key: WICKET-2043 URL: https://issues.apache.org/jira/browse/WICKET-2043 Project: Wicket Issue Type: Bug Components: wicket Affects Versions: 1.4-RC1 Environment: Window Vista 64-bit, javac 1.6.0_10, BEA weblogic 10.3 Reporter: Marcin Palka Priority: Minor I use a DropDownChoice with a model of SelectOption objects and a ChoiceRenderer (see code below). This is how I create a DropDownChoice instance: DropDownChoice separatorDropDown = new DropDownChoice( separatorDropDown, new PropertyModel(this, separator), //separator is a field in my class new Model(new ArrayList(Arrays.asList(separators))), //separators is an array of SelectOption objects choiceRenderer); This is how the SelectOption looks like: class SelectOption implements Serializable { private String key; private String value; public SelectOption(String key, String value) { this.key = key; this.value = value; } public String getKey() { return key; } public void setKey(String key) { this.key = key; } public String getValue() { return value; } public void setValue(String value) { this.value = value; } @Override public String toString() { return getKey(); } } And this is how choiceRenderer looks like ChoiceRenderer choiceRenderer = new ChoiceRenderer(key, value); These are the values that my model consist of: private SelectOption[] separators = new SelectOption[]{ new SelectOption(comma, ,), new SelectOption(semicolon , ;), new SelectOption(dot, .), new SelectOption(tab, \t), //causes null new SelectOption(tabandtex, \ttext), //causes null new SelectOption(space, )}; Whenever any item containing a \t (tab character) in its value field is selected, the separator field that PropertyModel points to becomes null. Otherwise correct SelectOption instance is being set into separator. I noticed that tab characters are missing from the output markup generated by wicket. select wicket:id=separatorDropDown ... option selected=selected value=,comma/option option value=;semicolon /option option value=.dot/option option value= tab/option option value= texttabandtex/option option value= space/option /select This is complete code: Markup part: ?xml version=1.0 encoding=UTF-8? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html xmlns:wicket head meta http-equiv=Content-Type content=text/html; charset=UTF-8/ titleBuggyPage/title /head body div Separator nbsp;nbsp;select wicket:id=separatorDropDownSeparator/select /div div wicket:id=separatorLabelseparatorLabel/div /body /html and Java code: import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; import org.apache.wicket.PageParameters; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.ChoiceRenderer; import org.apache.wicket.markup.html.form.DropDownChoice; import org.apache.wicket.model.Model; import org.apache.wicket.model.PropertyModel; /** * * @author Marcin Pałka (marcin.pa...@comarch.com) */ public final class BuggyPage extends WebPage { //default separator private SelectOption defaultSeparator = new SelectOption(comma, ,); //current separator private SelectOption separator = defaultSeparator; //separators private SelectOption[] separators = new SelectOption[]{ new SelectOption(comma, ,), new SelectOption(semicolon , ;), new SelectOption(dot, .), new SelectOption(tab, \t), //causes null new SelectOption(tabandtex, \ttext), //causes null new SelectOption(space, )}; Label separatorLabel = new Label(separatorLabel, Separator is + separator); public BuggyPage(PageParameters params) { separatorLabel.setOutputMarkupId(true); ChoiceRenderer choiceRenderer = new ChoiceRenderer(key, value); DropDownChoice separatorDropDown = new DropDownChoice( separatorDropDown, new PropertyModel(this, separator), new Model(new ArrayList(Arrays.asList(separators))), choiceRenderer); // Enable Ajax-based choice separatorDropDown.add(new
[jira] Updated: (WICKET-2043) Tab (\t) character in a DropDownChoice value causes the returned selected value to be null
[ https://issues.apache.org/jira/browse/WICKET-2043?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marcin Palka updated WICKET-2043: - Description: I use a DropDownChoice with a model of SelectOption objects and a ChoiceRenderer (see code below). This is how I create a DropDownChoice instance: DropDownChoice separatorDropDown = new DropDownChoice( separatorDropDown, new PropertyModel(this, separator), //separator is a field in my class new Model(new ArrayList(Arrays.asList(separators))), //separators is an array of SelectOption objects choiceRenderer); This is how the SelectOption looks like: class SelectOption implements Serializable { private String key; private String value; public SelectOption(String key, String value) { this.key = key; this.value = value; } public String getKey() { return key; } public void setKey(String key) { this.key = key; } public String getValue() { return value; } public void setValue(String value) { this.value = value; } @Override public String toString() { return getKey(); } } And this is how choiceRenderer looks like ChoiceRenderer choiceRenderer = new ChoiceRenderer(key, value); These are the values that my model consist of: private SelectOption[] separators = new SelectOption[]{ new SelectOption(comma, ,), new SelectOption(semicolon , ;), new SelectOption(dot, .), new SelectOption(tab, \t), //causes null new SelectOption(tabandtex, \ttext), //causes null new SelectOption(space, )}; Whenever any item containing a \t (tab character) in its value field is selected, the separator field that PropertyModel points to becomes null. Otherwise correct SelectOption instance is being set into separator. I noticed that tab characters are missing from the output markup generated by wicket. select wicket:id=separatorDropDown ... option selected=selected value=,comma/option option value=;semicolon /option option value=.dot/option option value= tab/option option value= texttabandtex/option option value= space/option /select This is complete code: Markup part: ?xml version=1.0 encoding=UTF-8? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html xmlns:wicket head meta http-equiv=Content-Type content=text/html; charset=UTF-8/ titleBuggyPage/title /head body div Separator nbsp;nbsp;select wicket:id=separatorDropDownSeparator/select /div div wicket:id=separatorLabelseparatorLabel/div /body /html and Java code: import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; import org.apache.wicket.PageParameters; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.ChoiceRenderer; import org.apache.wicket.markup.html.form.DropDownChoice; import org.apache.wicket.model.Model; import org.apache.wicket.model.PropertyModel; public final class BuggyPage extends WebPage { //default separator private SelectOption defaultSeparator = new SelectOption(comma, ,); //current separator private SelectOption separator = defaultSeparator; //separators private SelectOption[] separators = new SelectOption[]{ new SelectOption(comma, ,), new SelectOption(semicolon , ;), new SelectOption(dot, .), new SelectOption(tab, \t), //causes null new SelectOption(tabandtex, \ttext), //causes null new SelectOption(space, )}; Label separatorLabel = new Label(separatorLabel, Separator is + separator); public BuggyPage(PageParameters params) { separatorLabel.setOutputMarkupId(true); ChoiceRenderer choiceRenderer = new ChoiceRenderer(key, value); DropDownChoice separatorDropDown = new DropDownChoice( separatorDropDown, new PropertyModel(this, separator), new Model(new ArrayList(Arrays.asList(separators))), choiceRenderer); // Enable Ajax-based choice separatorDropDown.add(new AjaxFormComponentUpdatingBehavior(onchange) { @Override protected void onUpdate(AjaxRequestTarget target) { //whenever the \t or \tsomething is selected, //the separator instance is null here. //This applies to any value that contains a backslash String separatorLabelText = New separator is + separator; Label newLabel = new
[jira] Updated: (WICKET-2043) Tab (\t) character in a DropDownChoice value causes the returned selected value to be null
[ https://issues.apache.org/jira/browse/WICKET-2043?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marcin Palka updated WICKET-2043: - Attachment: BuggyPage.zip Source code to reproduce the problem. Tab (\t) character in a DropDownChoice value causes the returned selected value to be null -- Key: WICKET-2043 URL: https://issues.apache.org/jira/browse/WICKET-2043 Project: Wicket Issue Type: Bug Components: wicket Affects Versions: 1.4-RC1 Environment: Window Vista 64-bit, javac 1.6.0_10, BEA weblogic 10.3 Reporter: Marcin Palka Priority: Minor Attachments: BuggyPage.zip I use a DropDownChoice with a model of SelectOption objects and a ChoiceRenderer (see code below). This is how I create a DropDownChoice instance: DropDownChoice separatorDropDown = new DropDownChoice( separatorDropDown, new PropertyModel(this, separator), //separator is a field in my class new Model(new ArrayList(Arrays.asList(separators))), //separators is an array of SelectOption objects choiceRenderer); This is how the SelectOption looks like: class SelectOption implements Serializable { private String key; private String value; public SelectOption(String key, String value) { this.key = key; this.value = value; } public String getKey() { return key; } public void setKey(String key) { this.key = key; } public String getValue() { return value; } public void setValue(String value) { this.value = value; } @Override public String toString() { return getKey(); } } And this is how choiceRenderer looks like ChoiceRenderer choiceRenderer = new ChoiceRenderer(key, value); These are the values that my model consist of: private SelectOption[] separators = new SelectOption[]{ new SelectOption(comma, ,), new SelectOption(semicolon , ;), new SelectOption(dot, .), new SelectOption(tab, \t), //causes null new SelectOption(tabandtex, \ttext), //causes null new SelectOption(space, )}; Whenever any item containing a \t (tab character) in its value field is selected, the separator field that PropertyModel points to becomes null. Otherwise correct SelectOption instance is being set into separator. I noticed that tab characters are missing from the output markup generated by wicket. select wicket:id=separatorDropDown ... option selected=selected value=,comma/option option value=;semicolon /option option value=.dot/option option value= tab/option option value= texttabandtex/option option value= space/option /select This is complete code: Markup part: ?xml version=1.0 encoding=UTF-8? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html xmlns:wicket head meta http-equiv=Content-Type content=text/html; charset=UTF-8/ titleBuggyPage/title /head body div Separator nbsp;nbsp;select wicket:id=separatorDropDownSeparator/select /div div wicket:id=separatorLabelseparatorLabel/div /body /html and Java code: import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; import org.apache.wicket.PageParameters; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.ChoiceRenderer; import org.apache.wicket.markup.html.form.DropDownChoice; import org.apache.wicket.model.Model; import org.apache.wicket.model.PropertyModel; public final class BuggyPage extends WebPage { //default separator private SelectOption defaultSeparator = new SelectOption(comma, ,); //current separator private SelectOption separator = defaultSeparator; //separators private SelectOption[] separators = new SelectOption[]{ new SelectOption(comma, ,), new SelectOption(semicolon , ;), new SelectOption(dot, .), new SelectOption(tab, \t), //causes null new SelectOption(tabandtex, \ttext), //causes null new SelectOption(space, )}; Label separatorLabel = new Label(separatorLabel, Separator is + separator); public BuggyPage(PageParameters params) { separatorLabel.setOutputMarkupId(true); ChoiceRenderer choiceRenderer = new ChoiceRenderer(key, value);