You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Mathias Walter <ma...@gmx.net> on 2008/01/16 22:22:31 UTC

[Trinidad] MissingResourceException

Hi,

I've declared:

private org.apache.myfaces.trinidad.component.core.nav.CoreCommandLink
editLink;

Than I bound a commandLink to this backing beans variable.

In a backing bean method I'm calling:

		if (editLink != null && editLink.isRendered())

If I request the page, I get the following error:

java.util.MissingResourceException: Can't find bundle for base name
javax.el.LocalStrings, locale de_DE


If I comment out "editLink.isRendered()", it works well.

What's wrong?

BTW: I'm using Trinidad 1.2.5 with JSF 1.2 RI.

--
Kind regards,
Mathias


RE: conversion in jsf

Posted by Yaron Spektor <ya...@b6systems.com>.
Thanks for your answer,

I Googled it and found your article about customizing it for JSF.

I was wondering though, can I get the default property resolver to work
for me in cases where I do not use the binding (I am creating a
framework that does not use the concept of binding but would like to
engage the existing JSF code to do the job for it)

Any hints would be great.

 

Yaron 

 

________________________________

From: Cagatay Civici [mailto:cagatay.civici@gmail.com] 
Sent: Wednesday, January 16, 2008 5:46 PM
To: MyFaces Discussion
Subject: Re: conversion in jsf

 

When you bind sth, like #{mybean.someInteger}

The property resolver resolves the type of someInteger property to an
integer, and later this is used to figure out the necessary converter to
use automatically, in this case it is numberconverter to convert the
submitted string value to an integer. This is same in other cases. 

In order to override this process, write a converter and add it via
<f:converter tag or the converter attribute. So your converter will be
picked before jsf tries to identify a converter by type.

Cagatay 

On Jan 17, 2008 12:10 AM, Yaron Spektor <ya...@b6systems.com>
wrote:

Hi ,
I was wondering about the conversion mechanism that is done
automatically in jsf.
When I bind a value to an input field, for example, how and where in the
code does JSF realize which converter to setup ( Long or a String etc.) 
I see it is doing it, I know how to override it but I am interested to
know the inside details of it.

Thanks,
Yaron

 


Re: conversion in jsf

Posted by Cagatay Civici <ca...@gmail.com>.
When you bind sth, like #{mybean.someInteger}

The property resolver resolves the type of someInteger property to an
integer, and later this is used to figure out the necessary converter to use
automatically, in this case it is numberconverter to convert the submitted
string value to an integer. This is same in other cases.

In order to override this process, write a converter and add it via
<f:converter tag or the converter attribute. So your converter will be
picked before jsf tries to identify a converter by type.

Cagatay

On Jan 17, 2008 12:10 AM, Yaron Spektor <ya...@b6systems.com> wrote:

> Hi ,
> I was wondering about the conversion mechanism that is done
> automatically in jsf.
> When I bind a value to an input field, for example, how and where in the
> code does JSF realize which converter to setup ( Long or a String etc.)
> I see it is doing it, I know how to override it but I am interested to
> know the inside details of it.
>
> Thanks,
> Yaron
>
>

RE: [Trinidad] MissingResourceException

Posted by Mathias Walter <ma...@gmx.net>.
Hi,
 
Gerhard, you are right. I made a mistake and created a recursion:
 
<tr:commandLink id="edit" binding="#{cm.editLink}"
actionListener="#{cm.edit}" text="Edit" partialSubmit="true"
rendered="#{cm.visibleOnly}" immediate="true"/>

and the bean function:
 
public boolean isVisibleOnly() {
    if (editLink != null && !editLink.isRendered())
        visibleOnly = false;
    return visibleOnly;
}

Since the rendered el expression calls isVisibleOnly and this function calls
isRendered of the same component, a recursion occurs.
 
My initial problem is that IE 6 does not display partially renderend pages
correctly, if I use the back button immediately followed by the forward
button. Is that a knowing problem? I tried to disable caching without luck.
 
--
Kind regards,
Mathias

-----Original Message-----
From: Gerhard Petracek [mailto:gerhard.petracek@gmail.com] 
Sent: Thursday, January 17, 2008 4:49 PM
To: MyFaces Discussion
Subject: Re: [Trinidad] MissingResourceException


hello mathias,

as matthias already mentioned:
please provide detailed information.


so the following part is just a guess:

it sounds like you have an invalid page. 
please have a second look at your page and the used el expressions.

alternative:
please have a look at the el-impl you are using.
does the (binary) jar file contain the following file?
com\sun\el\Messages.properties 

