cancel
Showing results for 
Search instead for 
Did you mean: 

onEnter to display short desc of input ID

Former Member
0 Kudos

This is what I am trying to do:

When user keyed in division ID, eg: "00" and he press enter, the TextView element (which is binded to a value element, will contain the desc of the division ID.

However the problem is when I changed the value of what is in the input box, eg: to "01" and I press enter. The desc inside the value element is still showing the previous ID's and not updated automatically.

The following code is what happened when I press enter:

" wdContext.nodeCheck_Division().currentCheck_DivisionElement().setDivision(wdContext.nodeHeader().currentHeaderElement().getDIVISION());

wdThis.wdGetDemoWSControllerController().checkDivision();

wdContext.currentContextElement().setDivisionDesc(" " + wdContext.nodeDivisionDT1().currentDivisionDT1Element().getName() + " ");"

What I am trying to do in the above code is to set the input context values into the model of checkDivision, THEN, I run checkDivision(). Lastly, I get the results from the result node of checkDivision() and assigned it to the value node that displays the description.

Please help!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Invalidate the nodes before settign the value.

EX: wdContext.nodeCheck_Division().invalidate();

wdContext.nodeHeader().invalidate();

Regards,

Lavanya.G

Former Member
0 Kudos

Hi there,

I tried to invalidate but it does not work..

Former Member
0 Kudos

Hey it works..

I realise I need to validate the result node instead of the input node. My mistake.

But my question is.. why do i still need to invalidate the result node, when in the checkDivision, I have already done the invalidate after the execution?

wdContext.currentRequest_Check_DivisionElement().modelObject().execute();

// Sync data in the context with data from the model.

wdContext.nodeCheck_DivisionResponse().invalidate();

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi expert..

firstly you have to check cerdinality should be 1:1

value nodecardinality-1:1

you can check take cardinality 1:1...

thanks

jati

Former Member
0 Kudos

Hi,

The code looks fine for me..

wdComponentAPI.getMessageManager().reportSuccess(wdContext.nodeCheck_Division().currentCheck_DivisionElement().getDivision);

Please write this code above wdThis.wdGetDemoWSControllerController().checkDivision(); and check what value you getting.If you are getting the correct value here then check your logic in checkDivision(); method.

Regards,

Jithin