Results 1 to 2 of 2

Thread: sf:clientTextValidator removes styleClass in the textfield

  1. #1
    Join Date
    Mar 2010
    Posts
    2

    Default sf:clientTextValidator removes styleClass in the textfield

    Hi,
    When the text field is wrapped in sf:clientTextValidator, any style applied to the text field is completely lost. The generated source code for the input field does not have any style class information in it.
    <sf:clientTextValidator required="false" regExp="[0-9]*" invalidMessage="0 or more digits">
    <h:inputText styleClass="med roundTiny" id="phoneNumber" maxlength="50" value="#{partySearchCriteria.phoneNumber}"/>
    </sf:clientTextValidator>
    Inline style gets applies, but the text field and cursor position become out of sync.
    -------------text field styles (do not get applied) --------
    input[type="text"], input[type="password"] {
    background:#fff url('../images/gradients/input.jpg') repeat-x;
    padding:4px;
    height:14px;
    border:1px solid #ccc;
    margin-right:5px;
    }

    Thanks for your help
    Atif

  2. #2
    Join Date
    Nov 2008
    Posts
    742

    Default

    I think the sf components use DOJO's tundra styleClass, so you may need to add the class. I believe SWF now has a way to add your own styling to sf components, but I haven't looked into it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •