You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Ron Piterman (JIRA)" <ta...@jakarta.apache.org> on 2005/08/26 19:48:25 UTC

[jira] Created: (TAPESTRY-603) annotation "component" parameter "id" making it impossible to define an id parameter

annotation "component" parameter "id" making it impossible to define an id parameter
------------------------------------------------------------------------------------

         Key: TAPESTRY-603
         URL: http://issues.apache.org/jira/browse/TAPESTRY-603
     Project: Tapestry
        Type: Wish
    Versions: 4.0    
 Reporter: Ron Piterman


defining @Component(id = "...") making it impossible to define id attribute to components.
Id is a very important attribute in html, this is a serious limitation.

Why not use jwcid instead (which is also very intuitive...)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Commented: (TAPESTRY-603) annotation "component" parameter "id" making it impossible to define an id parameter

Posted by "Howard M. Lewis Ship (JIRA)" <ta...@jakarta.apache.org>.
    [ http://issues.apache.org/jira/browse/TAPESTRY-603?page=comments#action_12320261 ] 

Howard M. Lewis Ship commented on TAPESTRY-603:
-----------------------------------------------

First off; it's early here so I was confusing the @ComponentClass and @Component annotations.

Annotations are much like XML with a fixed DTD.  Take a careful look at the documentation at http://jakarta.apache.org/tapestry/tapestry-annotations/index.html#Component

You example would be

@Component(type = "PageLink" id="MyLink" bindings={"page=MyPage" })
public abstract IComponent getMyLink();

The @Parameter annotation is for DEFINING a parameter within a @ComponentClass; the bindings property of the @Component annotation is used to define the bindings for a contained component, as with the <binding> element in the XML, and with a pretty similar syntax.


> annotation "component" parameter "id" making it impossible to define an id parameter
> ------------------------------------------------------------------------------------
>
>          Key: TAPESTRY-603
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-603
>      Project: Tapestry
>         Type: Wish
>     Versions: 4.0
>     Reporter: Ron Piterman

>
> defining @Component(id = "...") making it impossible to define id attribute to components.
> Id is a very important attribute in html, this is a serious limitation.
> Why not use jwcid instead (which is also very intuitive...)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Commented: (TAPESTRY-603) annotation "component" parameter "id" making it impossible to define an id parameter

Posted by "Howard M. Lewis Ship (JIRA)" <ta...@jakarta.apache.org>.
    [ http://issues.apache.org/jira/browse/TAPESTRY-603?page=comments#action_12320253 ] 

Howard M. Lewis Ship commented on TAPESTRY-603:
-----------------------------------------------

Don't follow what one has to do with the other.  The id property of th @Component annotation has nothing to do with a parameter of the component named "id".

IComponent has an id property that DOES get in the way; this is one of the reasons for the future move to eliminate inheritance in Tapestry.

What you can do is:

  @Parameter(name = "id")
  public abstract String getIdParameter();

You' bind the parameter as <binding name="id" value="..."/> but read/update the property inside the component as getIdParameter()/setIdParameter().

> annotation "component" parameter "id" making it impossible to define an id parameter
> ------------------------------------------------------------------------------------
>
>          Key: TAPESTRY-603
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-603
>      Project: Tapestry
>         Type: Wish
>     Versions: 4.0
>     Reporter: Ron Piterman

>
> defining @Component(id = "...") making it impossible to define id attribute to components.
> Id is a very important attribute in html, this is a serious limitation.
> Why not use jwcid instead (which is also very intuitive...)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Commented: (TAPESTRY-603) annotation "component" parameter "id" making it impossible to define an id parameter

Posted by "Ron Piterman (JIRA)" <ta...@jakarta.apache.org>.
    [ http://issues.apache.org/jira/browse/TAPESTRY-603?page=comments#action_12320255 ] 

Ron Piterman commented on TAPESTRY-603:
---------------------------------------

I meant something else.
If a component defined *inside* another component is taking the "id" parameter, or one wishes to set the Id attribute of an html element, than one can not do so using annotations:

currently:
======

@Component(type="PageLink", id="MyLink", page="MyPage")
public abstract PageLink getLinkMyPage();

The id= refers to the jwcid, not the id attribute of the html tag.

in the componen's (or page's) template <a jwcid="MyLink" ...
will produce 

<a href="..."

My proposal:
========

@Component(type="PageLink",id="MyLink", jwcid="myPageLink", page="MyPage")
public abstract PageLink

in the template:

<a jwcid="myPageLink">...

should produce:

<a id="MyLink" href...


> annotation "component" parameter "id" making it impossible to define an id parameter
> ------------------------------------------------------------------------------------
>
>          Key: TAPESTRY-603
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-603
>      Project: Tapestry
>         Type: Wish
>     Versions: 4.0
>     Reporter: Ron Piterman

>
> defining @Component(id = "...") making it impossible to define id attribute to components.
> Id is a very important attribute in html, this is a serious limitation.
> Why not use jwcid instead (which is also very intuitive...)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Resolved: (TAPESTRY-603) annotation "component" parameter "id" making it impossible to define an id parameter

Posted by "Howard M. Lewis Ship (JIRA)" <ta...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/TAPESTRY-603?page=all ]
     
Howard M. Lewis Ship resolved TAPESTRY-603:
-------------------------------------------

    Resolution: Invalid

> annotation "component" parameter "id" making it impossible to define an id parameter
> ------------------------------------------------------------------------------------
>
>          Key: TAPESTRY-603
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-603
>      Project: Tapestry
>         Type: Wish
>     Versions: 4.0
>     Reporter: Ron Piterman

>
> defining @Component(id = "...") making it impossible to define id attribute to components.
> Id is a very important attribute in html, this is a serious limitation.
> Why not use jwcid instead (which is also very intuitive...)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org