You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Daniel Jue <te...@gmail.com> on 2008/02/04 20:13:02 UTC

Re: [T5] Why can't i directly access attributes from my superclass?

Don't worry, you're not the only one who encountered this problem the hard
way. ;-)
Time to add this to the wiki, since Early T5 adopters will likely run into
this.

http://wiki.apache.org/tapestry/Tapestry5Caveats


On Jan 30, 2008 12:27 PM, Marcelo Lotif <ml...@gmail.com> wrote:

> I'm using 5.0.10-SNAPSHOT.
> I'm not trying to access the attribute on a page, it's just a control
> attribute, and i must have it in some of my classes. For me, is simpler to
> declare it in a superclass and access it directly in the subclasses, since
> subclasses inherit the attributes from the superclass. But it's not so bad
> to use it via getters and setters.
>
> =)
>
> 2008/1/30, Mahen Perera <Ma...@igindex.co.uk>:
> >
> > From what i know, you need to have a getter for each attribute that you
> > are trying to access in the page. This is the way tapestry works AFAIK
> >
> > HTH
> >
> > Mahen
> >
> > -----Original Message-----
> > From: Marcelo Lotif [mailto:mlotifjava@gmail.com]
> > Sent: 30 January 2008 16:32
> > To: Tapestry users
> > Subject: [T5] Why can't i directly access attributes from my superclass?
> >
> > Hi all,
> > I have an attribute used by many of my pages, so i want to put it on an
> > abstract superclass. But, if i mark my attribute as protected or public
> > (on the superclass), and try to use it on my subclass directly, I get a
> > strange
> > error:
> >
> > An unexpected application exception has occurred.
> >
> > Render queue error in BeginRender[Portal:layouterp.menuerp.pagelink_2]:
> > Could not convert 'incluirBtn' into a component parameter binding:
> > java.lang.NoClassDefFoundError:
> > br/com/javasoftware/erp/pages/localizar/ProcurarCliente
> >
> > But, if i create getters and setters and use them in my subclass instead
> > of calling the attribute directly, everything works fine.
> > Anyone knows why this happens?
> >
> > --
> > Atenciosamente,
> > Marcelo Lotif
> > The information contained in this email is strictly confidential and for
> > the use of the addressee only, unless otherwise indicated. If you are
> not
> > the intended recipient, please do not read, copy, use or disclose to
> others
> > this message or any attachment. Please also notify the sender by
> replying to
> > this email or by telephone (+44 (0)20 7896 0011) and then delete the
> email
> > and any copies of it. Opinions, conclusions (etc.) that do not relate to
> the
> > official business of this company shall be understood as neither given
> nor
> > endorsed by it. IG Index plc is a company registered in England and
> Wales
> > under number 01190902. VAT registration number 761 2978 07. Registered
> > Office: Friars House, 157-168 Blackfriars Road, London SE1 8EZ.
> Authorised
> > and regulated by the Financial Services Authority. FSA Register number
> > 114059.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> Atenciosamente,
> Marcelo Lotif
>