You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@click.apache.org by "Bob Schellink (JIRA)" <ji...@apache.org> on 2010/12/06 10:20:10 UTC

[jira] Created: (CLK-735) TabbedForm does not work with JavaScript validation

TabbedForm does not work with JavaScript validation
---------------------------------------------------

                 Key: CLK-735
                 URL: https://issues.apache.org/jira/browse/CLK-735
             Project: Click
          Issue Type: Bug
          Components: extras
    Affects Versions: 2.3.0-M1
            Reporter: Bob Schellink
            Priority: Minor
             Fix For: 2.3.0-RC1


Reported by Tomasz Bandura on the mailing list:

http://click.markmail.org/thread/5gimf2vn2y5yozzy

The TabbedForm.htm should check if $form.isJavaScriptValidation is on and render the html markup:

<tr style="display:none" id="$form.getId()-errorsTr">
  <td width='100%' align="$form.getErrorsAlign()">
    <div class="errors" id="$form.getId()-errorsDiv"></div>
  </td>
</tr>


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


[jira] Updated: (CLK-735) TabbedForm does not work with JavaScript validation

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

Tomasz Bandura updated CLK-735:
-------------------------------

    Attachment: tabbed-form-demo_htm.patch
                TabbedFormDemo_java.patch

Patch for tabbed form example: add Javascript option for form validation.

> TabbedForm does not work with JavaScript validation
> ---------------------------------------------------
>
>                 Key: CLK-735
>                 URL: https://issues.apache.org/jira/browse/CLK-735
>             Project: Click
>          Issue Type: Bug
>          Components: extras
>    Affects Versions: 2.3.0-M1
>            Reporter: Bob Schellink
>            Priority: Minor
>             Fix For: 2.3.0-RC1
>
>         Attachments: control_js.patch, tabbed-form-demo_htm.patch, TabbedForm_htm.patch, TabbedForm_java.patch, TabbedFormDemo_java.patch
>
>
> Reported by Tomasz Bandura on the mailing list:
> http://click.markmail.org/thread/5gimf2vn2y5yozzy
> The TabbedForm.htm should check if $form.isJavaScriptValidation is on and render the html markup:
> <tr style="display:none" id="$form.getId()-errorsTr">
>   <td width='100%' align="$form.getErrorsAlign()">
>     <div class="errors" id="$form.getId()-errorsDiv"></div>
>   </td>
> </tr>

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


[jira] Commented: (CLK-735) TabbedForm does not work with JavaScript validation

Posted by "Bob Schellink (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CLK-735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12974401#action_12974401 ] 

Bob Schellink commented on CLK-735:
-----------------------------------

No need for another patch, I'll merge it in.


Kind regards


Bob

> TabbedForm does not work with JavaScript validation
> ---------------------------------------------------
>
>                 Key: CLK-735
>                 URL: https://issues.apache.org/jira/browse/CLK-735
>             Project: Click
>          Issue Type: Bug
>          Components: extras
>    Affects Versions: 2.3.0-M1
>            Reporter: Bob Schellink
>            Priority: Minor
>             Fix For: 2.3.0-RC1
>
>         Attachments: control_js.patch, tabbed-form-demo_htm.patch, TabbedForm_htm.patch, TabbedForm_java.patch, TabbedFormDemo_java.patch
>
>
> Reported by Tomasz Bandura on the mailing list:
> http://click.markmail.org/thread/5gimf2vn2y5yozzy
> The TabbedForm.htm should check if $form.isJavaScriptValidation is on and render the html markup:
> <tr style="display:none" id="$form.getId()-errorsTr">
>   <td width='100%' align="$form.getErrorsAlign()">
>     <div class="errors" id="$form.getId()-errorsDiv"></div>
>   </td>
> </tr>

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


[jira] Resolved: (CLK-735) TabbedForm does not work with JavaScript validation

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

Bob Schellink resolved CLK-735.
-------------------------------

    Resolution: Fixed
      Assignee: Bob Schellink

fixed

> TabbedForm does not work with JavaScript validation
> ---------------------------------------------------
>
>                 Key: CLK-735
>                 URL: https://issues.apache.org/jira/browse/CLK-735
>             Project: Click
>          Issue Type: Bug
>          Components: extras
>    Affects Versions: 2.3.0-M1
>            Reporter: Bob Schellink
>            Assignee: Bob Schellink
>            Priority: Minor
>             Fix For: 2.3.0-RC1
>
>         Attachments: control_js.patch, tabbed-form-demo_htm.patch, TabbedForm_htm.patch, TabbedForm_java.patch, TabbedFormDemo_java.patch
>
>
> Reported by Tomasz Bandura on the mailing list:
> http://click.markmail.org/thread/5gimf2vn2y5yozzy
> The TabbedForm.htm should check if $form.isJavaScriptValidation is on and render the html markup:
> <tr style="display:none" id="$form.getId()-errorsTr">
>   <td width='100%' align="$form.getErrorsAlign()">
>     <div class="errors" id="$form.getId()-errorsDiv"></div>
>   </td>
> </tr>

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


