GetElement
You can review the details about the getElement JSP function.
Description
This JSP function gets the YFCElement object that resides in a specific namespace. You can use this function to obtain a handle to the YFCElement and subsequently manipulate the XML in the YFCElement object.
YFCElement is a part of the DOM utility package. To see the APIs available in this package, refer to the Javadoc.
Syntax
YFCElement getElement(String nameSpace)
Input parameters
nameSpace - Required. Namespace that contains the YFCElement needs to be returned.
Output parameters
YFCElement - Required. YFCElement object that resides in the namespace provided.
Example
This example shows how the Return detail view controls whether the active or inactive state of the Schedule operation uses this function.
The Schedule operation is not valid for draft orders.
The getOrderDetail() API returns DraftOrderFlag attribute in the XML.
This flag is Y when the order is draft order, and N otherwise.
This must be converted into another flag that is opposite in meaning. As a result, use an attribute called ConfirmedFlag, which is N when the order is a draft order and Y when the order is no longer a draft order.
<%
YFCElement elem=getElement("Order");
if (elem != null) {
//Flip the draft order flag into confirmed flag.
elem.setAttribute("ConfirmedFlag", !isTrue("xml:/Order/@DraftOrderFlag"));
}
%>