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

Input field onfocus event

Hi ,

I am trying to get sum of rows as soon as I enter table rows at runtime.

I am able to get the sum on click of button ,but I want to get the sum as soon as I enter value for at runtime.

Is it possible.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 06, 2008 at 03:29 PM

    The best you can achieve ist to update the sum using the InputField.onEnter event which is triggered by pressing the "Enter" key inside the input field.

    Armin

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 06, 2008 at 03:36 PM

    Ya I am aware of onenter action but is there any other solution for this

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 06, 2008 at 03:40 PM

    Web Dynpro doesnt support low events like onFocus etc.

    Best solution in Web Dynpro is by using calculated attribute for total. Create context Attribute "Total" of type "string", "ReadOnly" : true; and "calculated":true. It will automatically creates one method something like getTotal() for you. In that method write code to loop over the table and and return the sum as String.

    Sometime you may not see updated value until next server round trip. I agree, this is not a foolproof way. But that is best you can do.

    Cheers,

    ~kranthi

    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.