Thursday, 27 May 2010

Use the current row attribute value in an El expression

You have for example a table with two columns empid and empname, and want to use the value of the attribute empid of the current selected row in an El expression. To do that you must create an attribute binding for the current row attribute.

So, navigate to the PageDef file of your page, in binding press the + icon, choose in the combo: Generic Binding, and then choose AttributeValues, then select the data control of your view object and then choose the attribute to read the value from, in this case the empid.

Now you can use this El expression: #{bindings.empid.inputValue}, this expression is the value of attribute empid of the current selected row.

Friday, 21 May 2010

How to change the binding of a list item to point to another data control


I have a view object with bind variables, the values for my bind variables are assigned in ExecuteWithParams action.

One of this bind variables on my page is a list item, this list item is binded to a datacontrol and now I want to change it , because I put all my queries for lovs on a shared application module.
So now I must point this list item to this shared app data control.

On the page I select my list item, press right mouse button and select Go to binding:


It shows the page data binding definition: 


Press in executables the pencil to edit the list binding:



Now I can change the list data source to point to another application module data control, I press add button: 



And I select there my data control that now is on a shared application module: 


That's all you can run and test the page.

Monday, 10 May 2010

Timezone Error: ORA-01882: timezone region not found

If you get this error on Jdeveloper 11g when running an application module or running a page you must set the timezone on the project properties as java options.

Go to model project properties to run/debug/profile :














Press edit and in java options type: -Duser.timezone="-03:00" and type your timezone:














Press ok, and do the same to viewcontroller project.

If the error appears on an standalone weblogic, if your weblogic is in windows, stop weblogic server, then go to:
c:\user_projects\domains\bin\setDomainEnv.cmd find:
set EXTRA_JAVA_PROPERTIES and add before %WLS_JDBC_REMOTE_ENABLED%

-Duser.timezone="-03:00"

It must be like this:
set EXTRA_JAVA_PROPERTIES ……. -Duser.timezone="-03:00" %WLS_JDBC_REMOTE_ENABLED% EXTRA_JAVA_PROPERTIES%

Start weblogic server. 

Now i have another weblogic server on suse 10, and this timezone -03:00 do not work, instead i modified the setDomainEnv.sh like this: -Duser.timezone=GMT