on 11-19-2008 2:59 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.