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!

How to set a default input value in a form generated with CreateInsert ?

user5414451Nov 11 2011 — edited Nov 11 2011
All,
it's embarrassing to ask such an easy question, but anyway:

I have an ADF Form on a jspx page, and a "CreateInsert" button on it.

When I display the page, the view fields contain the values of the first record of the view table. So far so good.

When I click on the CreateInsert button, a new empty record will created, and all the input fields on the view are empty.

But what I really need, is to populate some field with a default value; how to do that ?

I know I can set a default value in the property of the input text on the view, but that value will only be shown when the page is loaded; when I then click on the CreateInsert button, that value is substituted with an empty value.

I'm also aware, that I can set a default value in the entity object implementation, where the attribute value will set, but is there any way to do that ? Fact is, the value I would like to give, comes from another java class - a bean, which has nothing to do with the object implementation class..

So, instead of an empty value, how can I set a default value ?

Regards,
Sergio.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 9 2011
Added on Nov 11 2011
6 comments
1,199 views