[jira] Updated: (CLK-735) TabbedForm does not work with JavaScript validation

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

Tomasz Bandura updated CLK-735:
-------------------------------

    Attachment: TabbedForm_java.patch
                TabbedForm_htm.patch
                control_js.patch

Patches for javascript,java and html (javascript validation bug in tabbed form)

> TabbedForm does not work with JavaScript validation
> ---------------------------------------------------
>
>                 Key: CLK-735
>                 URL: https://issues.apache.org/jira/browse/CLK-735
>             Project: Click
>          Issue Type: Bug
>          Components: extras
>    Affects Versions: 2.3.0-M1
>            Reporter: Bob Schellink
>            Priority: Minor
>             Fix For: 2.3.0-RC1
>
>         Attachments: control_js.patch, TabbedForm_htm.patch, TabbedForm_java.patch
>
>
> Reported by Tomasz Bandura on the mailing list:
> http://click.markmail.org/thread/5gimf2vn2y5yozzy
> The TabbedForm.htm should check if $form.isJavaScriptValidation is on and render the html markup:
> <tr style="display:none" id="$form.getId()-errorsTr">
>   <td width='100%' align="$form.getErrorsAlign()">
>     <div class="errors" id="$form.getId()-errorsDiv"></div>
>   </td>
> </tr>

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


[jira] Commented: (CLK-735) TabbedForm does not work with JavaScript validation

Posted by "Tomasz Bandura (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CLK-735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12974227#action_12974227 ] 

Tomasz Bandura commented on CLK-735:
------------------------------------

Do you plan to commit this, or should i add it in my patch?

> TabbedForm does not work with JavaScript validation
> ---------------------------------------------------
>
>                 Key: CLK-735
>                 URL: https://issues.apache.org/jira/browse/CLK-735
>             Project: Click
>          Issue Type: Bug
>          Components: extras
>    Affects Versions: 2.3.0-M1
>            Reporter: Bob Schellink
>            Priority: Minor
>             Fix For: 2.3.0-RC1
>
>         Attachments: control_js.patch, tabbed-form-demo_htm.patch, TabbedForm_htm.patch, TabbedForm_java.patch, TabbedFormDemo_java.patch
>
>
> Reported by Tomasz Bandura on the mailing list:
> http://click.markmail.org/thread/5gimf2vn2y5yozzy
> The TabbedForm.htm should check if $form.isJavaScriptValidation is on and render the html markup:
> <tr style="display:none" id="$form.getId()-errorsTr">
>   <td width='100%' align="$form.getErrorsAlign()">
>     <div class="errors" id="$form.getId()-errorsDiv"></div>
>   </td>
> </tr>

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


[jira] Commented: (CLK-735) TabbedForm does not work with JavaScript validation

Posted by "Bob Schellink (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CLK-735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12974174#action_12974174 ] 

Bob Schellink commented on CLK-735:
-----------------------------------

Nice patches Tomasz, very nice. I'll start integrating them soon. The #macro is a good idea to cleanup some of the repetitive markup in TabbedForm.htm.

Couple of nights ago I worked on a JS version for finding the parent sheet. I'll paste it below for reference. Looking at your patch we could change it slightly to use the following function to lookup the tab instead of passing the field names array:

  onShowTab(Click.getTabSheetNumber(' + fieldId + '))

Click.getTabSheetNumber=function(id) {
    var node=document.getElementById(id);
    if(!node) return 1;
    var parent = node.parentNode;
    while(parent && !Click.isTabSheet(parent)) {
        parent = parent.parentNode;
    }
    if (parent) return parent.getAttribute("id").substr(10);
    return 1;
}

Click.isTabSheet=function(node) {
    if(!node) return false;
    var id=node.getAttribute('id');
    if(id){
        if(id.indexOf('tab-sheet-')>=0) return true;
    }
    return false;
}

Anyway, something to ponder a bit.

Kind regards

Bob

