E20-455 Free Dumps Study Materials
Question 24: Given the following onInit() methods for two components:
In component A:
public void onInit(ArgumentList args)
{
super.onInit(args);
ArgumentList args2= new ArgumentList();
args2.add("MyArg", "MyValue");
setComponentNested ("B", args2, getContext(), this);
}
In component B:
public void onInit(ArgumentList args)
{
super.onInit(args);
String myVal = args.get("MyArg");
System.out.println (myVal);
}
The println statement returns null for myVal.
What is the likely cause of this?
A. ArgumentLists can not be passed between components.
B. ArgumentLists always start out empty in onInit() methods.
C. MyArg is not defined in the <params> element of the component definition B.
D. The ArgumentList for component A is independent of the ArgumentList for component B.
Correct Answer: C