cancel
Showing results for 
Search instead for 
Did you mean: 

Set data into Model Node on Navigating from a View

Former Member
0 Kudos

Hi Gurus,

Need your assistance with an issue that I am facing.

I am developing an ESS application and it has two perspectives.

1st Perspective contains - View1 and NavView

2nd Perspectice contains - View2 and NavView

I have created a dynamic ValueNode in View1 and on navigating to View2, I want the data in the ValueNode to be updated into a ModelNode.

The problem I am facing is,

1. I have the <b>actionOnNavigation</b> in the <b>NavView</b> whereas my data is in the <b>View1</b>.

I tried setting the data into ModelNode in the <i>wdDoExit</i> of <b>View1</b>, but it doesnt help.

I have the <i>Life_Span</i> property set to "<i>WHEN_VISIBLE</i>", but still, dont think the wdDoExit() of <b>View1</b> is being called.

Any suggestions on how/ where I can set the data into my ModelNode?

Thanks in advance.

Anjana R.

Message was edited by:

Anjana Raghav

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi anjana,

Your questions is kind of confusing. You are saying two perspective, I think its not valid. May be you have two different component controllers. Can you repost clearly.

Regards

Praveen

Former Member
0 Kudos

I am sorry, Praveen. Yes, I have a component controller for each View.

Let me know if any more details are required.

Thanks.

Message was edited by:

Anjana Raghav

Former Member
0 Kudos

Hi Gurus,

Any idea on this question?

I would like to know where I can set my data into the ModelNode before Navigating away from that view? <i>The data is in a dynamic context.</i>

I can't write it on the onAction() method, coz action is defined in another view.

Any suggestions? Is it a flaw in the design?

Thanks in advance

Anjana R.

Former Member
0 Kudos

Hi,

Where is this model node? What is this NavView? Just check if this is your scenario:

Component 1: View 1 (Do you have one more view called NavView here?)

Component 2: View 2 (Do you have one more view called NavView here?)

Regards,

Satyajit.

Former Member
0 Kudos

Hi,

You can set the model node onAction() of plug while navigating to your view2. Map this node via your controller to both these views. Now you will be able to access it from the view2.

thanks & regards,

Manoj

Former Member
0 Kudos

Yes Satyajit, you got the scenario right.

The Model Node is accessible to both the components. But the data that I need to upload to model is only in Component1.

NavView is the View that I am using to contain all the Navigation buttons, and depending upon the Perspective, I m showing the relevant ones.

Thanks for your reply and time.

Anjana R.

Former Member
0 Kudos

Hi Manoj,

The problem is, my data is in <b>View1</b> and onAction() is in <b>NavView</b>.

So, I am not able to set the model in onAction().

Thanks for the reply.

Anjana R.

Former Member
0 Kudos

Hi,

K you have ur data in a value node in View 1. You need to execute the model in Nav view with the data of ur View 1. right???

If so do you have values pre filled in the value node in view 1? Then just do a context mapping between ur View1 and Nav View via Component controller. Now ur data will be available in the Nav view automatically.

Regards,

Nagarajan.

Former Member
0 Kudos

Hi Nagarajan,

The context node in View1 is dynamically generated. How can I do context mapping for dynamic context nodes?

Any suggestions?

Thanks,

Anjana R.

Former Member
0 Kudos

Hi,

Use

IWDNodeInfo addMappedChild(String name, Class elementClass,

CMICardinality selection,

String mappedPath,

boolean selectionMapped, boolean initializeLeadSelection);

void setMapping(IWDNodeInfo mappedNode, boolean selectionMapped);

Regards

Ayyapparaj

Former Member
0 Kudos

Hi,

Go through thread.

Regards,

Satyajit.

Former Member
0 Kudos

Thanks Satyajit and Ayyapparaj, Dynamic Context mapping solves my issue. Guess, I was looking it in all the wrong directions.

Thanks for putting me on track.

Regards

Anjana R.

Answers (0)