You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Sean Redmond (JIRA)" <de...@tapestry.apache.org> on 2008/08/11 18:10:44 UTC

[jira] Created: (TAPESTRY-2575) Disabled fields still perfom client side validation in 5.0.13

Disabled fields still perfom client side validation in 5.0.13
-------------------------------------------------------------

                 Key: TAPESTRY-2575
                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2575
             Project: Tapestry
          Issue Type: Bug
          Components: tapestry-core
    Affects Versions: 5.0.8
            Reporter: Sean Redmond
            Assignee: Howard M. Lewis Ship
             Fix For: 5.0.10


When disabling  Fields (eg. TextField) by setting disabled=true to use them as displaying only components, those components still perform client side validation and show error messages

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Updated: (TAPESTRY-2575) Disabled fields still perfom client side validation in 5.0.13

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-2575?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship updated TAPESTRY-2575:
-------------------------------------------

    Assignee:     (was: Howard M. Lewis Ship)

> Disabled fields still perfom client side validation in 5.0.13
> -------------------------------------------------------------
>
>                 Key: TAPESTRY-2575
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2575
>             Project: Tapestry
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.0.13
>            Reporter: Sean Redmond
>             Fix For: unspecified
>
>
> When disabling  Fields (eg. TextField) by setting disabled=true to use them as displaying only components, those components still perform client side validation and show error messages

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Closed: (TAPESTRY-2575) Disabled fields still perfom client side validation in 5.0.13

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-2575?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAPESTRY-2575.
------------------------------------------

       Resolution: Invalid
    Fix Version/s:     (was: unspecified)
         Assignee: Howard M. Lewis Ship

You do have to manage the disabled flag on the client and the server correctly, as you observed.  This is because the disabled status of the field may change dynamically due to client-side JavaScript.  Often a hidden form field is used to synchronize the state.

> Disabled fields still perfom client side validation in 5.0.13
> -------------------------------------------------------------
>
>                 Key: TAPESTRY-2575
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2575
>             Project: Tapestry
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.0.13
>            Reporter: Sean Redmond
>            Assignee: Howard M. Lewis Ship
>
> When disabling  Fields (eg. TextField) by setting disabled=true to use them as displaying only components, those components still perform client side validation and show error messages

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Updated: (TAPESTRY-2575) Disabled fields still perfom client side validation in 5.0.13

Posted by "Sean Redmond (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-2575?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean Redmond updated TAPESTRY-2575:
-----------------------------------

        Fix Version/s:     (was: 5.0.10)
                       unspecified
    Affects Version/s:     (was: 5.0.8)
                       5.0.13

> Disabled fields still perfom client side validation in 5.0.13
> -------------------------------------------------------------
>
>                 Key: TAPESTRY-2575
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2575
>             Project: Tapestry
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.0.13
>            Reporter: Sean Redmond
>            Assignee: Howard M. Lewis Ship
>             Fix For: unspecified
>
>
> When disabling  Fields (eg. TextField) by setting disabled=true to use them as displaying only components, those components still perform client side validation and show error messages

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAPESTRY-2575) Disabled fields still perfom client side validation in 5.0.13

Posted by "Sean Redmond (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-2575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12621489#action_12621489 ] 

Sean Redmond commented on TAPESTRY-2575:
----------------------------------------

This issue has not been resolved as indicated in the previous TAPESTRY-2052 log.

I have a form with most fields having validate="required" and  t:disabled="readOnlyOnFieldXXX".  The fields are disabled as expected but when submitting the form, the disabled fields are marked with validation errors but no validation error messages are shown.  I am not modifying the disabled flag on form fields once rendered. 

> Disabled fields still perfom client side validation in 5.0.13
> -------------------------------------------------------------
>
>                 Key: TAPESTRY-2575
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2575
>             Project: Tapestry
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.0.8
>            Reporter: Sean Redmond
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.0.10
>
>
> When disabling  Fields (eg. TextField) by setting disabled=true to use them as displaying only components, those components still perform client side validation and show error messages

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Issue Comment Edited: (TAPESTRY-2575) Disabled fields still perfom client side validation in 5.0.13

Posted by "Sean Redmond (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-2575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12621499#action_12621499 ] 

redmondcs edited comment on TAPESTRY-2575 at 8/18/08 5:56 AM:
-----------------------------------------------------------------

Well, I was creating a demo page to recreate the problem and managed to find what my issue was (Tapestry is so fast that I didn't notice it actually did submit the page).  The validation errors are a result of the Tapestry re-examining the disabled status of the fields during the "rewind/validation" stage of the submit.  In my case, the disabled status reverted to false because I did not persist the properties used to determine the disabled state.  I was under the impression that Tapestry 5 did not need to re-evaluate form data in this fashion and would have retained this information internally as it does for most other form related information (i.e. my setupRender does not get called twice like in Tapestry 4).

Anyways, this is probably a misunderstanding on my part but could be a bug.

Sean

      was (Author: redmondcs):
    Well, I was creating a demo page to recreate the problem and couldn't.  I tracked it down to my method of submitting forms.  

I created a SubmitLink component which embeds a hidden submit button and triggers it's click event via javascript.

The render section of the component is

        // now the submit
        writer.element("input", "type", "submit", "name", elementName, "id", getClientId(), "style","display:none;");
        writer.end();

        // now the link
        writer.element("a", "href", "#", "name", elementName + "Link","onclick", "javascript:document.getElementById('"+getClientId()+"').click()");
        _resources.renderInformalParameters(writer);

Up until now, this has worked very well and enables one to create better image based buttons with dynamic text vs the standard submit button currently available.

So the problem is really related to javascript triggered submit's from other events.

  
> Disabled fields still perfom client side validation in 5.0.13
> -------------------------------------------------------------
>
>                 Key: TAPESTRY-2575
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2575
>             Project: Tapestry
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.0.13
>            Reporter: Sean Redmond
>            Assignee: Howard M. Lewis Ship
>             Fix For: unspecified
>
>
> When disabling  Fields (eg. TextField) by setting disabled=true to use them as displaying only components, those components still perform client side validation and show error messages

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAPESTRY-2575) Disabled fields still perfom client side validation in 5.0.13

Posted by "Sean Redmond (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-2575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12621499#action_12621499 ] 

Sean Redmond commented on TAPESTRY-2575:
----------------------------------------

Well, I was creating a demo page to recreate the problem and couldn't.  I tracked it down to my method of submitting forms.  

I created a SubmitLink component which embeds a hidden submit button and triggers it's click event via javascript.

The render section of the component is

        // now the submit
        writer.element("input", "type", "submit", "name", elementName, "id", getClientId(), "style","display:none;");
        writer.end();

        // now the link
        writer.element("a", "href", "#", "name", elementName + "Link","onclick", "javascript:document.getElementById('"+getClientId()+"').click()");
        _resources.renderInformalParameters(writer);

Up until now, this has worked very well and enables one to create better image based buttons with dynamic text vs the standard submit button currently available.

So the problem is really related to javascript triggered submit's from other events.


> Disabled fields still perfom client side validation in 5.0.13
> -------------------------------------------------------------
>
>                 Key: TAPESTRY-2575
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2575
>             Project: Tapestry
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.0.13
>            Reporter: Sean Redmond
>            Assignee: Howard M. Lewis Ship
>             Fix For: unspecified
>
>
> When disabling  Fields (eg. TextField) by setting disabled=true to use them as displaying only components, those components still perform client side validation and show error messages

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org