Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

groovy expression as default value in a Entity's Field Problem

772286Sep 6 2011 — edited Sep 7 2011
Hi to everyone again.

Now I have a problem with the groovy expression in a entity object ( Model Proyect ).

I have a Entity with many fields, now, in three fields I need to put values in the entity object (I choose the : expression option in the EO ) as :

Field's name value
user adf.context.securityContext.userName
user_area_code adf.userSession.userData.usercodebind
user_department adf.userSession.userData.userdepartmentbind

In the applicationmoduleImpl Class I have methods to register the following values :

adf.userSession.userData.usercodebind
adf.userSession.userData.userdepartmentbind

By Example for this groovy expression : 'adf.userSession.userData.usercodebind'
I have the following source code:

public class applicationmoduleImpl {

.....

public void registerUserCode()
{
.......................
......................

this.getSession().getUserData.put( "usercodebind" , < some_value > );

System.out.println( "<AppModule> User Code = " + < some_value > );

} // end function


} // end AppModule.


Now, when I intend insert a new row in the entity object, it show me a error Message, ---> JBO: 25030

JBO-29000: Unexpected exception caught: oracle.jbo.InvalidOwnerException, msg=JBO-25030: Detail entity Solicitud with row key null cannot find or invalidate its owning entity.



Why the groovy expression IS NOT executed in the Entity Object ??
and why the groove expression IS executed in a View Criteria ???

Can you help me please , I need those values in my Entity Object as default values.

JDeveloper version is : Studio Edition Version 11.1.2.0.0
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 5 2011
Added on Sep 6 2011
4 comments
1,331 views