You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Paul Mander (JIRA)" <de...@myfaces.apache.org> on 2008/03/05 11:25:40 UTC

[jira] Created: (TRINIDAD-992) Validator as child of tr:inputText causes "label jumping" when client side validation enabled

Validator as child of tr:inputText causes "label jumping" when client side validation enabled
---------------------------------------------------------------------------------------------

                 Key: TRINIDAD-992
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-992
             Project: MyFaces Trinidad
          Issue Type: Bug
    Affects Versions: 1.0.6-core
         Environment: IE7
            Reporter: Paul Mander
            Priority: Minor


Using panelFormLayout, an inputText and a validator causes labels to jump if client side validation is enabled.

Consider the following markup

      <ui:composition>
              <tr:form>
                     <tr:panelFormLayout>
                           <tr:inputText id="cardNumberInputText" label="Card Number"
                                  value="#{pageBean.cardNumber}">
                                  <tr:validateRegExp pattern="^[0-9]+" />
                           </tr:inputText>
                     </tr:panelFormLayout>
                     <tr:commandButton text="Next" action="#{pageBean.next}"/>
              </tr:form>
       </ui:composition>

If the minimal skin is used or client validation is disabled (amounts to the same thing), then labels appear to jump when the page is submitted.

See attached screen shots

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


RE: [jira] Created: (TRINIDAD-992) Validator as child of tr:inputText causes "label jumping" when cl

Posted by Dave Brunette <db...@hotmail.com>.


     Hi Paul.



     I had been investigating a very similar (if not the same) issue
recently.  What skin are you using?  minimal, simple, your own?  I
noticed this problem happening with either the simple skin or my own...
but everything was OK using minimal.  If I added the following into my
own skin, then the issue went away.



af|panelFormLayout::message-cell {

    padding:  1px 0px;

}



     The value that the message-cell was getting without this selector
specified was "padding:  0px;".  I have to admit, I don't know exactly
what that's all about since CSS isn't my strongest subject.  Hopefully
it helps...



Dave

> Date: Wed, 5 Mar 2008 02:25:40 -0800
> From: dev@myfaces.apache.org
> To: dev@myfaces.apache.org
> Subject: [jira] Created: (TRINIDAD-992) Validator as child of tr:inputText causes "label jumping" when client side validation enabled
> 
> Validator as child of tr:inputText causes "label jumping" when client side validation enabled
> ---------------------------------------------------------------------------------------------
> 
>                  Key: TRINIDAD-992
>                  URL: https://issues.apache.org/jira/browse/TRINIDAD-992
>              Project: MyFaces Trinidad
>           Issue Type: Bug
>     Affects Versions: 1.0.6-core
>          Environment: IE7
>             Reporter: Paul Mander
>             Priority: Minor
> 
> 
> Using panelFormLayout, an inputText and a validator causes labels to jump if client side validation is enabled.
> 
> Consider the following markup
> 
>       <ui:composition>
>               <tr:form>
>                      <tr:panelFormLayout>
>                            <tr:inputText id="cardNumberInputText" label="Card Number"
>                                   value="#{pageBean.cardNumber}">
>                                   <tr:validateRegExp pattern="^[0-9]+" />
>                            </tr:inputText>
>                      </tr:panelFormLayout>
>                      <tr:commandButton text="Next" action="#{pageBean.next}"/>
>               </tr:form>
>        </ui:composition>
> 
> If the minimal skin is used or client validation is disabled (amounts to the same thing), then labels appear to jump when the page is submitted.
> 
> See attached screen shots
> 
> -- 
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
> 

_________________________________________________________________
Climb to the top of the charts! Play the word scramble challenge with star power.
http://club.live.com/star_shuffle.aspx?icid=starshuffle_wlmailtextlink_jan

[jira] Resolved: (TRINIDAD-992) Validator as child of tr:inputText causes "label jumping" when client side validation enabled

Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/TRINIDAD-992?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthias Weßendorf resolved TRINIDAD-992.
-----------------------------------------

       Resolution: Fixed
    Fix Version/s:  1.2.11-core
                    1.0.11-core

> Validator as child of tr:inputText causes "label jumping" when client side validation enabled
> ---------------------------------------------------------------------------------------------
>
>                 Key: TRINIDAD-992
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-992
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>    Affects Versions: 1.0.6-core
>         Environment: IE7
>            Reporter: Paul Mander
>            Assignee: Matthias Weßendorf
>             Fix For:  1.0.11-core,  1.2.11-core
>
>         Attachments: pre submit.jpg, submit.jpg
>
>
> Using panelFormLayout, an inputText and a validator causes labels to jump if client side validation is enabled.
> Consider the following markup
>       <ui:composition>
>               <tr:form>
>                      <tr:panelFormLayout>
>                            <tr:inputText id="cardNumberInputText" label="Card Number"
>                                   value="#{pageBean.cardNumber}">
>                                   <tr:validateRegExp pattern="^[0-9]+" />
>                            </tr:inputText>
>                      </tr:panelFormLayout>
>                      <tr:commandButton text="Next" action="#{pageBean.next}"/>
>               </tr:form>
>        </ui:composition>
> If the minimal skin is used or client validation is disabled (amounts to the same thing), then labels do not jump when the page is submitted.
> See attached screen shots

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