> TabbedForm does not work with JavaScript validation
> ---------------------------------------------------
>
>                 Key: CLK-735
>                 URL: https://issues.apache.org/jira/browse/CLK-735
>             Project: Click
>          Issue Type: Bug
>          Components: extras
>    Affects Versions: 2.3.0-M1
>            Reporter: Bob Schellink
>            Priority: Minor
>             Fix For: 2.3.0-RC1
>
>         Attachments: control_js.patch, tabbed-form-demo_htm.patch, TabbedForm_htm.patch, TabbedForm_java.patch, TabbedFormDemo_java.patch
>
>
> Reported by Tomasz Bandura on the mailing list:
> http://click.markmail.org/thread/5gimf2vn2y5yozzy
> The TabbedForm.htm should check if $form.isJavaScriptValidation is on and render the html markup:
> <tr style="display:none" id="$form.getId()-errorsTr">
>   <td width='100%' align="$form.getErrorsAlign()">
>     <div class="errors" id="$form.getId()-errorsDiv"></div>
>   </td>
> </tr>

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


[jira] Commented: (CLK-735) TabbedForm does not work with JavaScript validation

Posted by "Tomasz Bandura (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CLK-735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12973685#action_12973685 ] 

Tomasz Bandura commented on CLK-735:
------------------------------------

Please find attached patches proposal.

> TabbedForm does not work with JavaScript validation
> ---------------------------------------------------
>
>                 Key: CLK-735
>                 URL: https://issues.apache.org/jira/browse/CLK-735
>             Project: Click
>          Issue Type: Bug
>          Components: extras
>    Affects Versions: 2.3.0-M1
>            Reporter: Bob Schellink
>            Priority: Minor
>             Fix For: 2.3.0-RC1
>
>
> Reported by Tomasz Bandura on the mailing list:
> http://click.markmail.org/thread/5gimf2vn2y5yozzy
> The TabbedForm.htm should check if $form.isJavaScriptValidation is on and render the html markup:
> <tr style="display:none" id="$form.getId()-errorsTr">
>   <td width='100%' align="$form.getErrorsAlign()">
>     <div class="errors" id="$form.getId()-errorsDiv"></div>
>   </td>
> </tr>

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


[jira] Commented: (CLK-735) TabbedForm does not work with JavaScript validation

Posted by "Tomasz Bandura (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CLK-735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12967134#action_12967134 ] 

Tomasz Bandura commented on CLK-735:
------------------------------------

Hi,

Please also add 'onShowTab()' method for each error (e.g.  <a class="error" href="#" onclick="onShowTab(2);setFocus('form_city');"> You must enter a value for City </a>)
    	

regards

Tomasz

> TabbedForm does not work with JavaScript validation
> ---------------------------------------------------
>
>                 Key: CLK-735
>                 URL: https://issues.apache.org/jira/browse/CLK-735
>             Project: Click
>          Issue Type: Bug
>          Components: extras
>    Affects Versions: 2.3.0-M1
>            Reporter: Bob Schellink
>            Priority: Minor
>             Fix For: 2.3.0-RC1
>
>
> Reported by Tomasz Bandura on the mailing list:
> http://click.markmail.org/thread/5gimf2vn2y5yozzy
> The TabbedForm.htm should check if $form.isJavaScriptValidation is on and render the html markup:
> <tr style="display:none" id="$form.getId()-errorsTr">
>   <td width='100%' align="$form.getErrorsAlign()">
>     <div class="errors" id="$form.getId()-errorsDiv"></div>
>   </td>
> </tr>

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


[jira] Commented: (CLK-735) TabbedForm does not work with JavaScript validation

Posted by "Bob Schellink (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CLK-735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12968483#action_12968483 ] 

Bob Schellink commented on CLK-735:
-----------------------------------

Adding onShowTab is tricky as validation is done on client side. Essentially we need a new validateForm JS method geared for tabs. When a field is validated it needs to determine on which tab it is on. Anyone interested in implementing this or submitting a patch?

> TabbedForm does not work with JavaScript validation
> ---------------------------------------------------
>
>                 Key: CLK-735
>                 URL: https://issues.apache.org/jira/browse/CLK-735
>             Project: Click
>          Issue Type: Bug
>          Components: extras
>    Affects Versions: 2.3.0-M1
>            Reporter: Bob Schellink
>            Priority: Minor
>             Fix For: 2.3.0-RC1
>
>
> Reported by Tomasz Bandura on the mailing list:
> http://click.markmail.org/thread/5gimf2vn2y5yozzy
> The TabbedForm.htm should check if $form.isJavaScriptValidation is on and render the html markup:
> <tr style="display:none" id="$form.getId()-errorsTr">
>   <td width='100%' align="$form.getErrorsAlign()">
>     <div class="errors" id="$form.getId()-errorsDiv"></div>
>   </td>
> </tr>

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