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