You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Igor Vaynberg (JIRA)" <ji...@apache.org> on 2009/08/03 02:19:14 UTC

[jira] Updated: (WICKET-2407) AbstractOptions of Palette may cause an HTML error with illegal chars

     [ https://issues.apache.org/jira/browse/WICKET-2407?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg updated WICKET-2407:
----------------------------------

    Priority: Minor  (was: Major)

> AbstractOptions of Palette may cause an HTML error with illegal chars
> ---------------------------------------------------------------------
>
>                 Key: WICKET-2407
>                 URL: https://issues.apache.org/jira/browse/WICKET-2407
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 1.3.6
>         Environment: Win XP, embedded Jetty / JBOss
>            Reporter: Eyal Golan
>            Assignee: Igor Vaynberg
>            Priority: Minor
>             Fix For: 1.4.1
>
>
> 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);
> Example fix:
> 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();
>             }
>         };

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.