You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Sergey Stremin (JIRA)" <ji...@apache.org> on 2012/07/04 17:12:34 UTC

[jira] [Created] (TAP5-1967) boolean activation context is lost on form submit

Sergey Stremin created TAP5-1967:
------------------------------------

             Summary: boolean activation context is lost on form submit
                 Key: TAP5-1967
                 URL: https://issues.apache.org/jira/browse/TAP5-1967
             Project: Tapestry 5
          Issue Type: Bug
    Affects Versions: 5.3.3
            Reporter: Sergey Stremin


Test code: 

public class TestPage {
    @Property
    private boolean flag;

    @Property
    private String field;

    void onActivate(boolean flag) {
        this.flag = flag;
    }

    boolean onPassivate() {
        return flag;
    }
}

<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd">
<body>
    <t:form clientValidation="false">
        context: ${flag}<br/>
        <t:textfield t:id="field" t:value="field" validate="required"/><br/>
        <t:submit/>
    </t:form>
</body>
</html>

Steps to reproduce:

1. Open page with context value of 'true': testpage/true
2. "context: true" is shown in page
3. Do not enter field value, click Submit.
4. Validation fails, and "context: false" is shown in page. I expect to see "context: true" here.

Context is successfully retained if it has String or int type, but is lost if it has boolean type.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TAP5-1967) boolean activation context is lost on form submit

Posted by "Sergey Stremin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13409035#comment-13409035 ] 

Sergey Stremin commented on TAP5-1967:
--------------------------------------

Alex, thank you for the explanation and examples. I missed that special meaning.
                
> boolean activation context is lost on form submit
> -------------------------------------------------
>
>                 Key: TAP5-1967
>                 URL: https://issues.apache.org/jira/browse/TAP5-1967
>             Project: Tapestry 5
>          Issue Type: Bug
>    Affects Versions: 5.3.3
>            Reporter: Sergey Stremin
>
> Test code: 
> public class TestPage {
>     @Property
>     private boolean flag;
>     @Property
>     private String field;
>     void onActivate(boolean flag) {
>         this.flag = flag;
>     }
>     boolean onPassivate() {
>         return flag;
>     }
> }
> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd">
> <body>
>     <t:form clientValidation="false">
>         context: ${flag}<br/>
>         <t:textfield t:id="field" t:value="field" validate="required"/><br/>
>         <t:submit/>
>     </t:form>
> </body>
> </html>
> Steps to reproduce:
> 1. Open page with context value of 'true': testpage/true
> 2. "context: true" is shown in page
> 3. Do not enter field value, click Submit.
> 4. Validation fails, and "context: false" is shown in page. I expect to see "context: true" here.
> Context is successfully retained if it has String or int type, but is lost if it has boolean type.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TAP5-1967) boolean activation context is lost on form submit

Posted by "Alex Lumpov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13408226#comment-13408226 ] 

Alex Lumpov commented on TAP5-1967:
-----------------------------------

or this:

public class TestPage {

	@Property
	private boolean flag;

	@Property
	private String field;

	void onActivate(boolean flag) {
		this.flag = flag;
	}

	String onPassivate() {
		return Boolean.toString(flag);
	}
}
                
> boolean activation context is lost on form submit
> -------------------------------------------------
>
>                 Key: TAP5-1967
>                 URL: https://issues.apache.org/jira/browse/TAP5-1967
>             Project: Tapestry 5
>          Issue Type: Bug
>    Affects Versions: 5.3.3
>            Reporter: Sergey Stremin
>
> Test code: 
> public class TestPage {
>     @Property
>     private boolean flag;
>     @Property
>     private String field;
>     void onActivate(boolean flag) {
>         this.flag = flag;
>     }
>     boolean onPassivate() {
>         return flag;
>     }
> }
> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd">
> <body>
>     <t:form clientValidation="false">
>         context: ${flag}<br/>
>         <t:textfield t:id="field" t:value="field" validate="required"/><br/>
>         <t:submit/>
>     </t:form>
> </body>
> </html>
> Steps to reproduce:
> 1. Open page with context value of 'true': testpage/true
> 2. "context: true" is shown in page
> 3. Do not enter field value, click Submit.
> 4. Validation fails, and "context: false" is shown in page. I expect to see "context: true" here.
> Context is successfully retained if it has String or int type, but is lost if it has boolean type.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TAP5-1967) boolean activation context is lost on form submit

Posted by "Alex Lumpov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13408213#comment-13408213 ] 

Alex Lumpov commented on TAP5-1967:
-----------------------------------

As return boolean has special sense,
That you should return another type.

For example:

public class TestPage {

	@Property
	private boolean flag;

	@Property
	private String field;

	void onActivate(boolean flag) {
		this.flag = flag;
	}

	List<Boolean> onPassivate() {
		return Collections.singletonList(flag);
	}
}
                
> boolean activation context is lost on form submit
> -------------------------------------------------
>
>                 Key: TAP5-1967
>                 URL: https://issues.apache.org/jira/browse/TAP5-1967
>             Project: Tapestry 5
>          Issue Type: Bug
>    Affects Versions: 5.3.3
>            Reporter: Sergey Stremin
>
> Test code: 
> public class TestPage {
>     @Property
>     private boolean flag;
>     @Property
>     private String field;
>     void onActivate(boolean flag) {
>         this.flag = flag;
>     }
>     boolean onPassivate() {
>         return flag;
>     }
> }
> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd">
> <body>
>     <t:form clientValidation="false">
>         context: ${flag}<br/>
>         <t:textfield t:id="field" t:value="field" validate="required"/><br/>
>         <t:submit/>
>     </t:form>
> </body>
> </html>
> Steps to reproduce:
> 1. Open page with context value of 'true': testpage/true
> 2. "context: true" is shown in page
> 3. Do not enter field value, click Submit.
> 4. Validation fails, and "context: false" is shown in page. I expect to see "context: true" here.
> Context is successfully retained if it has String or int type, but is lost if it has boolean type.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (TAP5-1967) boolean activation context is lost on form submit

Posted by "Sergey Stremin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1967?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sergey Stremin closed TAP5-1967.
--------------------------------

    Resolution: Not A Problem
    
> boolean activation context is lost on form submit
> -------------------------------------------------
>
>                 Key: TAP5-1967
>                 URL: https://issues.apache.org/jira/browse/TAP5-1967
>             Project: Tapestry 5
>          Issue Type: Bug
>    Affects Versions: 5.3.3
>            Reporter: Sergey Stremin
>
> Test code: 
> public class TestPage {
>     @Property
>     private boolean flag;
>     @Property
>     private String field;
>     void onActivate(boolean flag) {
>         this.flag = flag;
>     }
>     boolean onPassivate() {
>         return flag;
>     }
> }
> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd">
> <body>
>     <t:form clientValidation="false">
>         context: ${flag}<br/>
>         <t:textfield t:id="field" t:value="field" validate="required"/><br/>
>         <t:submit/>
>     </t:form>
> </body>
> </html>
> Steps to reproduce:
> 1. Open page with context value of 'true': testpage/true
> 2. "context: true" is shown in page
> 3. Do not enter field value, click Submit.
> 4. Validation fails, and "context: false" is shown in page. I expect to see "context: true" here.
> Context is successfully retained if it has String or int type, but is lost if it has boolean type.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (TAP5-1967) boolean activation context is lost on form submit

Posted by "Sergey Stremin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1967?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sergey Stremin closed TAP5-1967.
--------------------------------

    Resolution: Not A Problem
    
> boolean activation context is lost on form submit
> -------------------------------------------------
>
>                 Key: TAP5-1967
>                 URL: https://issues.apache.org/jira/browse/TAP5-1967
>             Project: Tapestry 5
>          Issue Type: Bug
>    Affects Versions: 5.3.3
>            Reporter: Sergey Stremin
>
> Test code: 
> public class TestPage {
>     @Property
>     private boolean flag;
>     @Property
>     private String field;
>     void onActivate(boolean flag) {
>         this.flag = flag;
>     }
>     boolean onPassivate() {
>         return flag;
>     }
> }
> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd">
> <body>
>     <t:form clientValidation="false">
>         context: ${flag}<br/>
>         <t:textfield t:id="field" t:value="field" validate="required"/><br/>
>         <t:submit/>
>     </t:form>
> </body>
> </html>
> Steps to reproduce:
> 1. Open page with context value of 'true': testpage/true
> 2. "context: true" is shown in page
> 3. Do not enter field value, click Submit.
> 4. Validation fails, and "context: false" is shown in page. I expect to see "context: true" here.
> Context is successfully retained if it has String or int type, but is lost if it has boolean type.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TAP5-1967) boolean activation context is lost on form submit

Posted by "Sergey Stremin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13409035#comment-13409035 ] 

Sergey Stremin commented on TAP5-1967:
--------------------------------------

Alex, thank you for the explanation and examples. I missed that special meaning.
                
> boolean activation context is lost on form submit
> -------------------------------------------------
>
>                 Key: TAP5-1967
>                 URL: https://issues.apache.org/jira/browse/TAP5-1967
>             Project: Tapestry 5
>          Issue Type: Bug
>    Affects Versions: 5.3.3
>            Reporter: Sergey Stremin
>
> Test code: 
> public class TestPage {
>     @Property
>     private boolean flag;
>     @Property
>     private String field;
>     void onActivate(boolean flag) {
>         this.flag = flag;
>     }
>     boolean onPassivate() {
>         return flag;
>     }
> }
> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd">
> <body>
>     <t:form clientValidation="false">
>         context: ${flag}<br/>
>         <t:textfield t:id="field" t:value="field" validate="required"/><br/>
>         <t:submit/>
>     </t:form>
> </body>
> </html>
> Steps to reproduce:
> 1. Open page with context value of 'true': testpage/true
> 2. "context: true" is shown in page
> 3. Do not enter field value, click Submit.
> 4. Validation fails, and "context: false" is shown in page. I expect to see "context: true" here.
> Context is successfully retained if it has String or int type, but is lost if it has boolean type.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TAP5-1967) boolean activation context is lost on form submit

Posted by "Alex Lumpov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13408213#comment-13408213 ] 

Alex Lumpov commented on TAP5-1967:
-----------------------------------

As return boolean has special sense,
That you should return another type.

For example:

public class TestPage {

	@Property
	private boolean flag;

	@Property
	private String field;

	void onActivate(boolean flag) {
		this.flag = flag;
	}

	List<Boolean> onPassivate() {
		return Collections.singletonList(flag);
	}
}
                
> boolean activation context is lost on form submit
> -------------------------------------------------
>
>                 Key: TAP5-1967
>                 URL: https://issues.apache.org/jira/browse/TAP5-1967
>             Project: Tapestry 5
>          Issue Type: Bug
>    Affects Versions: 5.3.3
>            Reporter: Sergey Stremin
>
> Test code: 
> public class TestPage {
>     @Property
>     private boolean flag;
>     @Property
>     private String field;
>     void onActivate(boolean flag) {
>         this.flag = flag;
>     }
>     boolean onPassivate() {
>         return flag;
>     }
> }
> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd">
> <body>
>     <t:form clientValidation="false">
>         context: ${flag}<br/>
>         <t:textfield t:id="field" t:value="field" validate="required"/><br/>
>         <t:submit/>
>     </t:form>
> </body>
> </html>
> Steps to reproduce:
> 1. Open page with context value of 'true': testpage/true
> 2. "context: true" is shown in page
> 3. Do not enter field value, click Submit.
> 4. Validation fails, and "context: false" is shown in page. I expect to see "context: true" here.
> Context is successfully retained if it has String or int type, but is lost if it has boolean type.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (TAP5-1967) boolean activation context is lost on form submit

Posted by "Alex Lumpov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13408226#comment-13408226 ] 

Alex Lumpov commented on TAP5-1967:
-----------------------------------

or this:

public class TestPage {

	@Property
	private boolean flag;

	@Property
	private String field;

	void onActivate(boolean flag) {
		this.flag = flag;
	}

	String onPassivate() {
		return Boolean.toString(flag);
	}
}
                
> boolean activation context is lost on form submit
> -------------------------------------------------
>
>                 Key: TAP5-1967
>                 URL: https://issues.apache.org/jira/browse/TAP5-1967
>             Project: Tapestry 5
>          Issue Type: Bug
>    Affects Versions: 5.3.3
>            Reporter: Sergey Stremin
>
> Test code: 
> public class TestPage {
>     @Property
>     private boolean flag;
>     @Property
>     private String field;
>     void onActivate(boolean flag) {
>         this.flag = flag;
>     }
>     boolean onPassivate() {
>         return flag;
>     }
> }
> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd">
> <body>
>     <t:form clientValidation="false">
>         context: ${flag}<br/>
>         <t:textfield t:id="field" t:value="field" validate="required"/><br/>
>         <t:submit/>
>     </t:form>
> </body>
> </html>
> Steps to reproduce:
> 1. Open page with context value of 'true': testpage/true
> 2. "context: true" is shown in page
> 3. Do not enter field value, click Submit.
> 4. Validation fails, and "context: false" is shown in page. I expect to see "context: true" here.
> Context is successfully retained if it has String or int type, but is lost if it has boolean type.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira