How to fetch a bean in Advanced Search Panel

Normally, when we want to get handle of any bean in the page , we use webBean.findChildRecursive(“<id of bean>”) method. But to get handle of a criteria bean in advanced search panel, this will not work.

Example, lets say we have a advanced search panel and the first criteria Row has a message text input field with id Emp.

Now if we write webBean.findChildRecursive(“Emp”), it returns null. This is because, the framework dynamically allocates a different id of the form “Value_n” for each criteria row created in the page.

sample code :

    OAAdvancedSearchBean advBean = (OAAdvancedSearchBean)webBean.findChildRecursive(“AdvancedSearchBean”);
    OAMessageTextInputBean empNum = (OAMessageTextInputBean)advBean.findChildRecursive(“Value_x”);

where x stands for xth criteria row in the advanced search panel. i.e if empNum is the first criteria row in your page, then give Value_0 as id.

This entry was posted in OAF. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s