cancel
Showing results for 
Search instead for 
Did you mean: 

Logic in Web Dynpro code

Former Member
0 Kudos

Hi,

I am developing application in Java Web Dynpro.

The Java WebDynpro does not Java Doc as we have in Java Coding.

If there is any Java WebDynpro Doc which deals with Web Dynpro coding, please specify.

I am clarifying my understanding of this even handler:

public void onActionShowNextQuestionPressed(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
  {
    //@@begin onActionShowNextQuestionPressed(ServerEvent)
	wdContext.nodeQuizData().moveNext(); 
	  wdThis.wdGetShowNextQuestionPressedAction().setEnabled(true);
	  //--- hide Next button, if last question is reached
	  if (wdContext.nodeQuizData().getLeadSelection() == wdContext.nodeQuizData().size()-1) {
		wdContext.currentContextElement().setNextButtonVisibility(WDVisibility.BLANK);  
	  }        
	  wdThis.wdFirePlugShowQuestionMarkOut();    
    //@@end
  }

This even handler is linked with a button in view.

There is a node QuizData() (View Context Value Node) which has three attribute elements:

1> Question,

2> Counter

and 3> NextButtonVisibility .

The Question and Answer attribute values in View Question is connected with Component Controller Context attribute values Question and Answer.

The Component Controller has context which has Value Node QuizData() and has four attribute values

1> Question,

2> Counter,

3> Answer and

4> TextMessage.

The above code tells that

wdContext.nodeQuizData().moveNext();

means has the ability to move to the next value. moveNext() is a loop type of method.

wdThis.wdGetShowNextQuestionPressedAction().setEnabled(true);

means that for this instance of the Attribute Node ShowNextQuestionPressedAction() should be

set to true that means this action will work.

//--- hide Next button, if last question is reached

if (wdContext.nodeQuizData().getLeadSelection() == wdContext.nodeQuizData().size()-1) {

wdContext.currentContextElement().setNextButtonVisibility(WDVisibility.BLANK);

If the Current Selection is the last but previous element, set the Next Button Visibility as Blank.

wdThis.wdFirePlugShowQuestionMarkOut();

This Node Instance is connected or instantiated with Fire Plug ShowQuestionMarkOut();

Please clarify if my understanding is wrong.

Regards

Kaushik Banerjee

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI,

"wdThis.wdFirePlugShowQuestionMarkOut();

This Node Instance is connected or instantiated with Fire Plug ShowQuestionMarkOut(); "

this does not mean that node instance is connected with fire plug...

it means that on action , this view will navigate to another view

through this out bound plug.

u can open the navigation modeller by right clicking on the window name under windows, and see the navigations between the views with the plugs.

in the plugs tab of the view u can find the names of the plugs defined.

Regards,

Satya.

Answers (0)