Re: Bug in AbstractOptions of Palette?
Done. *WICKET-2407 https://issues.apache.org/jira/browse/WICKET-2407* Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Thu, Jul 30, 2009 at 7:19 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: open a jira issue -igor On Thu, Jul 30, 2009 at 1:39 AM, Eyal Golanegola...@gmail.com wrote: Hello, We encountered a small problem in our Palette. Some of the values that were supposed to be in the choices (available and/or selected) had the '' and '' . Because of that the options weren't rendererd correctly. Looking at AbstractAction#onComponentTagBody I saw that it takes the value as it is and put it in the html: String value = getConverter(displayClass).convertToString(displayValue, getLocale()); where displayValue is Object displayValue = renderer.getDisplayValue(choice); In my code I overridden the getDisplayValue and getDisplayId of the renderer: IChoiceRenderer choiceRenderer = new ChoiceRenderer(getFieldName, getFieldName) { private static final long serialVersionUID = 1L; @Override public Object getDisplayValue(Object object) { final String result = (String) super.getDisplayValue(object); return Strings.escapeMarkup(result, true, true).toString(); } @Override public String getIdValue(Object object, int index) { final String result = (String) super.getIdValue(object, index); return Strings.escapeMarkup(result, true, true).toString(); } }; As you can see I took the result and changed it with the Strings utility. Do you think it's a bug in Wicket and I should open a Jira issue? Or is the Palette works as wanted and my change is normal? BTW, we use Wicket 1.3.6 Thanks Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Bug in AbstractOptions of Palette?
Hello, We encountered a small problem in our Palette. Some of the values that were supposed to be in the choices (available and/or selected) had the '' and '' . Because of that the options weren't rendererd correctly. Looking at AbstractAction#onComponentTagBody I saw that it takes the value as it is and put it in the html: String value = getConverter(displayClass).convertToString(displayValue, getLocale()); where displayValue is Object displayValue = renderer.getDisplayValue(choice); In my code I overridden the getDisplayValue and getDisplayId of the renderer: IChoiceRenderer choiceRenderer = new ChoiceRenderer(getFieldName, getFieldName) { private static final long serialVersionUID = 1L; @Override public Object getDisplayValue(Object object) { final String result = (String) super.getDisplayValue(object); return Strings.escapeMarkup(result, true, true).toString(); } @Override public String getIdValue(Object object, int index) { final String result = (String) super.getIdValue(object, index); return Strings.escapeMarkup(result, true, true).toString(); } }; As you can see I took the result and changed it with the Strings utility. Do you think it's a bug in Wicket and I should open a Jira issue? Or is the Palette works as wanted and my change is normal? BTW, we use Wicket 1.3.6 Thanks Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: Bug in AbstractOptions of Palette?
open a jira issue -igor On Thu, Jul 30, 2009 at 1:39 AM, Eyal Golanegola...@gmail.com wrote: Hello, We encountered a small problem in our Palette. Some of the values that were supposed to be in the choices (available and/or selected) had the '' and '' . Because of that the options weren't rendererd correctly. Looking at AbstractAction#onComponentTagBody I saw that it takes the value as it is and put it in the html: String value = getConverter(displayClass).convertToString(displayValue, getLocale()); where displayValue is Object displayValue = renderer.getDisplayValue(choice); In my code I overridden the getDisplayValue and getDisplayId of the renderer: IChoiceRenderer choiceRenderer = new ChoiceRenderer(getFieldName, getFieldName) { private static final long serialVersionUID = 1L; �...@override public Object getDisplayValue(Object object) { final String result = (String) super.getDisplayValue(object); return Strings.escapeMarkup(result, true, true).toString(); } �...@override public String getIdValue(Object object, int index) { final String result = (String) super.getIdValue(object, index); return Strings.escapeMarkup(result, true, true).toString(); } }; As you can see I took the result and changed it with the Strings utility. Do you think it's a bug in Wicket and I should open a Jira issue? Or is the Palette works as wanted and my change is normal? BTW, we use Wicket 1.3.6 Thanks Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org