網頁

2015年1月16日 星期五

EJB更新失敗後,無法重新部署

今天在更新EAR檔時,因為異常導致更新失敗。
然後專案就消失在列表上...,也不能安裝新的同名專案。

錯誤訊息:
A composition unit with name myApp.ear already exists. Select a different application name.

解決方法:
刪掉異常沒有正常刪除的檔案。
<profile root>/config/cells/cellname/applications/PA_myApp
<profile root>/config/cells/cellname/blas/PA_myApp
<profile root>/config/cells/cellname/cus/PA_myApp

簡單的方法就是,搜尋你的專案名稱,出現的資料夾通通刪掉就好了。

2014年12月22日 星期一

解決IE11無法正確取得parent的問題

曾經遇過IE11開啟新視窗處理新事件,結果卻取不到回傳值,ie10以前版本及火狐、chrome都正常。
所以記錄下來備忘。

JavaScript使用Server帶下來的變數

有時候在JS中會想要直接取用資料,不想另外存在INPUT中,可以使用這個方法。

JavaScript欄位限制輸入整數

//限制輸入整數
 function ValidateNumber(e, pnumber) {
      if (!/^\d+$/.test(pnumber)) {
          var newValue =/^\d+/.exec(e.value);        
          if (newValue != null) {            
              e.value = newValue;       
          } else {         
              e.value = "";   
          }
      }
      return false;
  }

2014年12月18日 星期四

JQGrid開啟時,跟Server要資料

通常在EditForm中有使用select的時候,會在colModel加入buildSelect,使EditForm打開的時候跟Server要select的資料回來填充。
剛好遇到一個問題,Form中的select,在Edit的時候要disable,Add的時候則要enable。

在JavaScript中操作CKEditor

下面列幾個自己有實際用過的。