I would like to display it as an option LABEL.

To test this, from within my GenericSelectOption<T> class - I've explicitly
made the label a list of special characters:

    public List<OptionModel> getOptions()
    {
        List<OptionModel> optionModelList = new ArrayList<OptionModel>();
        for (Initiative obj : this.list)
        {
            optionModelList.add(new OptionModelImpl(*"&nbsp; &ni; &amp;
&nbsp;"*, obj));
        }
        return optionModelList;
    }


and for what its worth from tapestry's OptionModelImpl:

public class OptionModelImpl extends AbstractOptionModel
{
    public OptionModelImpl(String label, Object value)
    {
        this.label = label;
        this.value = value;
    }


and in this case, I'm seeing

<option value="Notebook">&amp;nbsp; &amp;ni; &amp;amp; &amp;nbsp;</option>

outputt'd to the page.

-Luther

...
}





On Tue, Mar 3, 2009 at 12:58 PM, Thiago H. de Paula Figueiredo <
thiag...@gmail.com> wrote:

> Em Tue, 03 Mar 2009 14:58:05 -0300, Luther Baker <lutherba...@gmail.com>
> escreveu:
>
>  I have implemented this and which to display a special character in the
>> drop down. &ni; Only, whenever I return this via the 'toClient' method of
>> the ValueEncoder for this, the result ends up being &amp;ni; which prints
>> miserably.
>> Is there a different way to feed the String value into Tapestry such that
>> it won't convert '&' to &amp; -- or, is there a better way to push special
>> characters into the drop down options.
>>
>
> Do you want to output &ni; as an option value or as an option label?
> ValueEncoders are used to produce the value. OptionModer is the one which
> carries the labels.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to