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

Jochen Kemnade closed TAP5-1259.
--------------------------------
    Resolution: Invalid

We assume this is no longer relevant and therefore close it.
If you still have this issue in a recent Tapestry version (such as 5.3.8 or the 
latest 5.4 preview release), feel free to provide the necessary information and 
reopen.

> 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.3.4#6332)

Reply via email to