if it is missing you can use the following workaround:
use the Messages.properties file of the el-impl sources jar file.
-> add the file to the classpath (don't forget the package)
-> result: com.sun.el.Messages will be available

-> you will see an error message which describes the real problem (instead
of the MissingResourceException).

regards,
gerhard




2008/1/16, Matthias Wessendorf < matzew@apache.org>: 

can u provide some more stack? 

-M

On Jan 16, 2008 1:22 PM, Mathias Walter <ma...@gmx.net> wrote:
> Hi,
>
> I've declared:
>
> private org.apache.myfaces.trinidad.component.core.nav.CoreCommandLink 
> editLink;
>
> Than I bound a commandLink to this backing beans variable.
>
> In a backing bean method I'm calling:
>
>                 if (editLink != null && editLink.isRendered ())
>
> If I request the page, I get the following error:
>
> java.util.MissingResourceException: Can't find bundle for base name
> javax.el.LocalStrings, locale de_DE
>
>
> If I comment out "editLink.isRendered()", it works well.
>
> What's wrong?
>
> BTW: I'm using Trinidad 1.2.5 with JSF 1.2 RI.
>
> --
> Kind regards,
> Mathias 
>
>



--
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org





-- 

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and 
Courses in English and German

Professional Support for Apache MyFaces 


Re: [Trinidad] MissingResourceException

Posted by Gerhard Petracek <ge...@gmail.com>.
hello mathias,

as matthias already mentioned:
please provide detailed information.


so the following part is just a guess:

it sounds like you have an invalid page.
please have a second look at your page and the used el expressions.

alternative:
please have a look at the el-impl you are using.
does the (binary) jar file contain the following file?
com\sun\el\Messages.properties

if it is missing you can use the following workaround:
use the Messages.properties file of the el-impl sources jar file.
-> add the file to the classpath (don't forget the package)
-> result: com.sun.el.Messages will be available

-> you will see an error message which describes the real problem (instead
of the MissingResourceException).

regards,
gerhard



2008/1/16, Matthias Wessendorf <ma...@apache.org>:
>
> can u provide some more stack?
>
> -M
>
> On Jan 16, 2008 1:22 PM, Mathias Walter <ma...@gmx.net> wrote:
> > Hi,
> >
> > I've declared:
> >
> > private org.apache.myfaces.trinidad.component.core.nav.CoreCommandLink
> > editLink;
> >
> > Than I bound a commandLink to this backing beans variable.
> >
> > In a backing bean method I'm calling:
> >
> >                 if (editLink != null && editLink.isRendered())
> >
> > If I request the page, I get the following error:
> >
> > java.util.MissingResourceException: Can't find bundle for base name
> > javax.el.LocalStrings, locale de_DE
> >
> >
> > If I comment out "editLink.isRendered()", it works well.
> >
> > What's wrong?
> >
> > BTW: I'm using Trinidad 1.2.5 with JSF 1.2 RI.
> >
> > --
> > Kind regards,
> > Mathias
> >
> >
>
>
>
> --
> Matthias Wessendorf
>
> further stuff:
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> mail: matzew-at-apache-dot-org
>



-- 

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Re: [Trinidad] MissingResourceException

Posted by Matthias Wessendorf <ma...@apache.org>.
can u provide some more stack?

-M

On Jan 16, 2008 1:22 PM, Mathias Walter <ma...@gmx.net> wrote:
> Hi,
>
> I've declared:
>
> private org.apache.myfaces.trinidad.component.core.nav.CoreCommandLink
> editLink;
>
> Than I bound a commandLink to this backing beans variable.
>
> In a backing bean method I'm calling:
>
>                 if (editLink != null && editLink.isRendered())
>
> If I request the page, I get the following error:
>
> java.util.MissingResourceException: Can't find bundle for base name
> javax.el.LocalStrings, locale de_DE
>
>
> If I comment out "editLink.isRendered()", it works well.
>
> What's wrong?
>
> BTW: I'm using Trinidad 1.2.5 with JSF 1.2 RI.
>
> --
> Kind regards,
> Mathias
>
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org

conversion in jsf

Posted by Yaron Spektor <ya...@b6systems.com>.
Hi ,
I was wondering about the conversion mechanism that is done
automatically in jsf.
When I bind a value to an input field, for example, how and where in the
code does JSF realize which converter to setup ( Long or a String etc.)
I see it is doing it, I know how to override it but I am interested to
know the inside details of it.

Thanks,
Yaron