If this causes confusions , i'm 100% for making type required again.

I would vote a +1 for changing "type" back to required, mainly because of new 
users.

Discarding "type" results in less readable code for example when compared to omitting @InjectObject, which has a more implicit meaning.

>So, in a word, Tapestry cannot use the class name (neither the simple nor the full) This may not be evident for new users, especially when they read in the docs that Tapestry supports pure-java, annotation-only components...

IMO

Regards,
Norbi

andyhot wrote:
Patrick Moore wrote:
To my untrained eye, it looks like the problem is that the
_componentResolver on line 390 of
org.apache.tapestry.pageload.PageLoader doesn't have the full class
name.

On 10/12/06, Patrick Moore <[EMAIL PROTECTED]> wrote:
Hi there --

I just shifted over to Tap 4.1.1 and I was hoping I could get rid of
the use of 'type' in my @Component annotation. But no such luck.

It's not a matter of luck... You can simply have many components all
sharing the same class. Think for instance all those template-only
components...
their class is BaseComponent.

So, in a word, Tapestry cannot use the class name (neither the simple
nor the full)
in order to make apart a component. It always needs the type.

type has been made optional to facilitate cases where it matches the
class name.
I believe that's what stated at
http://tapestry.apache.org/tapestry4.1/tapestry-annotations/index.html
If this causes confusions , i'm 100% for making type required again.


In my application file I indicate that the components are in the
'com.transparentpolitics.web.components' directory (or its
subdirectories). However, Tap doesn't find components that are in
child directories of the 'com ... components' directory. So component
references like this:

  @Component
  public abstract Navigation getNavigation()

don't work but this does work :

   @Component(type="utils/Navigation")
   public abstract Navigation getNavigation()

(Navigation is
'com.transparentpolitics.core.web.components.util.Navigation')
Now I don't understand why Tap can't find the component as the method
call returns the exact component class. Is this just a known temporary
limit? Or would changing this current behavior to look at the actual
class supplied cause problems?

I do know that I can list out each child component directory but that
has its own problem as there are some cases of duplicate class names.
In any case all the information is on that annotated method call.

-Pat

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to