cancel
Showing results for 
Search instead for 
Did you mean: 

How can I show an Icon in the tapStripItem-title?

RoBu
Explorer
0 Kudos

Hi All,

this is my Code...

==============


<%@page            language            =        "ABAP"%>
<%@extension       name                =        "HTMLB"
                   prefix              =        "HTMLB"%>
<%@extension       name                =        "XHTMLB"
                   prefix              =        "XHTMLB"%>
<HTMLB:content     design              =        "DESIGN2003"
                   forceEncode         =        "ENABLED"
                   controlRendering    =        "SAP">
<HTMLB:document>
<HTMLB:documentHead/>
<HTMLB:documentBody>
<HTMLB:form        id                  =        "Test">
<XHTMLB:tabStrip   id                  =        "Test"
                   brandingNotchVisible=        "FALSE">
<XHTMLB:tabStripItem
                   title               =        "ICON_LED_GREEN = @5B@"
                   name                =        "Strip1">
                   Test<br>Test<br>Test
</XHTMLB:tabStripItem>
<XHTMLB:tabStripItem
                   title               =        "ICON_LED_RED =  @5C@"
                   name                =        "Strip2">
                   Test<br>Test<br>Test
</XHTMLB:tabStripItem>
<XHTMLB:tabStripItem
                   title               =        "ICON_LED_YELLOW =  @5D@"
                   name                =        "Strip3">
                   Test<br>Test<br>Test
</XHTMLB:tabStripItem>
</XHTMLB:tabStrip>
<HTMLB:image       src                 =        "ICON_LED_GREEN"/>
<HTMLB:image       src                 =        "ICON_LED_RED"/>  
<HTMLB:image       src                 =        "ICON_LED_YELLOW"/>
</HTMLB:form>
</HTMLB:documentBody>
</HTMLB:document>
</HTMLB:content>

...and this is my Question:

====================

Is it possible - show the real Icon in the tapStripItem-title

Regards

RoBu di AQu

Accepted Solutions (1)

Accepted Solutions (1)

RoBu
Explorer
0 Kudos

Is there no solution for my problem?

athavanraja
Active Contributor
0 Kudos

its because of

<HTMLB:content design = "DESIGN2003"

forceEncode = "ENABLED"

either remove forceEncode attribute or change it like below

<HTMLB:content design = "DESIGN2003"

<b>forceEncode="BACKWARDS_COMPATIBLE"</b>

Regards

Raja

athavanraja
Active Contributor
0 Kudos

is your question answered? Reward the helpful answers by cliking the radiobutton

Regards

Raja

RoBu
Explorer
0 Kudos

Hello Raja,

you are Super - many Thanks!

RoBu di AQu

Answers (2)

Answers (2)

RoBu
Explorer
0 Kudos

Hello Thomas,

thanks for your response.

Now I create the IMAGE_STRING.

only <%=IMAGE_STRING%> shows me the Icon "CECKED" correct

but

<XHTMLB:toolbarButton
                   id                  =        "UserSelectionCancel"
                   onClientClick       =        "closeiframe();"
                   text                =        "<%=IMAGE_STRING%>"/>

or

<HTMLB:button      id                  =       "UserSelectionCancel"
                   encode              =       "FALSE"
                   text                =       "<%=IMAGE_STRING%>"/>

or

<HTMLB:link        id                  =       "Test1"
                   onClick             =       "request"
                   text                =       "<%=IMAGE_STRING%>"/>

give me this back:

<img class="urImg urV" src="/sap/public/bsp/sap/public/bc/icons/s_S_OKAY.gif" id="htmlb_image_1" ct="Image" border="0">

Any Help?

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I don't know if this definetely works with tabstrips items but it does work with buttons and toolbar buttons. What I do is create a BEE and render that to a string. I then use that string as the text of the element I want to place my image into:

         <%
  data image type ref to cl_htmlb_image.
  data: image_string type string.
  create object image.
  image->id = `UserSelectionCancel2`.
  image->src = cl_bsp_mimes=>sap_icon( `ICON_CHECKED` ).
  image->tooltip = ``.
  clear image_string.
  image_string = image->IF_BSP_BEE~RENDER_TO_STRING( page_context ).
            %>
            <xhtmlb:toolbarButton id            = "UserSelectionCancel"
                                  onClientClick = "closeiframe();"
                                  enabled       = "<%= enabled %>"
                                  text          = "<%= image_string %>" />