How messageTextInput element readonly on loading the page dynamically?

Hi all
This is my requirement. I have a point message text entry populated on load of the page attributeX of the VO. I need to check the condition of attributeY! = pageContext.getUserName () and if he is convinced that I have to make the item messageTextInput as read only when the page is loaded. To do this, I wrote the following code in the form request process.


vo.executeQuery ();
If (VO. GetCurrentRow.GetAttribute ("attributeY")! = pageContext.getUserName ())
{
OAMessageTextInputBean bean = (OAMessageTextInputBean) webBean.findChildRecursive ("txtItem");
bean.setReadOnly (Boolean.FALSE);
}

Copy the following code throws exceptions. Also if I don't give the if condition and just trying to make the point to read only the loading of the page, it does not take exception, but does not in read-only mode.


Please let me know how to solve this problem.

Thank you
Sunny

Sunny,

Can you check after the vo run the query, your VO have rows by
vo.getFetchedRowCount (),

And then do vo.first () and then only the if condition,

Inside the if condition add some diagnostic message to check, your state of health is coming inside.
print the values for vo.getCurrentRow.getAttribute ("attributeY"), pageContext.getUserName)

And if you compare the string, you must use api .equals
If (!) (vo.getCurrentRow.getAttribute("attributeY").equals (pageContext.getUserName ())))

Thank you.

With respect,
Kali.
OSSI.

Tags: Oracle Applications

Similar Questions

Maybe you are looking for