Thread: com.sun.faces.el.ValueBindingImpl@a4f80e


Permlink Replies: 5 - Pages: 1 - Last Post: Mar 15, 2007 2:15 PM Last Post By: RadoK
V.Piraba

Posts: 70
Registered: 06/22/06
com.sun.faces.el.ValueBindingImpl@a4f80e
Posted: Mar 14, 2007 8:00 AM
Click to report abuse...   Click to reply to this thread Reply
Hi,

I get the following error message that doesn’t look nice at all.


com.sun.faces.el.ValueBindingImpl@a4f80e - Value required.

Is there any way that I can display the field label from property bundle instead of com.sun.faces.el.ValueBindingImpl@a4f80e

For example Place of birth - Value required where ‘Place of birth’ is from property bundle.

Regards
V.Piraba

Message was edited by:
V.Piraba
V.Piraba

Posts: 70
Registered: 06/22/06
Re: com.sun.faces.el.ValueBindingImpl@a4f80e
Posted: Mar 14, 2007 12:14 PM   in response to: V.Piraba in response to: V.Piraba
Click to report abuse...   Click to reply to this thread Reply
Any reply please?
RadoK

Posts: 300
Registered: 06/05/06
Re: com.sun.faces.el.ValueBindingImpl@a4f80e
Posted: Mar 14, 2007 12:43 PM   in response to: V.Piraba in response to: V.Piraba
Click to report abuse...   Click to reply to this thread Reply
Hi,
create managed bean with public method getPlaceOfBirth() and change your label to
label="#{yourBundleBeen.placeOfBirth}"
The method retrieves message from resource bundle.

For java class resource bundle the method can look like:
    public String getPlaceOfBirth() {
        return getMsg("PlaceOfBirth");
    }
 
    private String getMsg(String key) {
        UIResources bundle = new UIResources();
        FacesContext ctx = FacesContext.getCurrentInstance();
        Locale locale = ctx.getViewRoot().getLocale();
        ResourceBundle rbundle = 
            bundle.getBundle("com.xxx.view.resources.UIResources", locale);
        return rbundle.getObject(key).toString();
    }
(UIResources - resource bundle class)

I hope similar technique can be used for resource property files.

Rado
V.Piraba

Posts: 70
Registered: 06/22/06
Re: com.sun.faces.el.ValueBindingImpl@a4f80e
Posted: Mar 15, 2007 7:24 AM   in response to: RadoK in response to: RadoK
Click to report abuse...   Click to reply to this thread Reply
Thank you Rado,

My application got lots and lots of fields, so I don't think that I would create a managed bean with public method. If I do this way, then I need to change all my labels and its very time consuming and the deadline is very close. Thank you for your help anyway.

Regards
V.Piraba
Tif

Posts: 191
Registered: 08/03/06
Re: com.sun.faces.el.ValueBindingImpl@a4f80e
Posted: Mar 15, 2007 7:49 AM   in response to: V.Piraba in response to: V.Piraba
Click to report abuse...   Click to reply to this thread Reply
Hi V.Piraba,

I'm not sure to well understand your problem, but in the doubt...
When creating a form using ADF you can specify if the field is required or not. For example with <af:inputText label="myLabel" binding="#{....}" id="inputText1" required="true" />
Finally if user try to submit the form without fill one field qualified as required, a message is displayed with the information about which field(s) is(are) missing
If that can help you, think to [SOLVED]

Cheers,
Tif
RadoK

Posts: 300
Registered: 06/05/06
Re: com.sun.faces.el.ValueBindingImpl@a4f80e
Posted: Mar 15, 2007 2:15 PM   in response to: V.Piraba in response to: V.Piraba
Click to report abuse...   Click to reply to this thread Reply
Hi,
yes, this is really annoying. I had the same problem and the answer I gave you is what I got from Oracle support.
Check Note 363365.1 on metalink or this post: http://forums.oracle.com/forums/thread.jspa?messageID=930020
for explanation.

Do you have enabled client side validation? There is no problem with validation messages in javascript dialog.

Rado
Legend
Guru Guru : 2500 - 1000000 pts
Expert Expert : 1000 - 2499 pts
Pro Pro : 500 - 999 pts
Journeyman Journeyman : 200 - 499 pts
Newbie Newbie : 0 - 199 pts
Oracle ACE Director
Oracle ACE Member
Oracle Employee ACE
Helpful Answer (5 pts)
Correct Answer (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums