Thank you Howard.

Sorry, I didn't describe it clearly.

I mean the base class does not have a default constructor but the component
class has.
They look like the following code:

////
// ObjectList.groovy
package myroot.base;

class ObjectList {

        public ObjectList(String methodName) {
            ......
        }
}

////
// DomainList.groovy

package myroot.components;

import myroot.base.ObjectList;

class DomainList extends ObjectList {
       public DomainList() {
            super('getDomainListModel');
       }
}

So, DomainList is the component which has a default constructor. The above
code does not work.




Howard Lewis Ship wrote:
> 
> No component class is allowed to have anything but the default
> constructor.  I'm not sure if this is made sufficiently clear in the
> documentation.
> 
> On Tue, Jan 19, 2010 at 6:07 AM, lyf <yifanliu...@gmail.com> wrote:
>>
>> I use groovy with T5
>>
>> I got a base abstract class ObjectList.groovy in the base package
>> And I got a component class DomainList.groovy extends ObjectList in the
>> components package.
>>
>> ObjectList got only one constructor with a parameter, in which case T5
>> would
>> throw a exception saying the ObjectList should be in the base package or
>> somehing like that ( the code throws this exception in
>> org.apache.tapestry5.internal.services.ComponentClassTransformerImpl.transformComponentClass
>> method, 150th line)
>>
>> But when I removed the parameter of the ObjectList's constructor, it
>> worked
>> fine.
>>
>> Why can not a base class have a construtor with parameters? I think it's
>> a
>> bug, isn't it?
>> --
>> View this message in context:
>> http://old.nabble.com/Is-it-a-bug--T5.1.05-tp27226305p27226305.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
> 
> 
> 
> -- 
> Howard M. Lewis Ship
> 
> Creator of Apache Tapestry
> 
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
> 
> (971) 678-5210
> http://howardlewisship.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Is-it-a-bug--T5.1.05-tp27226305p27228516.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to