<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    無聊人士

    搬家==》www.soapui.cn

      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
      32 隨筆 :: 0 文章 :: 60 評論 :: 0 Trackbacks

    2007年4月7日 #

    struts 2.0.6GA開始試螃蟹,照著struts2的tag文檔寫成<@s.datetimepicker/>,結果老是報錯
    211672?[http-8080-Processor25]?ERROR?freemarker.runtime??-?
    on?line?
    7,?column?17?in?admin/index.ftl?s.datetimepicker?not?found.
    The?problematic?instruction:
    ----------
    ==>?user-directive?s.datetimepicker?[on?line?7,?column?17?in?admin/index.ftl]
    ----------

    Java?backtrace?for?programmers:
    ----------
    freemarker.core.InvalidReferenceException:?on?line?
    7,?column?17?in?admin/index.ftl?s.datetimepicker?not?found.

    試著google一下,正好有人也提交了這個bug,改成 <@s.dateTimePicker />,問題解決

    The?fix?is?as?follows:

    In?struts2-core-
    2.0.6:
    org.apache.struts2.views.freemarker.tags.StrutsModels

    has?a?method
    getDateTimePicker()

    Which?should?be?re-named:
    getDatetimepicker()

    to?match?with?the?naming?convention.


    hello,struts2.jpg
    posted @ 2007-04-20 10:26 mmwy 閱讀(2597) | 評論 (0)編輯 收藏

    來自:http://www.javaworld.com.tw/jute/post/print?bid=11&id=166588

    3.Re:BIRT報表工具的問題?[Re:?uxa]?????Copy?to?clipboard
    Posted?by:?uxa
    Posted?on:?
    2006-09-15?15:28

    經過幾次的失敗後~~小弟終於試出來了
    不過感覺它似乎只是support?xls?file?format並沒有excel的一些功能>?<

    1.?download?eclipse?plugin?BIRT,小弟抓的是birt-report-designer-all-in-one-2_1_0.zip
    將其解開後把eclipse\plugins和eclipse\features這兩個目錄放到eclipse的目錄底下
    現在將eclipse打開,您已經可以開始設計報表了。

    2.?BIRT預設有支援HTML和PDF的格式,以下說明如何支援xls格式
    a.?download?xls-emitter-bin_2
    .1.0.zip,解開後將plugins複製到eclipse\plugins下
    b.?download?poi-bin-
    3.0-alpha2-20060616.zip,解開後將jar檔複製到eclipse\plugins\?org.uguess.birt.report.engine.emitter.xls_2.1.0.200607031206\lib
    c.?xls-emitter-bin_2
    .1.0.zip解開後有個path的目錄,
    (
    1)?將org.eclipse.birt.report.designer.ui目錄下的檔案複製到eclipse\plugins\org.eclipse.birt.report.designer.ui.preview_2.1.0.*.jar
    (
    2)將org.eclipse.birt.report.viewer目錄下的檔案複製到eclipse\plugins\?org.eclipse.birt.report.viewer_2.1.0.*\birt\WEB-INF\lib\viewservlets.jar
    (
    3)將org.eclipse.birt.report.engine目錄下的檔案複製到eclipse\plugins\org.eclipse.birt.report.engine_2.1.0.*.jar

    完成後啟動eclipse可看到在view?report的按鈕上多了xls和ppt兩種格式

    BIRT下載位置:http://download.eclipse.org/birt/downloads/
    Tribix下載位置:https://sourceforge.net/projects/tribix
    ps:請注意版本的問題,BIRT2
    .1.0請搭配Tribix?XLS?Emitter?2.1.0版本,在置換檔名的部份也請注意路徑是否正確

    posted @ 2007-04-08 15:42 mmwy 閱讀(1624) | 評論 (2)編輯 收藏

    條碼顯示,在birt中最常見的有兩種方法:1、使用條碼字體(對pdf無效);2、用barcode的開源包,生成barcode,然后在報表里用動態地址去取圖片。

    今晚看birt文檔(第 23 章 使用 Java 編寫事件處理程序),例子中用java實現了一個LabelEventAdapter的適配器,對標簽元素進行事件控制。腦子里靈光一現,似乎條碼有著落了。

    我的測試例子很簡單,繼承ImageEventAdapter類,重載onCreate方法,以進行條形碼處理

    ?1?package?cn.ynzc.common.birt.test;
    ?2?
    ?3?import?java.io.File;
    ?4?import?java.io.FileOutputStream;
    ?5?
    ?6?import?jbarcodebean.Code128;
    ?7?import?jbarcodebean.JBarcodeBean;
    ?8?
    ?9?import?org.apache.commons.codec.digest.DigestUtils;
    10?import?org.eclipse.birt.report.engine.api.script.IReportContext;
    11?import?org.eclipse.birt.report.engine.api.script.eventadapter.ImageEventAdapter;
    12?import?org.eclipse.birt.report.engine.api.script.instance.IImageInstance;
    13?
    14?public?class?MyLabelClass?extends?ImageEventAdapter?{
    15?
    16???public?void?onCreate(IImageInstance?image,?IReportContext?reportContext)?{
    17?????try?{
    18???????//實際應用中,可以使用image.getRowData().getColumnValue("columnname")獲得字段值
    19???????String?code?=?"ABCDEF123-2222";
    20???????//似乎windows文件名中不允許使用“-”等符號,干脆將code進行md5散列處理
    21???????File?file?=?new?File(System.getProperty("java.io.tmpdir"),?DigestUtils.md5Hex(code));
    22???????//避免每次都進行條碼文件生成
    23???????if?(!file.exists())?{
    24?????????JBarcodeBean?bb?=?new?JBarcodeBean();
    25?????????bb.setCodeType(new?Code128());
    26?????????bb.setShowText(true);
    27?????????bb.setBarcodeHeight(45);?//條碼高度
    28?????????bb.setCode(code);
    29?????????bb.gifEncode(new?FileOutputStream(file));
    30???????}
    31???????image.setFile(file.getAbsolutePath());
    32?????}
    33?????catch?(Exception?e)?{
    34???????e.printStackTrace();
    35?????}
    36???}
    37?
    38?}
    39?

    測試用的birt報表文件簡單得要死,就往上面扔了個image元素,設置其Event Handler Class為剛才寫好的java類,最終得到的rptdesign文件內容如下:
    ?1?<?xml?version="1.0"?encoding="UTF-8"?>
    ?2?<!--?Written?by?Eclipse?BIRT?2.0?-->
    ?3?<report?xmlns="http://www.eclipse.org/birt/2005/design"?version="3.2.6"?id="1">
    ?4?????<property?name="createdBy">Eclipse?BIRT?Designer?Version?2.1.2.v20070205-1728?Build?&lt;20070205-1728></property>
    ?5?????<property?name="units">in</property>
    ?6?????<page-setup>
    ?7?????????<simple-master-page?name="Simple?MasterPage"?id="2"/>
    ?8?????</page-setup>
    ?9?????<body>
    10?????????<image?id="4">
    11?????????????<property?name="eventHandlerClass">cn.ynzc.common.birt.test.MyLabelClass</property>
    12?????????</image>
    13?????</body>
    14?</report>

    運行測試,條形碼出來了
    birt.jpg

    遺留問題:
    這次是調用org.eclipse.birt.report.engine.api.script.instance.IImageInstance.setFile()來解決問題,從javadoc可以看到,IImageInstance有很多方法可以調用,其它方法分別有什么作用?比如我嘗試了半天的setData(byte[])方法,一開始以為是用這個方法直接把圖形數據set進去就ok,結果未成功。


    posted @ 2007-04-07 03:37 mmwy 閱讀(4231) | 評論 (4)編輯 收藏

    主站蜘蛛池模板: 亚洲桃色AV无码| 亚洲区不卡顿区在线观看| 久久精品国产亚洲AV无码偷窥| 国产精品一区二区三区免费 | 亚洲人成在线电影| 国产免费播放一区二区| 亚洲综合区小说区激情区| 人成电影网在线观看免费| 亚洲av无码成人精品区| 一级黄色免费大片| 亚洲精品字幕在线观看| 亚洲a一级免费视频| 亚洲精品综合久久中文字幕| 免费三级毛片电影片| 中文字幕亚洲精品无码| 全部免费a级毛片| 国产福利免费视频| 亚洲无线电影官网| 一二三四免费观看在线电影 | 黄色毛片免费网站| 亚洲无线观看国产精品| 久久久久久国产精品免费无码| 激情亚洲一区国产精品| 国产精品免费看香蕉| 成全在线观看免费观看大全 | 亚洲视频一区二区| 青青草原1769久久免费播放| 亚洲免费二区三区| 哒哒哒免费视频观看在线www| 三级毛片在线免费观看| 99ri精品国产亚洲| 国产成人免费手机在线观看视频| selaoban在线视频免费精品| 91精品国产亚洲爽啪在线影院| 成人免费福利电影| 可以免费观看的毛片| 久久亚洲精品国产亚洲老地址| 亚洲精品国产精品国自产观看| 精品成在人线AV无码免费看| 曰批免费视频播放免费| 911精品国产亚洲日本美国韩国|