when the page is initially rendered, i have requirement to have the page automatically retrieve rows that belong to the user (ie execute a search programatically)
to achieve that i did the following -
1. created search page using autocustomizationcriteria
2. mapped all search fields to corresponding VO fields ( i intend to not override the default where clause since all my search can directly be mapped to a VO attribute)
3.populated the userlogin value into the corresponding search field as follows -
String lg = pageContext.getUserName();
OAMessageLovInputBean lovBean = (OAMessageLovInputBean)webBean.findChildRecursive("searchLogin"); //the searchfield is a messageLOVInput
the behavior i was expecting is for the page to automatically generate the where clause since i populated the search field that is mapped to the VO attribute and execute the query (i did not invoke executequery() per dev guide) BUT instead it is executing a BLIND query with no where clause.
would appreciate any insight into what i am doing wrong....
Get a handle to the VO.
Set the where clause and execute it Programatically.
Are there any other associated beans(like formValue) for the LOV, 'searchLogin' to be set?For eg: UserId.
Also, if it is a Custom Search Page, see whether the 'Admin seeded views' can help you meet the requirement.
hi, i had initially done the setting of the whereclause and executing programatically. however, when you do that, subsequently, the 'Go' button also needs to be handled programatically (including all search criteria whereclause generation) and then you loose all the features of the queryBean especially the different search options (eg like , starts with etc) on the Advanced Panel unless you code for all those features yourself...... NOTE - the need to handle the 'Go' button yourself happens even though after executeQuery() for just the initial page load, i reset the whereclause and whereclauseparams to NULL....
i also do not have a formvalue associated with the searchlogin field.
any other inputs please ?
Edited by: user8249972 on Jan 28, 2013 10:22 AM