加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

flex template 的问题

发布时间:2020-12-15 01:09:58 所属栏目:百科 来源:网络整理
导读:参考文档 1. 关于flex html template wrapper (以后的文章详细讲解): http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf663fe-7fff.html 2. Creating a wrapper: http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3

参考文档

1. 关于flex html template wrapper (以后的文章详细讲解): http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf663fe-7fff.html


2. Creating a wrapper: http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7ecf.html


3. 把html template转为jsp template: http://www.morearty.com/blog/2006/12/11/changing-the-filenames-in-flex-builder-html-templates/


当你create a flex project时,by default会在"html-template" folder下生成一个"index.template.html" file,当你创建一个mxml flex application时,就会以该file来做template,生成一个html file,来把mxml对应的swf wrap进去


如果你想生成jsp来wrap it,该怎么办呢?


首先前提应该是把该flex app作为一个java web app的一部分!


solution 1 (not perfect) 把"index.template.html" rename to "index.template.jsp"。(修改之后可能需要clean flex project)

该方法会生成一个index.jsp file来wrap flex app swf。

但产生的问题有2个:

1. 若你的flex project里有多个mxml application,则无法对每一个mxml app都生成一个jsp file,而是只生成一个index.jsp。

2. 你不能直接right click mxml application and select "Run as > web application",它会call web browser go to the html file,但not found (原因是你生成的是jsp)。因此你需要手动在URL里把".html"改成".jsp"


solution 2 (perfect) 把"index.template.html" rename to "${application}${build_suffix}.template.jsp"。(修改之后可能需要clean flex project)

该方法会解决solution 1的问题1,它可以对每一个mxml application swf都生成一个jsp来wrap it。

不过该方法没有解决问题2,依然需要手动把.html该为.jsp

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读