Craig, is there any thought to add namespace support to the EL? Example:

 

#{myBean.blah}

 

As opposed to:

 

#{myModule:myBean}

 

This would help greatly, especially for those of us who have huge numbers of managed beans.

Or the more adventurous of us who want to try (or need) and delegate some DI to spring or hivemind. ;)

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Craig McClanahan
Sent: Tuesday, 1 August 2006 7:50 AM
To: MyFaces Discussion
Subject: Re: how deeply into a bean does myfaces update value references?

 

 

On 7/31/06, Andrew Robinson <[EMAIL PROTECTED]> wrote:

It should never look for (or set) "myBean.myBean" unless you use it
somewhere in the EL or have it as a managed property in the faces
config. What code (including EL and managed properties) refers to the
"myBean" property?


To be more specific, here are a couple of example expressions and what they reference:

#{myBean.foo} references the foo property in the "outer" MyBean instance.

#{myBean.mybean.foo} references the foo property in the "inner" MyBean instance.

In other words, evaluation just follows the path you explicitly specify ... the last element represents the property whose value is updated.

Craig
 

 

On 7/31/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
>
> Andrew,
>
> would myfaces also find the property 'MyBean mybean'  which is defined in
> MyBean and call
> setFoo on that reference?
>
> for example, I've got
>
> MyBean class
>       private String foo  (with getters and setters)
>       private MyBean myBean (with getters and setters
>
> before the update page renders, I save a copy of MyBean in itself.
>
> so the MyBean copy also has a foo reference.
>
> what it looks like is that when the page is submitted, myfaces updates the
> visible
> foo property but also find the foo property in the 'MyBean myBean'
> property.
>
> does that make sense? and is that the intended behavior of Myfaces?
>
> I'm keeping a copy of the bean in itself to be able to reset the update
> form.
>
> I know a Reset button of type=reset works, but on this page there are lists
> which could cause a form submit and I can't reset the update form to
> the original state.
>
> Thank you for the response.
> Tom
>
>
>
>
>              "Andrew Robinson"
>              <andrew.rw.robins
>              [EMAIL PROTECTED] >                                              To
>                                        "MyFaces Discussion"
>              07/31/2006 02:07          < users@myfaces.apache.org>
>              PM                                                         cc
>
>                                                                    Subject
>              Please respond to         Re: how deeply into a bean does
>                  "MyFaces              myfaces update value references?
>                 Discussion"
>              <[EMAIL PROTECTED]
>                   ache.org>
>
>
>
>
>
>
>
> <h:inputText  value="#{myBean.foo}"
>
> On update:
> Look for "myBean" in the scoped maps (request, session, application).
>
> If not found, create a new instance of mybean.
> call setFoo() on the instance of my bean.
>
> On 7/31/06, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote:
> >
> >
> >
> >
> >
> > hello everyone,
> >
> > I have a jsp and backing bean.  The jsp has a field like
> > <h:inputText  value="#{ myBean.foo}"
> >
> > MyBean.java has the "foo" property, and it also has a property like
> >
> >       private MyBean myBean = null;
> >  with getters and setters
> >
> > I save a copy of MyBean here before any update so I can reset or cancel
> > the update as needed, and restore the original MyBean to session.
> >
> > I find if I enter something in the foo field of the jsp, the foo property
> > in the
> > saved original untouched MyBean property is also updated.
> >
> > Does my faces search a backing bean for all references to a property
> > and update all references?  That's what it looks like it's doing, but is
> > that what
> > you see?
> >
> > Thanks in advance for your help.
> > Tom
> >
> >
> >
> >
> > This message is intended for the recipient only and is not meant to be
> forwarded or distributed in any other format. This communication is for
> informational purposes only.  It is not intended as an offer or
> solicitation for the purchase or sale of any financial instrument, or
> security, or as an official confirmation of any transaction.  Putnam does
> not accept purchase or redemptions of securities, instructions, or
> authorizations that are sent via e-mail.   All market prices, data and
> other information are not warranted as to completeness or accuracy and are
> subject to change without notice.  Any comments or statements made herein
> do not necessarily reflect those of Putnam, LLC (DBA Putnam Investments)
> and its subsidiaries and affiliates.  If you are not the intended recipient
> of this e-mail, please delete the e-mail.
> >
>
>
>
>
>
> This message is intended for the recipient only and is not meant to be forwarded or distributed in any other format. This communication is for informational purposes only.  It is not intended as an offer or solicitation for the purchase or sale of any financial instrument, or security, or as an official confirmation of any transaction.  Putnam does not accept purchase or redemptions of securities, instructions, or authorizations that are sent via e-mail.   All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice.  Any comments or statements made herein do not necessarily reflect those of Putnam, LLC (DBA Putnam Investments) and its subsidiaries and affiliates.  If you are not the intended recipient of this e-mail, please delete the e-mail.
>

 

This correspondence is for the named persons only.
It may contain confidential or privileged information or both.
No confidentiality or privilege is waived or lost by any mis transmission.
If you receive this correspondence in error please delete it from your system immediately and notify the sender.
You must not disclose, copy or relay on any part of this correspondence, if you are not the intended recipient.
Any opinions expressed in this message are those of the individual sender except where the sender expressly,
and with the authority, states them to be the opinions of the Department of Emergency Services, Queensland.

Reply via email to