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

[jira] Created: (TAPESTRY-584) Form should have an element id when rendered (same applies to various FormComponents as well)

Form should have an element id when rendered (same applies to various FormComponents as well)
---------------------------------------------------------------------------------------------

         Key: TAPESTRY-584
         URL: http://issues.apache.org/jira/browse/TAPESTRY-584
     Project: Tapestry
        Type: Improvement
    Versions: 4.0    
    Reporter: Dave Syer


Form should have an element id when rendered (same applies to various FormComponents as well).

Best practice these days is to use getElementById() in Javascript, but Tapestry is not very consistent about which components it gives ids to.  Ideally it should be all of them, or we should have a uniform mechanism for specifying them.  Form is a case in point (as is Hidden).

-- 
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-584) Form should have an element id when rendered (same applies to various FormComponents as well)

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

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

Form names are already "uniquified" (even inside a portlet), so making the name match the id the way to go.

> Form should have an element id when rendered (same applies to various FormComponents as well)
> ---------------------------------------------------------------------------------------------
>
>          Key: TAPESTRY-584
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-584
>      Project: Tapestry
>         Type: Improvement
>     Versions: 4.0
>     Reporter: Dave Syer
>     Assignee: Howard M. Lewis Ship

>
> Form should have an element id when rendered (same applies to various FormComponents as well).
> Best practice these days is to use getElementById() in Javascript, but Tapestry is not very consistent about which components it gives ids to.  Ideally it should be all of them, or we should have a uniform mechanism for specifying them.  Form is a case in point (as is Hidden).

-- 
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] Closed: (TAPESTRY-584) Form should have an element id when rendered (same applies to various FormComponents as well)

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

    Fix Version: 4.0
     Resolution: Fixed

Found most of the places (at least in Java code) that used document.<formname> or document.<formname>.<fieldname> and replaced with document.getElementById().

The Form component now renders an id attribute (with the same value as its name attribute).

> Form should have an element id when rendered (same applies to various FormComponents as well)
> ---------------------------------------------------------------------------------------------
>
>          Key: TAPESTRY-584
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-584
>      Project: Tapestry
>         Type: Improvement
>     Versions: 4.0
>     Reporter: Dave Syer
>     Assignee: Howard M. Lewis Ship
>      Fix For: 4.0

>
> Form should have an element id when rendered (same applies to various FormComponents as well).
> Best practice these days is to use getElementById() in Javascript, but Tapestry is not very consistent about which components it gives ids to.  Ideally it should be all of them, or we should have a uniform mechanism for specifying them.  Form is a case in point (as is Hidden).

-- 
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-584) Form should have an element id when rendered (same applies to various FormComponents as well)

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

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

>From the XHTML specification:

C.8. Fragment Identifiers

In XML, URI-references [RFC2396] that end with fragment identifiers of the form "#foo" do not refer to elements with an attribute name="foo"; rather, they refer to elements with an attribute defined to be of type ID, e.g., the id attribute in HTML 4. Many existing HTML clients don't support the use of ID-type attributes in this way, so identical values may be supplied for both of these attributes to ensure maximum forward and backward compatibility (e.g., <a id="foo" name="foo">...</a>).

Further, since the set of legal values for attributes of type ID is much smaller than for those of type CDATA, the type of the name attribute has been changed to NMTOKEN. This attribute is constrained such that it can only have the same values as type ID, or as the Name production in XML 1.0 Section 2.3, production 5. Unfortunately, this constraint cannot be expressed in the XHTML 1.0 DTDs. Because of this change, care must be taken when converting existing HTML documents. The values of these attributes must be unique within the document, valid, and any references to these fragment identifiers (both internal and external) must be updated should the values be changed during conversion.

Note that the collection of legal values in XML 1.0 Section 2.3, production 5 is much larger than that permitted to be used in the ID and NAME types defined in HTML 4. When defining fragment identifiers to be backward-compatible, only strings matching the pattern [A-Za-z][A-Za-z0-9:_.-]* should be used. See Section 6.2 of [HTML4] for more information.

> Form should have an element id when rendered (same applies to various FormComponents as well)
> ---------------------------------------------------------------------------------------------
>
>          Key: TAPESTRY-584
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-584
>      Project: Tapestry
>         Type: Improvement
>     Versions: 4.0
>     Reporter: Dave Syer
>     Assignee: Howard M. Lewis Ship

>
> Form should have an element id when rendered (same applies to various FormComponents as well).
> Best practice these days is to use getElementById() in Javascript, but Tapestry is not very consistent about which components it gives ids to.  Ideally it should be all of them, or we should have a uniform mechanism for specifying them.  Form is a case in point (as is Hidden).

-- 
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] Assigned: (TAPESTRY-584) Form should have an element id when rendered (same applies to various FormComponents as well)

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

Howard M. Lewis Ship reassigned TAPESTRY-584:
---------------------------------------------

    Assign To: Howard M. Lewis Ship

> Form should have an element id when rendered (same applies to various FormComponents as well)
> ---------------------------------------------------------------------------------------------
>
>          Key: TAPESTRY-584
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-584
>      Project: Tapestry
>         Type: Improvement
>     Versions: 4.0
>     Reporter: Dave Syer
>     Assignee: Howard M. Lewis Ship

>
> Form should have an element id when rendered (same applies to various FormComponents as well).
> Best practice these days is to use getElementById() in Javascript, but Tapestry is not very consistent about which components it gives ids to.  Ideally it should be all of them, or we should have a uniform mechanism for specifying them.  Form is a case in point (as is Hidden).

-- 
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-584) Form should have an element id when rendered (same applies to various FormComponents as well)

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

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

The many form components (except, perhaps, for Radio) already do provide an id, which may be overriden by the user.

> Form should have an element id when rendered (same applies to various FormComponents as well)
> ---------------------------------------------------------------------------------------------
>
>          Key: TAPESTRY-584
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-584
>      Project: Tapestry
>         Type: Improvement
>     Versions: 4.0
>     Reporter: Dave Syer
>     Assignee: Howard M. Lewis Ship

>
> Form should have an element id when rendered (same applies to various FormComponents as well).
> Best practice these days is to use getElementById() in Javascript, but Tapestry is not very consistent about which components it gives ids to.  Ideally it should be all of them, or we should have a uniform mechanism for specifying them.  Form is a case in point (as is Hidden).

-- 
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