RE: BSelect and HTML Formatting
Kirk Daries <[email protected]>
| Newsgroups | gmane.comp.java.enhydra.barracuda.general |
|---|---|
| Message-ID | <D09B591872D1D611AF2B0010B5A1AAD07BF415@WCSMAIL> |
To follow up my own message.
The problem seems to be the decode method???
The deprecated method
urlDecoder.decode("kirk%A0daries")
Seems to work.. but not...
urlDecoder.decode("kirk%A0daries", "UTF-8")
Apologies for the newbie type questions... but I've a bit confused...?
> -----Original Message-----
> From: Kirk Daries
> Sent: 30 June 2003 04:51
> To: '[email protected]'
> Subject: BSelect and HTML Formatting
>
> Hi Guys,
>
> Question?
> Why doesn't BSelect have an 'allowMarkupInText' method?
>
> I have a need to 'format' the outputted BSelect text.
> Specifically, I need to be able to convert 'spaces' to
>
> Now... in jdk1.3, it was suggested to me that I use '\u00a0' to represent
> the html space-character.
> This worked fine.. until I moved on to jdk1.4 recently...
>
> When trying to 'decode' the any incomming url's using:
> urlDecoder.decode(urlString, "UTF-8")
>
> The decode mechanism just replaces the (\u00a0)spaces with a question
> mark...
>
> Tried changing to 'UTF-16'.. but obviously.. that's not going to work for
> a form submit.
>
>
> Here's my function:
> private String covertSpacesToHtmlNBSP(String stringToConvert) {
> stringToConvert = SitawcString.replace(stringToConvert, " ",
> "\u00a0");
> return stringToConvert;
> }
>
>
> The quickest fix at the moment would be to replace it with:
> private String covertSpacesToHtmlNBSP(String stringToConvert) {
> stringToConvert = SitawcString.replace(stringToConvert, " ",
> " ");
> return stringToConvert;
> }
>
> But BSelect renders the options elements 'as-is'.
> So that's not viable either.
>
> Secondly:
> I think we need a BOptions class to represent a single entry in BSelect.
> In other words, DefaultItemMap can contain the 'key/value' data, and the
> BOptions class, data about the appearance of the option element.
> With newer browsers it's possible to change the appearance of each
> induvidual option elements.
>
> Eg.
> Check out the combo box examples at http://webfx.eae.net/
>
> In the mean time.
> Can someone point me in the right direction with regards to the decoding
> of '\u00a0'.
>
> Thanx
> KD
>
>
>
>