You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Jochen Kemnade (JIRA)" <ji...@apache.org> on 2014/05/27 09:20:55 UTC

[jira] [Updated] (TAP5-1259) When the type of a component in the page class and tml don't match, the tml type is silently ignored

     [ https://issues.apache.org/jira/browse/TAP5-1259?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jochen Kemnade updated TAP5-1259:
---------------------------------

    Labels: bulk-close-candidate  (was: )

This issue has been last updated about 1.5 years ago, has no assignee, affects an old version of Tapestry that is not actively developed anymore, and is therefore prone to be bulk-closed in the near future.

If the issue still persists with the most recent development preview of Tapestry (5.4-beta-6, which is available from Maven Central), please update it as soon as possible. In the case of a feature request, please discuss it with the Tapestry developer community on the dev@tapestry.apache.org mailing list first.


> When the type of a component in the page class and tml don't match, the tml type is silently ignored
> ----------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-1259
>                 URL: https://issues.apache.org/jira/browse/TAP5-1259
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.2
>            Reporter: Donny Nadolny
>            Priority: Minor
>              Labels: bulk-close-candidate
>
> When you have a component in the tml with any type, for example:
> <input t:type="PasswordField" t:id="password"/>
> And you have the component type specified differently in the page class, for example:
> 	@Component(id = "password")
> 	private TextField passwordField;
> Tapestry will silently ignore the type specified in the tml. In this case, it will create a normal text field, even though it is a password field in the tml.
> I think this should be an error if the tml and java have a component with the same id but a different type, or at least generate a warning (maybe with a page verification step when production mode is false), rather than ignoring the type in the tml.
> Edit: Tried to attach a full example of this, but it kept giving me an error. Here are the files to reproduce this:
> TAP1259.tml:
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd" xmlns:p="tapestry:parameter">
> 	<body>
> 		<t:form id="form">
> 			<input t:type="PasswordField" t:id="password"/>
> 		</t:form>
> 	</body>
> </html>
> TAP1259.java:
> import org.apache.tapestry5.annotations.Component;
> import org.apache.tapestry5.annotations.Property;
> import org.apache.tapestry5.corelib.components.TextField;
> public class TAP1259 {
> 	@Component(id = "password")
> 	private TextField passwordField;
> 	
> 	@Property
> 	private String password;
> }



--
This message was sent by Atlassian JIRA
(v6.2#6252)