You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Alexandre Poitras <al...@gmail.com> on 2006/04/19 21:37:11 UTC

List-entries problem

Hi all,

I am trying to construct a little demo and I have a bean which has an
ArrayList type property. I am initializing the property using the
managed beans facilities but each declared entry seems to be added two
times. Any ideas why?

Here's the managed bean declaration

        <managed-bean>
		<managed-bean-name>ficheAssiduite</managed-bean-name>
		<managed-bean-class>
			ca.qc.gouv.msp.fse.logiqueaffaire.bos.FicheAssiduite
		</managed-bean-class>
		<managed-bean-scope>application</managed-bean-scope>
		<managed-property>
			<property-name>absences</property-name>
			<value>#{absences}</value>
		</managed-property>
        </managed-bean>

	<managed-bean>
		<managed-bean-name>absences</managed-bean-name>
		<managed-bean-class>java.util.ArrayList</managed-bean-class>
		<managed-bean-scope>none</managed-bean-scope>
		<list-entries>
			<value>#{absence1}</value>
		</list-entries>
	</managed-bean>

        <managed-bean>
		<managed-bean-name>absence1</managed-bean-name>
		<managed-bean-class>
			ca.qc.gouv.msp.fse.logiqueaffaire.bos.Absence
		</managed-bean-class>
		<managed-bean-scope>none</managed-bean-scope>
		<managed-property>
			<property-name>code</property-name>
			<property-class>java.lang.String</property-class>
			<value>test1</value>
		</managed-property>
		<managed-property>
			<property-name>description</property-name>
			<property-class>java.lang.String</property-class>
			<value>test1</value>
		</managed-property>
	</managed-bean>

* Usually I construct most of my beans using Spring so I may do
something very wrong :)

--
Alexandre Poitras

Re: List-entries problem

Posted by Martin Marinschek <ma...@gmail.com>.
Ah, no.

then it was Dennis ;)

regards,

Martin

On 4/20/06, Matthias Wessendorf <ma...@apache.org> wrote:
> from FacesConfigurator:
>
> if(log.isWarnEnabled() && DEFAULT_FACES_CONFIG.equals(systemId))
>                     log.warn(DEFAULT_FACES_CONFIG + " has been
> specified in the " +
>                             FacesServlet.CONFIG_FILES_ATTR + " context
> parameter of " +
>                             "the deployment descriptor. This should be
> removed, " +
>                             "as it will be loaded twice.  See JSF spec
> 1.1, 10.3.2");
>
>
>
> On 4/20/06, Mario Ivankovits <ma...@ops.co.at> wrote:
> > Martin Marinschek schrieb:
> > > We should have a warning for that in the new release - I think Mario
> > > did implement it.
> > >
> > No, I didnt implemented such a thing.
> > Someone implemented stuff to check the beans at al, dont know if this
> > covers the faces-config.xml too.
> >
> > Ciao,
> > Mario
> >
> >
>
>
> --
> Matthias Wessendorf
> Aechterhoek 18
> 48282 Emsdetten
> http://jroller.com/page/mwessendorf
> mwessendorf-at-gmail-dot-com
>


--

http://www.irian.at

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

Professional Support for Apache MyFaces

Re: List-entries problem

Posted by Matthias Wessendorf <ma...@apache.org>.
from FacesConfigurator:

if(log.isWarnEnabled() && DEFAULT_FACES_CONFIG.equals(systemId))
                    log.warn(DEFAULT_FACES_CONFIG + " has been
specified in the " +
                            FacesServlet.CONFIG_FILES_ATTR + " context
parameter of " +
                            "the deployment descriptor. This should be
removed, " +
                            "as it will be loaded twice.  See JSF spec
1.1, 10.3.2");



On 4/20/06, Mario Ivankovits <ma...@ops.co.at> wrote:
> Martin Marinschek schrieb:
> > We should have a warning for that in the new release - I think Mario
> > did implement it.
> >
> No, I didnt implemented such a thing.
> Someone implemented stuff to check the beans at al, dont know if this
> covers the faces-config.xml too.
>
> Ciao,
> Mario
>
>


--
Matthias Wessendorf
Aechterhoek 18
48282 Emsdetten
http://jroller.com/page/mwessendorf
mwessendorf-at-gmail-dot-com

Re: List-entries problem

Posted by Mario Ivankovits <ma...@ops.co.at>.
Martin Marinschek schrieb:
> We should have a warning for that in the new release - I think Mario
> did implement it.
>   
No, I didnt implemented such a thing.
Someone implemented stuff to check the beans at al, dont know if this
covers the faces-config.xml too.

Ciao,
Mario


Re: List-entries problem

Posted by Martin Marinschek <ma...@gmail.com>.
We should have a warning for that in the new release - I think Mario
did implement it.

regards,

Martin

On 4/20/06, Alexandre Poitras <al...@gmail.com> wrote:
> That did the try. Thank a lot, I would have never figured out that by myself.
>
> On 4/20/06, Alexandre Poitras <al...@gmail.com> wrote:
> > Thank I will give it a try :)
> >
> > On 4/19/06, Mike Kienenberger <mk...@gmail.com> wrote:
> > > On 4/19/06, Alexandre Poitras <al...@gmail.com> wrote:
> > > > I am trying to construct a little demo and I have a bean which has an
> > > > ArrayList type property. I am initializing the property using the
> > > > managed beans facilities but each declared entry seems to be added two
> > > > times. Any ideas why?
> > >
> > > It seems highly unlikely in your case, but on the off-chance it's relevent....
> > >
> > > Normally whenever "two times" and "faces-config" are mentioned in the
> > > same message, it's caused by declaring /WEB-INF/faces-config.xml in
> > > your javax.faces.CONFIG_FILES parameter, causing it to be parsed once
> > > explicitly and once implicitly.
> > >
> >
>


--

http://www.irian.at

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

Professional Support for Apache MyFaces

Re: List-entries problem

Posted by Alexandre Poitras <al...@gmail.com>.
That did the try. Thank a lot, I would have never figured out that by myself.

On 4/20/06, Alexandre Poitras <al...@gmail.com> wrote:
> Thank I will give it a try :)
>
> On 4/19/06, Mike Kienenberger <mk...@gmail.com> wrote:
> > On 4/19/06, Alexandre Poitras <al...@gmail.com> wrote:
> > > I am trying to construct a little demo and I have a bean which has an
> > > ArrayList type property. I am initializing the property using the
> > > managed beans facilities but each declared entry seems to be added two
> > > times. Any ideas why?
> >
> > It seems highly unlikely in your case, but on the off-chance it's relevent....
> >
> > Normally whenever "two times" and "faces-config" are mentioned in the
> > same message, it's caused by declaring /WEB-INF/faces-config.xml in
> > your javax.faces.CONFIG_FILES parameter, causing it to be parsed once
> > explicitly and once implicitly.
> >
>

Re: List-entries problem

Posted by Alexandre Poitras <al...@gmail.com>.
Thank I will give it a try :)

On 4/19/06, Mike Kienenberger <mk...@gmail.com> wrote:
> On 4/19/06, Alexandre Poitras <al...@gmail.com> wrote:
> > I am trying to construct a little demo and I have a bean which has an
> > ArrayList type property. I am initializing the property using the
> > managed beans facilities but each declared entry seems to be added two
> > times. Any ideas why?
>
> It seems highly unlikely in your case, but on the off-chance it's relevent....
>
> Normally whenever "two times" and "faces-config" are mentioned in the
> same message, it's caused by declaring /WEB-INF/faces-config.xml in
> your javax.faces.CONFIG_FILES parameter, causing it to be parsed once
> explicitly and once implicitly.
>

Re: List-entries problem

Posted by Mike Kienenberger <mk...@gmail.com>.
On 4/19/06, Alexandre Poitras <al...@gmail.com> wrote:
> I am trying to construct a little demo and I have a bean which has an
> ArrayList type property. I am initializing the property using the
> managed beans facilities but each declared entry seems to be added two
> times. Any ideas why?

It seems highly unlikely in your case, but on the off-chance it's relevent....

Normally whenever "two times" and "faces-config" are mentioned in the
same message, it's caused by declaring /WEB-INF/faces-config.xml in
your javax.faces.CONFIG_FILES parameter, causing it to be parsed once
explicitly and once implicitly.