[jira] Commented: (TRINIDAD-992) Validator as child of tr:inputText causes "label jumping" when client side validation enabled

Posted by "Carsten Pieper (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12585418#action_12585418 ] 

Carsten Pieper commented on TRINIDAD-992:
-----------------------------------------

As a side note: This issue is related to http://www.nabble.com/-TRINIDAD--In-Internet-Explorer%2C-fidgety-behaviour-of-panelFormLayout-with-inputDate-tc16467494.html
Pauls solution solves that bug, too!

> Validator as child of tr:inputText causes "label jumping" when client side validation enabled
> ---------------------------------------------------------------------------------------------
>
>                 Key: TRINIDAD-992
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-992
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>    Affects Versions: 1.0.6-core
>         Environment: IE7
>            Reporter: Paul Mander
>         Attachments: pre submit.jpg, submit.jpg
>
>
> Using panelFormLayout, an inputText and a validator causes labels to jump if client side validation is enabled.
> Consider the following markup
>       <ui:composition>
>               <tr:form>
>                      <tr:panelFormLayout>
>                            <tr:inputText id="cardNumberInputText" label="Card Number"
>                                   value="#{pageBean.cardNumber}">
>                                   <tr:validateRegExp pattern="^[0-9]+" />
>                            </tr:inputText>
>                      </tr:panelFormLayout>
>                      <tr:commandButton text="Next" action="#{pageBean.next}"/>
>               </tr:form>
>        </ui:composition>
> If the minimal skin is used or client validation is disabled (amounts to the same thing), then labels do not jump when the page is submitted.
> See attached screen shots

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


[jira] Commented: (TRINIDAD-992) Validator as child of tr:inputText causes "label jumping" when client side validation enabled

Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12647565#action_12647565 ] 

Matthias Weßendorf commented on TRINIDAD-992:
---------------------------------------------

applied the provided patch from Paul Mander. Thanks for the patch, paul!

> Validator as child of tr:inputText causes "label jumping" when client side validation enabled
> ---------------------------------------------------------------------------------------------
>
>                 Key: TRINIDAD-992
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-992
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>    Affects Versions: 1.0.6-core
>         Environment: IE7
>            Reporter: Paul Mander
>            Assignee: Matthias Weßendorf
>             Fix For:  1.0.11-core,  1.2.11-core
>
>         Attachments: pre submit.jpg, submit.jpg
>
>
> Using panelFormLayout, an inputText and a validator causes labels to jump if client side validation is enabled.
> Consider the following markup
>       <ui:composition>
>               <tr:form>
>                      <tr:panelFormLayout>
>                            <tr:inputText id="cardNumberInputText" label="Card Number"
>                                   value="#{pageBean.cardNumber}">
>                                   <tr:validateRegExp pattern="^[0-9]+" />
>                            </tr:inputText>
>                      </tr:panelFormLayout>
>                      <tr:commandButton text="Next" action="#{pageBean.next}"/>
>               </tr:form>
>        </ui:composition>
> If the minimal skin is used or client validation is disabled (amounts to the same thing), then labels do not jump when the page is submitted.
> See attached screen shots

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


[jira] Commented: (TRINIDAD-992) Validator as child of tr:inputText causes "label jumping" when client side validation enabled

Posted by "Paul Mander (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TRINIDAD-992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12584564#action_12584564 ] 

Paul Mander commented on TRINIDAD-992:
--------------------------------------

I've got a solution to this problem now. It appears there is a defect in Core.js - _function _validateInline(form, source, validators).

In this function, the code attempts to clear the old message by setting the innerHTML to "". This works in Firefox but takes up space in IE.

if (msgElem)
      msgElem.innerHTML = "";

A better check would be

if (msgElem && messageElem.innerHTML !="")
      msgElem.innerHTML = "";

Or even better, use some IE save way of removing all children from the msgElem. Can someone commit a fix for this please?

> Validator as child of tr:inputText causes "label jumping" when client side validation enabled
> ---------------------------------------------------------------------------------------------
>
>                 Key: TRINIDAD-992
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-992
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>    Affects Versions: 1.0.6-core
>         Environment: IE7
>            Reporter: Paul Mander
>         Attachments: pre submit.jpg, submit.jpg
>
>
> Using panelFormLayout, an inputText and a validator causes labels to jump if client side validation is enabled.
> Consider the following markup
>       <ui:composition>
>               <tr:form>
>                      <tr:panelFormLayout>
>                            <tr:inputText id="cardNumberInputText" label="Card Number"
>                                   value="#{pageBean.cardNumber}">
>                                   <tr:validateRegExp pattern="^[0-9]+" />
>                            </tr:inputText>
>                      </tr:panelFormLayout>
>                      <tr:commandButton text="Next" action="#{pageBean.next}"/>
>               </tr:form>
>        </ui:composition>
> If the minimal skin is used or client validation is disabled (amounts to the same thing), then labels do not jump when the page is submitted.
> See attached screen shots

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