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

How can I capture the value of the tag in MVC page?

HI Experts:

I use "<thtmlb:inputfield>" and "<thtmlb:dropdownLIstBox>" in the page of the view.

Now I want to capture the value of the inputfield and dropdownListBox in the event that is triggered when a button tag of the page in the htm is Clicked, the event is in the view controller implementation class, but I don't now which sentence can capture the value.

Please help me. Thanks.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Sep 10, 2010 at 11:00 AM

    HI,

    For input field, take this as example

    <%@page language="abap"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    <htmlb:content design="design2003">
      <htmlb:page title = " ">
        <htmlb:form>
     <htmlb:inputField id            = "fieldId"
                            invalid        = "true"
                            value          = "<%=ld_fieldid%>"
                            required       = "true"/>
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    

    suppose this is ur layout and now in your code handle_event,you can handle the value which is there in the input field

    as

    DATA: data_input  TYPE REF TO cl_htmlb_inputfield,
            ld_fieldid  TYPE string.
    
      data_input ?= cl_htmlb_manager=>get_data(
                                          request = runtime->server->request
                                          name    = 'inputfield'
                                          id      = 'fieldId' ).
      IF data_input IS NOT INITIAL.
        ld_fieldid = data_input->value.
      ENDIF.
    

    This is how you can hadle the input field values

    Cheers,

    Bhavana

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 10, 2010 at 11:03 AM

    For dropdown paste your code so that i can help you out

    cheers,

    bhavana

    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.