Skip to Content
author's profile photo Former Member
Former Member

chtmlb displayMode

Hi,

I'm trying to display a button only if the fields are not in display only mode. Currently I have the following code:

<chtmlb:config displayMode = "<%= controller->view_group_context->is_view_in_display_mode( controller ). %>"

mode = "RUNTIME" />

<%@extension name="/QAS/V6BPL_BSP_EXT" prefix="QAS" %>

<%

if displayMode = 'INITIAL'.

%>

<QAS:button_thtmlb applicationName = "<%= controller->application_name %>"

applicationNamespace = "<%= controller->application_namespace %>"

componentId = "<%= controller->component_id %>"

controllerName = "<%= controller->controller_name %>"

text = 'Search B2B' />

<%

endif.

%>

I am getting the error DisplayMode is not known.

Appreciate your help.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Dec 14, 2011 at 04:35 PM

    Hi Jamie,

    displayMode is an attribute of BSP extension chtmlb and hence can't be outside the chtmlb tag.

    Try this code:

    <%
    data: lv_displaymode type abap_bool.
    lv_displaymode = controller->view_group_context->is_view_in_display_mode( controller ).
    %>
    

    Now you can use value in variable lv_displaymode to achieve your requirement.

    Thanks

    Vishal

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.