Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 132265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:14:07+00:00 2026-05-11T06:14:07+00:00

I have a concrete class A that extends BaseA and implements InterfaceA. I want

  • 0

I have a concrete class A that extends BaseA and implements InterfaceA. I want to loop through a list of A using either the base class or interface as the looping variable. Trying something like this:

<t:loop source='listOfA' value='propertyOfTypeBaseA'>     ${propertyOfTypeBaseA.someField} </t:loop> 

gives me an error ‘Could not find a coercion from type A to BaseA’. The same thing happens when I set value to a property of type InterfaceA. I can get the loop to work if I use Object as the looping variable type, but then I can’t access any of the fields on the concrete class or the interface.

It seems like Tapestry should know how to coerce from an object to an interface it implements, but I also tried contributing a coercion from A to BaseA/InterfaceA and it still gave me that error, even though it actually showed the coercion in the list.

Any ideas?

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T06:14:08+00:00Added an answer on May 11, 2026 at 6:14 am

    The interface will work if it is not in a package that Tapestry manages. And I now know that the ‘base’ package is one that Tapestry manages in addition to pages and components. I had put my base class and interface in that package thinking they would be safe from Tapestry’s classloader voodoo. After moving them out, I still needed to contribute a coercion for the base class, but not for the interface.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a base class and several concrete classes that derive from it. Lets
I have a concrete class that contains a collection of another concrete class. I
I have a link error where the linker complains that my concrete class's destructor
I have an abstract base class called Party. There are several concrete subclasses (Company,
Suppose I have an interface called Interface, and a concrete class called Base, which,
I have class A and a class B that extends A . I have
I have the following interface and abstract class that implements it: interface Walk {
I have a generic java class that stores comparables: public class MyGenericStorage<T extends Comparable<T>>
I have a spring bean that extends HibernateDaoSupport . I want this bean injected
I have an application with an abstract class that extends JDialog . The class

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.