cancel
Showing results for 
Search instead for 
Did you mean: 

Table column mapped to value node - the same values in all rows..

Former Member
0 Kudos

Hi guys,

The scenario I have is simple & straightforward (but still not working ..):

One Webdynpro View and one Controller; Controller's context have a value node Visibility with single value attribute VisAttr. The node & attribute from the controller's context are mapped to the view's context.

So far, so good, I am filling the controller's node with:

List elements = new ArrayList();

for (int i=0; i<XXX; i++) {

IZZZ.IVisibilityElement el = wdContext.createVisibilityElement();

el.setVisAttr(Y); // PUT DIFFERENT VALUES HERE!

elements.add(el);

}

wdContext.nodeVisibility().bind(elements);

When I iterate over the node Visibility in the controller everything seems OK, but when I set the value to be bound to a table column element in the view, all the values in this collumn are the same, even I've put different values in the attribute (see the comment above).

Do you have an idea what might be wrong?

Thanks,

Lalo

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Just assure that the datasource property of the table is mapped to the same node whose attribute has been mapped to the column property.

eg. your context structure is node1-->attribute1

then datasource property of your table should be binded to node1 and the column of that table should be node1-->attribute1

Regards,

Murtuza

Former Member
0 Kudos

Hi Murtuza,

In my case the table datasource is bound to different node, than the specific column I want to bind.

Is it possible to bind this specific column to different node attribute or should I create another (new) node that contains the data from both the nodes aggregated ...?

Thanks,

Lalo

Former Member
0 Kudos

You must add any additional attributes used to control row properties under the table data source node.

Armin

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi all,

I was happy to see that this question is answered. I have a similar problem.

I have a table bound to a context node,. One column in the table is a textedit. The user can enter text specific to one particular row. But when i click on Save button the same text appears in all the rows.

Please tell me how you solved this problem.

Also on click of Save button a the execute method of a service needs to be called. And this is not happening. Kindly let me know what could be the problem.

Thanks & Regards,

Srilakshmi B

p_2_5_6_9_6_0
Active Participant
0 Kudos

Hi,

You cannot add a static "Y" inside a when looping over "i". You need to ensure that "Y" changes along with X. Try the modified code below.

List elements = new ArrayList();

for (int i=0; i<XXX; i++) {

IZZZ.IVisibilityElement el = wdContext.createVisibilityElement();

el.setVisAttr(i); // Change Y to i

elements.add(el);

}

wdContext.nodeVisibility().bind(elements);

That should give you an idea of what is erroneous in the code.

Thanks.

HTH.

p256960

former_member1
Active Participant
0 Kudos

The following code will help creating

Please modify the code accordingly.... to your needs

wdContext.nodeParticipant_VROP().invalidate();

for(i=0;i<wdContext.nodeParticipant_VROP().size();i++){

IPublicRoom_ReservationComp.IVn_reservationdetailsElement reservationDetails = wdContext.createVn_reservationdetailsElement();

reservationDetails.setVa_checkboxenable(true);

wdContext.nodeVn_reservationdetails().addElement(reservationDetails);

}

Former Member
0 Kudos

Hi,

what is the meaning of this statement // PUT DIFFERENT VALUES HERE!

when i try your code with below change it works fine.

el.setVisAttr("the value"+i); // just pass loop variable i.

table ui element dataSource is bind with node "Visibility".

and column cell editor is bind with attribute "VisAttr ".

just check binding once again.

Still problem exists post your complete code ?

Regards,

ramesh

Edited by: Ramesh Babu V on Nov 19, 2008 8:56 PM

Former Member
0 Kudos

Hi,

Have a workaround to invalidate your visibility node some where in your code probably in the begining of the for loop or might be just before binding ArrayList to your node.

wdContext.nodeVisiblity().invalidate()

Regards

Raghu

Former Member
0 Kudos

Hi again,

@Raghu: invalidation still does not help..

It is really strange because when iterating over the Value node elements they show the correct attribute values:

Visibility0=NONE

Visibility1=NONE

Visibility2=VISIBLE

Visibility3=NONE

Visibility4=NONE

Visibility5=VISIBLE

but when binded to table column entry all I have in all rows is NONE (probably the value in the first node element!?)

Thanks again,

Lalo