Hello,

I am currently upgrading my Tapestry version from 5.0.6 to 5.0.11 and I have
a problem with @ApplicationState annotation.

Here are my files: 

Login.tml :

<?xml version="1.0" encoding="UTF-8"?>
<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
    <head>
        <title>Login</title>
    </head>
    <body>
          <div id="login_box">
             <t:form>
                 <t:errors />
                   <table>
                       <tr>
                             <td><label t:type="Label" for="login" 
class="login_label"/></td>
                             <td><input t:type="TextField" t:id="login" 
t:value="login"
t:label="login " 
                                                                         
class="login_input" /></td>
                         </tr>
                         <tr>
                             <td><label t:type="Label" for="password" 
class="login_label"/></td>
                                 <td><input t:type="PasswordField" 
t:id="password" t:value="password"
t:label="password " 
                                                                          
class="login_input" /></td>
                            </tr>
                            <tr>
                                <td><input t:id="submitform" t:type="Submit" 
t:value="submit"
class="login_submit"/></td>
                            </tr>
                        </table>                                
                   </t:form>
                </div>
        </body>
</html>


Login.java :

package tutos.web.pages;

import org.apache.tapestry.annotations.ApplicationState;
import org.apache.tapestry.beaneditor.Validate;

public class Login {
    
    @ApplicationState
    private String login;

    private String password;

    public String getLogin() {
        return login;
    }

    @Validate("required")
    public void setLogin(String login) {
        this.login = login;
    }

    public String getPassword() {
        return password;
    }

    @Validate("required")
    public void setPassword(String password) {
        this.password = password;
    }

    String onSuccess() {
        //my business coder
        String ret = "Home";
        return ret;
    }
}


I get the error - no exception in stacktrace : 

Render queue error in BeginRender[Login:login]: Failure reading parameter
'value' of component Login:login: Error invoking constructor
java.lang.String(byte[], int, int, int) (at null:-1) (for service
'ApplicationStateManager'): No service implements the interface [B.

When I delete @ApplicationState annotation, everything works.

I have made some tests on different Tapestry versions and it seems that
@ApplicationState is correctly working until 5.0.10. I get the exception on
5.0.11 and 5.0.12-SNAPSHOT.

Is it a bug or @ApplicationState implementation has changed since 5.0.11 ?
In this case can someone give me the correct configuration ?

Thanks, regards,

Baptiste Meurant
-- 
View this message in context: 
http://www.nabble.com/ApplicationState-annotation-problem-since-5.0.11-tp16118051p16118051.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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

Reply via email to