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

calling a subcontroller

hi all,

i have a problem regarding calling a subcontroller on pushbutton event. Actually i want to display a tableview in tray through this subcontroller.

The content of tableview is coming according to my queries but the tray is not displaying.

In runtime error i find that error is <htmlb:tray> Class <htmlb:event>(cl_htmlb_content) was not found as BSP parent elemnt.

I am not able to figure out it completely as my scenario is very much similar to what has been given in ITMVC2 application.And there is not much

difference in key things.

Followings are code of view table.htm of my subcontroller table.do where i think problem lies.

<%@page language="abap" %>

<%@extension name="htmlb" prefix="htmlb" %>

<htmlb:tray id="detail" title="Employee details" design="form" width="100%" isCollapsed="false">

<htmlb:tableView id="tvX" width="100%" visibleRowCount="5" table="<%=model->emplist%>">

</htmlb:tableView>

</htmlb:tray>

Thanks for any suggestion and help.

Amit Kumar

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 16, 2005 at 08:58 AM

    HI AMIT,

    In your layout,

    In your first view, where you are inputting the value, to be queried ,does that page contain the tag

    <htmlb:content>?

    Ex:

    <htmlb:content id="ComponentTest" >

    <htmlb:page title="Component Test" >

    <H1>Component Test</H1>

    <htmlb:form id = "myFormId"

    method = "post" >

    <htmlb:tray id = "tray01"

    design = "form"

    isCollapsed = "true"

    title = "Material List to raise MRF"

    width = "400" >

    <htmlb:trayBody>

    <%

    IF uitab is not initial.

    %>

    <htmlb:tableView id = "tab01"

    table = "<%= uitab %>"

    visibleRowCount = "10"

    headerText = "Shortage Material List"

    headerVisible = "true"

    width = "100%"

    footerVisible = "false" >

    </htmlb:trayBody>

    </htmlb:tray>

    </htmlb:form>

    </htmlb:page>

    <b></htmlb:content></b>

    Also, if you have added this in your first view, if you are calling the second view on the same page,then you don't have to add the Content tag again on the second view.

    Hope this helps,

    Regards,

    Siddhartha

    Message was edited by: Siddhartha Jain

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Maximilian Schaufler

      HI,

      Right Max,

      You always put things in a Clear perspective. 😊

      I also told Amit,that you have to write the <htmlb:content> tag in your parent window,the one which he is inputting the query (main controller).From there if sub controller is called, then no need for <content> tag,but if he navigating to some other controller,like with view in which he displaying his query result in tableview ,then he needs to include that tag also.

      Regards,

      Siddhartha

  • author's profile photo Former Member
    Former Member
    Posted on Sep 27, 2005 at 06:31 PM

    Hi all,

    This is my layout of parent view.

    %@page language="abap"%>

    <%@extension name="htmlb" prefix="htmlb"%>

    <htmlb:content design="design2003">

    <htmlb:page title="Welcome">

    <H1>Welcome</H1>

    <htmlb:form >

    <htmlb:textView text = "Welcome <%=logname%>"

    design = "EMPHASIZED" /><br>

    <htmlb:textView text = "Your job specification:<b><%=post%></b>" /><br>

    <table id="search" >

    <tr>

    <td><htmlb:label text="Search employee list for manager" tooltip="Display Employee List" design="EMPHASIZED" id="manager" for="manager"/>

    <htmlb:inputField id="manager" design="standard" visible="true"/></td>

    <td><htmlb:button id = "go"

    text = "Go"

    onClick = "go" /></td>

    </tr>

    </table>

    </htmlb:form>

    </htmlb:page>

    </htmlb:content>

    This is the layout of subcontroller's view

    <%@page language="abap" %>

    <%@extension name="htmlb" prefix="htmlb" %>

    <htmlb:tray id="emplist"

    title="Employee details"

    design="form"

    width="100%"

    isCollapsed="false">

    <htmlb:trayBody>

    <htmlb:tableView id="tvX"

    width="100%"

    visibleRowCount="5"

    table="<%=model->emplist%>" />

    </htmlb:trayBody>

    </htmlb:tray>

    Please find out mistakes in above codes as i am unable to solve my problem and if any further information is needed let me know.

    I am using tray in subcontroller which is initially inactive after button event it gets active.

    Message was edited by: amit kumar

    Add a comment
    10|10000 characters needed characters exceeded

    • I don't have time to look into this more, so unless someone else can test this I would suggest you get rid of all activating/deactivating stuff.

      Use a variable (like show_tray) to trigger including of your subcontroller depending on your input - if it is not included, it won't show - if it is included, it does.

      No need for activating/deactivating (as I'm not sure what effects these methods have at all, don't take their method names for granted to do what you want).

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.