วันพุธที่ 2 พฤศจิกายน พ.ศ. 2559

[OA Framework] findIndexedChildRecursive, findChildRecursive ใช้ต่างกันอย่างไร

findIndexedChildRecursive หรือ
public OAWebBean findIndexedChildRecursive(String name)
ใช้สำหรับค้นหา component ด้วย index จาก child/grandchild ด้วยการระบุชื่อ
findChildRecursive หรือ
public OAWebBean findChildRecursive(String name)
ใช้สำหรับค้นหา component ทั้ง Index และ Name จาก child/grandchild ด้วยการระบุชื่อ
ทั้งสอง method จะคืนค่า null หากไม่พบ component ตรงกับชื่อที่ต้องการค้นหา
ปล. หากเราไม่แน่ใจว่าชื่อที่เราต้องการค้นหาเป็น Index หรือ Name ของ component ขอแนะนำให้ใช้ findChildRecursive ในการค้นหาครับ เพราะจะค้นหาทั้ง index และ name