myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Laurentiu Trica" <laurentiu.tr...@codebeat.ro>
Subject Re: Problems using <t:aliasBean
Date Wed, 28 Feb 2007 08:06:13 GMT
Hi Simon

This could be the problem, I am using Spring VariableResolver.
But I need to use it. Even if it's working otherwise.

Any idea why they are not working together?

Thanks.

On 2/27/07, Simon Kitching <simon.kitching@rhe.co.nz> wrote:
>
> I presume you're using the custom Spring VariableResolver. It looks to
> me like this is the problem as I cannot see anything else wrong with
> your code.
>
> Can you try defining test as a standard JSF managed bean rather than as
> a spring bean?
>
> Laurentiu Trica wrote:
> > If I create an alias for an attribute of the bean, it is working.
> > For example, this is working:
> > <t:aliasBean alias="#{aliasB}" value="#{test.text}">
> >             <t:outputText value="#{aliasB}" />
> >         </t:aliasBean>
> >
> > This doesn't work:
> > <t:aliasBean alias="#{aliasB}" value="#{test}">
> >             <t:outputText value="#{aliasB.text}" />
> >         </t:aliasBean>
> >
> > Anyone has any idea why this is happening?
> >
> > The error is still the same:
> > Caused by: javax.faces.el.PropertyNotFoundException: /pages/test.xhtml
> > @11,43 value="#{ aliasB.text}": Bean: java.lang.String, property: text
> >     at com.sun.facelets.el.LegacyValueBinding.getValue
> > (LegacyValueBinding.java:58)
> >     at javax.faces.component.UIOutput.getValue(UIOutput.java:80)
> >     at
> >
> org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.getStringValue(
> RendererUtils.java:223)
> >
> > On 2/27/07, *Laurentiu Trica* <tricasoft@gmail.com
> > <mailto:tricasoft@gmail.com>> wrote:
> >
> >     Yes, it is working...
> >
> >
> >     On 2/27/07, *Volker Weber* < v.weber@inexso.de
> >     <mailto:v.weber@inexso.de>> wrote:
> >
> >         Hi,
> >
> >         is <t:outputText value="#{test.text}" /> working?
> >
> >
> >
> >         2007/2/27, Laurentiu Trica < tricasoft@gmail.com
> >         <mailto:tricasoft@gmail.com>>:
> >         >  Hi
> >         >
> >         >  I have to use the aliasBean for my page and I get this error:
> >         >  Caused by: javax.faces.el.PropertyNotFoundException:
> >         >  /pages/test.xhtml @11,46 value="#{aliasB['text']}": Bean:
> >         java.lang.String,
> >         >  property: text
> >         >     at
> >         >  com.sun.facelets.el.LegacyValueBinding.getValue
> >         (LegacyValueBinding.java:58)
> >         >     at
> >         >  javax.faces.component.UIOutput.getValue(UIOutput.java:80)
> >         >      at
> >         >
> >
> org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.getStringValue(
> RendererUtils.java
> >         :223)
> >         >
> >         >  The page code is this:
> >         >  <t:aliasBean alias="#{aliasB}" value="#{test}">
> >         >      <t:outputText value="#{aliasB.text}" />
> >         >  </t:aliasBean>
> >         >
> >         >  The backing bean code is:
> >         >  public class Test {
> >         >      private String text = "TEXT";
> >         >
> >         >      public String getText() {
> >         >         return text;
> >         >      }
> >         >
> >         >     public void setText(String text) {
> >         >          this.text = text;
> >         >     }
> >         >  }
> >         >
> >         >  Can anybody help?
> >         >
>



-- 
Best regards,
Laurentiu
www.codebeat.ro

Mime
View raw message