关于:Extjs中,请求调用velocity *.vm文件 问题?

我的邮箱:[email protected]

在treeTest.htm文件中,

MainPanel=function(){

this.urls=[];

this.homePage="pages/testvm.vm";//关键的调用,嵌入到extjs框架中。

this.currentUrl=this.homePage;

this.openTab=function(panel,id){

varo=(typeofpanel=="string"?panel:id||panel.id);

vartab=this.getComponent(o);

if(tab){

this.setActiveTab(tab);

}elseif(typeofpanel!="string"){

panel.id=o;

varp=this.add(panel);

this.setActiveTab(p);

}

};

。。。。。。。。

testvm.vm定义如下:

<divid="center2">

<h1>书的详细描述</h1>

<ahref="$link.setForward("searchEntry")">Searchagain</a>

<h3>$book.title</h3>

<b>ISBN:</b>$book.isbn<br>

<b>Title:</b>$book.title<br>

<b>Author:</b>$book.author<br>

<b>Price:</b>$book.price<br>

<b>NoPages:</b>$book.pages<br>

<b>Description:</b>$book.description<br>

<b>Publisher:</b>$book.publisher<br>

</div>

但是,部署后,没有数据返回。运行报以下错误:

2008-6-1611:01:06org.apache.catalina.core.ApplicationContextlog

信息:Velocity[info]ResourceManager:found/pages/testvm.vmwithloaderorg.apache.velocity.tools.view.servlet.WebappLoader

2008-6-1611:01:06org.apache.catalina.core.ApplicationContextlog

信息:Velocity[warn]org.apache.velocity.runtime.exception.ReferenceException:reference:template=/pages/testvm.vm[line17,column21]:$book.titleisnotavalidreference.

2008-6-1611:01:06org.apache.catalina.core.ApplicationContextlog

信息:Velocity[warn]org.apache.velocity.runtime.exception.ReferenceException:reference:template=/pages/testvm.vm[line19,column29]:$book.isbnisnotavalidreference.

2008-6-1611:01:06org.apache.catalina.core.ApplicationContextlog

信息:Velocity[warn]org.apache.velocity.runtime.exception.ReferenceException:reference:template=/pages/testvm.vm[line20,column30]:$book.titleisnotavalidreference.

2008-6-1611:01:06org.apache.catalina.core.ApplicationContextlog

信息:Velocity[warn]org.apache.velocity.runtime.exception.ReferenceException:reference:template=/pages/testvm.vm[line21,column31]:$book.authorisnotavalidreference.

2008-6-1611:01:06org.apache.catalina.core.ApplicationContextlog

信息:Velocity[warn]org.apache.velocity.runtime.exception.ReferenceException:reference:template=/pages/testvm.vm[line22,column30]:$book.priceisnotavalidreference.

2008-6-1611:01:06org.apache.catalina.core.ApplicationContextlog

信息:Velocity[warn]org.apache.velocity.runtime.exception.ReferenceException:reference:template=/pages/testvm.vm[line23,column33]:$book.pagesisnotavalidreference.

2008-6-1611:01:06org.apache.catalina.core.ApplicationContextlog

信息:Velocity[warn]org.apache.velocity.runtime.exception.ReferenceException:reference:template=/pages/testvm.vm[line24,column36]:$book.descriptionisnotavalidreference.

2008-6-1611:01:06org.apache.catalina.core.ApplicationContextlog

信息:Velocity[warn]org.apache.velocity.runtime.exception.ReferenceException:reference:template=/pages/testvm.vm[line25,column34]:$book.publisherisnotavalidreference.

不知道,为什么找不到路径,还请用的朋友,指点一下,谢谢:)

相关推荐