cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to display the Node context attributes to table

0 Kudos

Hi Friends,

Issue: Currently i am reading the Node parameters and assigning the parameters to the Context of the mainView.

Then displaying the attributes into table here i am using a iterator to fetch the attributes.

But its reading only one record to the table not all the attributes.

Here i am attaching the code:

Node is EvaluationDimensions and attributes are Dimension and Selected_values.

Line: -


public void wdDoInit()

{

//@@begin wdDoInit()

try

{

IBONodeElement test = null;

test = (IBONodeElement)wdThis.wdGetDefinedimensiongafController().wdGetContext().nodeEvaluationDimensions().currentEvaluationDimensionsElement().model();

IBONode testNode = test.getBONode();

Iterator it = testNode.iterator();

IBONodeElement itElement = null;

while(it.hasNext())

{

itElement = (IBONodeElement)it.next();

//wdContext.nodeEvaluationDimensions().createAndAddEvaluationDimensionsElement();

wdContext.createAndAddEvaluationDimensionsElement();

wdContext.currentEvaluationDimensionsElement().setDimension(itElement.getAttributeValue("KPIParameterDefinitionName").toString());

wdContext.currentEvaluationDimensionsElement().setSelected_Values(itElement.getAttributeValue("ParameterSelectedValuesText").toString());

}

} catch (RuntimeException e) {

e.printStackTrace();

wdThis.wdGetDefinedimensiongafController().wdGetAPI().getComponent().getMessageManager().reportSuccess(e.toString());

}

//@@end

}

Line: -


Could you suggest me some alternatives to show all records into table??

Thanks & Best Regards, Prabhu(9886855725)

Edited by: Armin Reichert on Apr 24, 2008 12:57 PM

Accepted Solutions (1)

Accepted Solutions (1)

venkatakalyan_karanam
Active Contributor
0 Kudos

Hi Prabhu

IBONodeElement test = null;

test = (IBONodeElement)wdThis.wdGetDefinedimensiongafController().wdGetContext().nodeEvaluationDimensions().currentEvaluationDimensionsElement().model();

What is this model() .

You remove the try catch method once and test it to trace the error.Why cant you use typed AccessAPI to fetch the values from the node element.Is your node have more elements test it.By getting the size of the node.

That too you are setting values to only current context element .Not for other elements.Everytime you are setting the values to current context element,thats why you are getting only one element values at a time.Iterate properly and try to set the values for each element

wdContext.currentEvaluationDimensionsElement().setDimension(itElement.getAttributeValue("KPIParameterDefinitionName").toString());

See the above code every time you are setting to currentNode lement notforother elements.

Regards

kalyan

Answers (4)

Answers (4)

0 Kudos

Thank you friends for ur support..

My answer got solved.

Best Regards, Prabhu

Former Member
0 Kudos

Hi,

If you are working with GCP.

I would suggest you to create a ICMI generic model node and then bind your IBONode to this than doing all this coding.

Regards

Ayyapparaj

Former Member
0 Kudos

Hi Prabhu,

I could not understand your requirement fully. Am not able to get why you have to write so much code in wdInit. You can do Mapping from Controller to view of the node to get the values. I believe you may have some reason to write so much code which I am not able to get.

Nevertheless, on going through your code I believe you can add following line of code

wdContext.nodeEvaluationDimensions().moveLast();

This code have to be added after following line of code:

wdContext.createAndAddEvaluationDimensionsElement();

Regards,

Gopal

Former Member
0 Kudos

Hi Prabhu

Create an array. Add all the node elements to the array and then bind that array to the context node.

Thanks

Vidyadhar