[CLOSED] Uncaught Error: Syntax error, unrecognized expression: li.\

  1. #1

    [CLOSED] Uncaught Error: Syntax error, unrecognized expression: li.\


        <ext:DataView ID="DataView1" runat="server" ItemSelector="ul.sc_case"
                        EmptyText="<li>暂无数据</li>">
                        <Store>
                            <ext:Store runat="server" ID="store1" OnReadData="LoadCases" PageSize="6">
                                <Model>
                                    <ext:Model runat="server">
                                        <Fields>
                                            <ext:ModelField Name="id"></ext:ModelField>
                                            <ext:ModelField Name="name"></ext:ModelField>
                                            <ext:ModelField Name="img"></ext:ModelField>
                                            <ext:ModelField Name="info"></ext:ModelField>
                                            <ext:ModelField Name="price"></ext:ModelField>
                                        </Fields>
                                    </ext:Model>
                                </Model>
                                <Proxy>
                                    <ext:PageProxy></ext:PageProxy>
                                </Proxy>
                            </ext:Store>
                        </Store>
                        <Tpl ID="Tpl1" runat="server">
                            <Html>
                                <tpl for="."> 
                                    <li class="picUl-son">
                                        <div class="pic"><a href="#?id={id}" title="fdfdfdf"><img src="{img}" width="196" height="146" alt="{name}" class="PicAuto" style="padding: 0px;"/></a></div>
                                        <div class="text"><a href="#?id={id}" title="{name}">{name}</a></div>
                                    </li>   
                                 </tpl>
                            </Html>
                        </Tpl>
                    </ext:DataView>
    what's the meaning of
     <tpl for=".">
     ItemSelector="ul.sc_case"
    what cause the error:Uncaught Error: Syntax error, unrecognized expression: li.\
    Attached Thumbnails Click image for larger version. 

Name:	QQ??20140607222557.png 
Views:	60 
Size:	19.4 KB 
ID:	12311   Click image for larger version. 

Name:	QQ??20140607222938.png 
Views:	85 
Size:	32.7 KB 
ID:	12321  
    Last edited by Daniil; Jun 17, 2014 at 11:39 AM. Reason: [CLOSED]
  2. #2
    Quote Originally Posted by hdsoso View Post
    what's the meaning of
     <tpl for=".">
    It means that it iterates a data array which is loaded by Store.

    More information about Template syntax you can find here.
    http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.XTemplate

    Quote Originally Posted by hdsoso View Post
    what's the meaning of
     ItemSelector="ul.sc_case"
    It is best to start with a doc article.
    http://docs.sencha.com/extjs/4.2.1/#...g-itemSelector

    Quote Originally Posted by hdsoso View Post
    what cause the error:Uncaught Error: Syntax error, unrecognized expression: li.\
    I could not reproduce that with your piece of code and I don't quite have any ideas what might be wrong. Please provide a full test case.

Similar Threads

  1. Replies: 3
    Last Post: Oct 10, 2013, 4:03 PM
  2. Replies: 7
    Last Post: Jun 11, 2013, 4:54 AM
  3. Replies: 0
    Last Post: Aug 09, 2012, 1:27 PM
  4. Replies: 17
    Last Post: Oct 12, 2011, 4:54 PM
  5. Replies: 4
    Last Post: Jan 25, 2011, 10:39 AM

Posting Permissions