[CLOSED] TextField.stripCharsRe missing from C# API?

  1. #1

    [CLOSED] TextField.stripCharsRe missing from C# API?

    I could not find a property for stripCharsRe. Is there a replacement? Here is the link to the extjs doc:

    http://docs.sencha.com/ext-js/3-4/#!/api/Ext.form.TextField-cfg-stripCharsRe


    I want to use it to trim any leading or trailing spaces around text values.
    Last edited by Daniil; Nov 21, 2011 at 1:07 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Missed, we will add. Thanks for the report.

    For now, you can add it as an item of CustomConfig.

    Example
    <ext:TextField runat="server">
        <CustomConfig>
            <ext:ConfigItem Name="stripCharsRe" Value="new RegExp('', 'gi')" Mode="Raw" />
        </CustomConfig>
    </ext:TextField>
  3. #3
    The bug ticket has been created.
    https://extnet.lighthouseapp.com/pro...gs/tickets/224

    The fix has been added to SVN, revision #3778.

    The fix will be publicly available with the upcoming 1.3 release.


    Though there is another issue - it doesn't allow to set up modifiers.

    I'd consider it as a bug. We are investigating a fix.
  4. #4
    The bug ticket has been created.
    https://extnet.lighthouseapp.com/pro...gs/tickets/225

    The fix has been added to SVN, revision #3779.

    The fix will be publicly available with the upcoming 1.3 release.

    Now the following is possible.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void Set(object sender, DirectEventArgs e)
        {
            this.TextField1.StripCharsRe = "new RegExp('a','g')";
        }
    </script>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.Net Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:TextField 
                ID="TextField1" 
                runat="server" 
                Width="200"
                StripCharsRe="new RegExp('0','g')"
                EmptyText="stripCharsRe : new RegExp('0','g')" 
                ValidationEvent="blur" />
            <ext:Button 
                runat="server" 
                Text="Set stripCharsRe to new RegExp('a','g')'" 
                OnDirectClick="Set" />
        </form>
    </body>
    </html>
  5. #5
    Thank you for the prompt response. One thing I wanted to mention, perhaps the reason it was missing was that the member was not declared in the extjs source code? If yes, there might be others.

        /**
         * @cfg {RegExp} stripCharsRe A JavaScript RegExp object used to strip unwanted content from the value
         * before validation (defaults to <tt>null</tt>).
         */
        /**
         * @cfg {Boolean} grow <tt>true</tt> if this field should automatically grow and shrink to its content
         * (defaults to <tt>false</tt>)
         */
        grow : false,
  6. #6
    Well, no.

    The reason was the fact that we missed that.

    Though, ExtJS should explicitly set up the default value of stripCharsRe to null since they declared "defaults to null". The same way as it's for "maskRe".

    Or declare "default to undefined".

    Anyways, it doesn't break anything. Just a bit confuse.

Similar Threads

  1. [CLOSED] stripCharsRe & Field.ValidateDelay question
    By bogc in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 14, 2011, 5:09 AM
  2. Replies: 7
    Last Post: Dec 05, 2011, 11:52 AM
  3. missing dll
    By ashton.lamont in forum Examples and Extras
    Replies: 2
    Last Post: Jul 07, 2010, 10:59 PM
  4. [CLOSED] Slate Theme Missing v1.0
    By rthiney in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Mar 04, 2010, 4:02 AM
  5. [CLOSED] SVN possibile element missing
    By Immobilmente in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Mar 10, 2009, 1:55 PM

Posting Permissions