cancel
Showing results for 
Search instead for 
Did you mean: 

How to get value from table coloumn cell variant

Former Member
0 Kudos

Hi Experts,

I have created two cell variant in table coloum..Now i want to retrieve the cell variant value in table coloum....

I have checked some condition based upon the requirement.

Here is the code...

for (int i = 0; i < size; i++)

{

IPrivateView.IFieldsElement add =

Node.geFieldsElementAt(i);

if (condition)

{

add.setCellVariant(View.DATE);

add.setasDate(add.getvalue);

}

else

{

add.setCellVariant(View.STRING);

add.setasString(addt.getValue());

}

}

The above code is not receiving values..

So Please Tell me, How to get values from cell variant in a table column.

Thanks & Regards

Mathi

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Mathi,

The code for setting the values is correct.

Just assure that both your conditions are valid and either of the one is fulfilled.

I assume the value of <b>size = wdContext.nodeFields().size();</b>

Warm Regards,

Murtuza

Former Member
0 Kudos

Hi,

Thanks for ur reply...

setasDate-->It is bind to first input field

setCellVariant-->it bind to cell variant(table coloum)

setasString-->it is bind to second input field

[bgetValue(</b>-->it is mapped to controller, but it is not bound to any other ui's.

In this case how to get and pass the value..In addition i want to pass to bapi getting field from cell variant....

Thanks& Regards

Mathi s

Former Member
0 Kudos

Hi Mathi,

What I understood is, you have an input field binded to asDate context attribute binded to an input field and whatever you enter in this field should be displayed in the table's column CellVariant.

I assume that asDate context is not inside a node and directly under the root node. If the structure of your context or the requirement is different then give its details.

node.setCellVariant(wdContext.currentContextElement().getasDate());

Regards,

Murtuza

Former Member
0 Kudos

Hi,

I want to receive the value enterd in input field and pass it to bapi....Please tel me...

Former Member
0 Kudos

Hi,

Assume you have a context of type String called name binded to an input field that you want to pass it to bapi.

Let your input model node name be modelnode which in turn has username as its attribute.

You can pass the value to bapi as follows:

try

{

modelnode input = new modelnode();

input.setUsername(wdContext.currentContextElement.getName());

wdContext.nodeModelnode().bind(input);

wdContext.nodeModelnode().currentModelnode().ModelObject().execute();

}

catch(Exception e)

{

//handle exception

}

Regards,

Murtuza

Former Member
0 Kudos

Ok...I can't type in that input field...This is the problem..

Structur is

Table col

-->first inputfield in cellvariant

-->Scond inputfield in cellvariant

Former Member
0 Kudos

Hi,

Change the cardinality of the node to 1:n from 0:n.

Regards,

Murtuza