cancel
Showing results for 
Search instead for 
Did you mean: 

Any way to create a span object?

Former Member
0 Kudos

Hi, I understand that there is no htmlB tag but I was wondering if there is a way I can create a <span> object or somthing similar using an SAP api call?

Something like:

<b>Span s1 = new Span("some_css_class");

Image img1 = new Image("c:", "testAlt");

s1.add(img1);</b>

In html this would translate something like

<b><span ...>

<img...>

</span></b>

If possible, can you provide any short code samples for reference. Thank you so much for your help, any comments or suggestions are greatly appreciated!!

Thanks so much,

Baggett

Accepted Solutions (1)

Accepted Solutions (1)

darrell_merryweather
Active Contributor
0 Kudos

Can you not simply use HTML instead, as its much easier

I hope this helps

D

Former Member
0 Kudos

Hi Darrell, thanks for your response. I cannot use html b/c I will be getting xml file(full of only <span>, <img> elements) from the server and then I will use create java objects to build the page.

Thanks so much again,

Baggett

Former Member
0 Kudos

As you build the page, you can use

bwForm.addRawText("<span>");

// add any other image to the form or anything

bwForm.addRawText("</span>");

Hope that helps.

Regards,

JP

Former Member
0 Kudos

Hi John, thank you for your response John! I just have 2 questions regarding it:

1. Where can I find more info on bwForm? Is it a java class in the api?

2. In your experience, there is no actual api call to create a span object?

Thanks so much for your response and as Darrell said, I might just go with simple html.

Thanks so much,

Baggett

Former Member
0 Kudos

Baggett,

1. The forum object is part of JSPDynpag & Dynpage class.

Form form = this.getForm();

form.addRawText("<span>Baggett Soran</span>");

2. There is no api to generate "<span>" tag.

regards

Prakash

Former Member
0 Kudos

Hi Prakash, thanks for your response ! I was wondering how can I contact you with questions regarding the code you sent me, should I post a question here, or through your email?

Thanks so much!

Baggett

Former Member
0 Kudos

It's up to you.

Answers (0)