on 06-11-2008 4:02 AM
Hi guys....
I faced with this "problem" a lot of times and I think that is very common....
Well, to explain better: You have an Model Node ( an Adaptive RFC Model for instance) . This node must to be used to populate a IWDTable, but you need to have another attributes ( like enabled, visibility, join attribute values, format some value, etc )....
Well, in the NW2004 the horrible workaround was create a Model Node into your context and add the "value attributes" BEFORE binding with the Model, but in 2004s ( or 7.0 ) it doesn't work... Another solution is create a value node with a similar structure ( plus the extra attributes ) and copy the values from the Model Node....
Is There another solution to solve this problems? I m thinking in create a JavaModel, that executes the RFCModel and provide the right structure, but some types of attributes ( visibility for example ) are View responsibility and not Model... Did I forget some part of the documentation ( from IWDNode, IWDTable or another one )???
Thanks a lot
Hi,
Create a model node and make a copy of created node. Now rename copied model node and add extra attributes. This is the easiest way to do.
Thanks
Krishna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alexander,
If you want value attributes under Model Node structure create a ValueNode under such ModelNode having 1:1 cardinality and keep all value attributes related to visibility or any calculated attributes under this 1:1 cardinality ValueNode.
Regards,
Gopal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Christopher,
Try following code:
int leadSelection = wdContext.nodeModel().getLeadSelection();
for (int i = 0; i < wdContext.nodeModel().size(); i++)
{
wdcontext.nodeModel().setLeadSelection(i);
wdContext.currentValueElement().setAtt4("Att4 Value");
}
wdcontext.nodeModel().setLeadSelection(leadSelection);
I hope nodeValue has cardinality 1:1
Also make sure nodeValue has singleton property set to false.
Regards,
Gopal
Edited by: Gopal on Jun 13, 2008 4:55 PM
One more question regarding this topic:
I use the ModelNode to show values in a table. This works perfectly with the addes valueNode.
But i have implement the TableFilter and here i get the error message "attributeInfo must not be null".
This results becauce the iterator of my sourceNode (my ModelNode) don't get the values in my valueNode!
my example
modelNode
- att1
- att2
- att3
valueNode
- att4
- att5
The iterator of my modelNode (which is created in TableFilter class) contains only 3 values!!
how can is solve that??
@Alexandre
Did you solve your problem? Want to do the same..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
By your post I understud that... you have a Model Node ( an Adaptive RFC Model for instance) with this you are populating a table and also you want to have some more attributes ( like enabled, visibility, join attribute values, format some value, etc ).... rigth?
under your Model Node (your Adaptive RFC Model) crate another Model node ( right click on RFC Model node -> new -> Model node) and in properties make "singleton" as "false" and then you can add Model Attributes as enabled, visibility like that.
This is the simplest way. and I worked on this a year back.
regards,
Pradeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
"Another solution is create a value node with a similar structure ( plus the extra attributes ) and copy the values from the Model Node.... "
I think this is a comfortable way doing that, don't know how to make that easier..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I didn't get your point exactly. From what I understood, you can make sub nodes within a model node where you can place value attributes and can have attributes with calculated property.
nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
9 | |
9 | |
8 | |
7 | |
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.