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

Accessing the data of Table and manipulating it

Hi

I've a table which returns data from RFM, on the basis of data I've to get checkboxes check/unchecked.

The ModelNode is of following type:

-0CONTEXT

|-Model_Input

|-EventId

|-EventValue

Now based on the value returned by EventValue i'll check the values of 2 checkBoxes.

The context for the view is

-0Context

|-Z_sd_Input

| |-EventID

| |-EventValue

|-Check1

|-Check2

I've binded my table with EventID, EventValue, Check1 and Check2.

Now on the basis of each rows returned under the EventID & EventValue, I'll have to put the check or uncheck values in the table.

I'm using following code:

for(int i = 0;wdContext.node<model>.size();i++)

{

if(wdContext.node<model_input>.getEventValue equals("2")

{

wdContext.setCheck1(true);

wdContext.setCheck2(false);

}

}

But this code is not validating the condition. and puts all the checkboxes as true and false respectively.

So for data under the EventValues have to be read and for each of them i've to give appropriate checks.. how do i do that

Say the table return looks like this:

EventId EventVal Check1 Check2

Volume 2 true true

Weight 1 false true... and so on.

Can somebody provide solution for it.

Thanks in advance

Srikant

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 23, 2005 at 09:32 AM

    Add a value node (cardinality=1:1, singleton=false) under the model node, and move the attributes "Check1", "Check2" into this node. Define those attributes as "calculated".

    In the get-method of each calculated attribute, you get the containing node element as a parameter. Depending on this parameter value, return the calculated value of "Check{1,2}".

    Armin

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 23, 2005 at 09:25 AM

    Hi Srikant,

    If i am not wrong you can't use the following code

    "if(wdContext.node<model_input>.getEventValue equals("2")"

    Try using the following in the for loop.

    if(wdContext.node<model_input>.getElement(i).getAttributeValue("EventValue").equals("2")

    Regards, Anilkumar

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 23, 2005 at 09:27 AM

    Hi Venkata,

    Please refer to the weblog /people/sap.user72/blog/2005/03/15/supply-functions-in-webdynpro

    Hope this helps,

    Best Regards,

    Nibu.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 23, 2005 at 11:24 AM

    Hi Venkat

    Check for event value of the model node as follows

    If (wdContext.node<model_node>.get<model_node>elementat(i).getEventValue().equals("2"))

    ...

    Regards

    NagaKishore

    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.