question on textView.appendMarkup(String)

0 views
Skip to first unread message

zlu

unread,
Jul 23, 2009, 2:07:42 PM7/23/09
to Google Wave API
I'm new to wave. I'd like to display a hyperlink in a blip.

Blip blip = wavelet.appendBlip();
TextView textView = blip.getDocument();
textView.append("some text");
String location = "location of an audio file";
String locationMarkup = "<a href=" + location + ">play</a>";
log.info("appending markup: " + locationMarkup);
textView.appendMarkup(locationMarkup);

"some text" shows up fine but the locationMarkup doesn't. I would
like to click on the hyperlink and hear the audio for testing. Is
this approach going to work?

Any examples of using appendMarkup is appreciated as I can't google
any.

zlu

unread,
Jul 23, 2009, 1:33:43 PM7/23/09
to Google Wave API

mohit chavakula

unread,
Jul 24, 2009, 4:45:37 AM7/24/09
to google-...@googlegroups.com
I guess its a problem with your locationMarkup string.
It should be:


String locationMarkup = "<a href=\"" + location + "\">play</a>";


zlu

unread,
Jul 24, 2009, 11:28:05 AM7/24/09
to Google Wave API
That was it. Thanks :)

On Jul 24, 1:45 am, mohit chavakula <mohit.i...@gmail.com> wrote:
> I guess its a problem with your locationMarkup string.
> It should be:
>
> String locationMarkup = "<a href=\"" + location + "\">play</a>";
>

Tei

unread,
Jul 24, 2009, 4:56:51 AM7/24/09
to google-...@googlegroups.com
some nitpicking:

String locationMarkup = "<a href='" + location + "'>play</a>";

anyway the example looks wrong to me, location has to be urlencoded.

"hello world.php?id=1&cool=full awesome"
has to be "hello%20world.php?id=1&amp;cool=full+awesome"

On Fri, Jul 24, 2009 at 10:45 AM, mohit chavakula<mohit...@gmail.com> wrote:
> I guess its a problem with your locationMarkup string.
> It should be:
>
> String locationMarkup = "<a href=\"" + location + "\">play</a>";
>
>

> On Thu, Jul 23, 2009 at 11:37 PM, zlu <zhao....@gmail.com> wrote:
>>
>> I'm new to wave.  I'd like to display a hyperlink in a blip.
>>
>>                        Blip blip = wavelet.appendBlip();
>>                  TextView textView = blip.getDocument();
>>                        textView.append("some text");
>>                        String location = "location of an audio file";
>>                        String locationMarkup = "<a href=" + location +
>> ">play</a>";
>>                        log.info("appending markup: " + locationMarkup);
>>                        textView.appendMarkup(locationMarkup);
>>
>> "some text" shows up fine but the locationMarkup doesn't.  I would
>> like to click on the hyperlink and hear the audio for testing.  Is
>> this approach going to work?
>>
>> Any examples of using appendMarkup is appreciated as I can't google
>> any.
>>
>>


--
--
ℱin del ℳensaje.

Reply all
Reply to author
Forward
0 new messages