當我使用Flex Builder要執(zhí)行debug的時候 他會出現
C:\WINDOWS\system32\Macromed\Flash\Flash10b.ocx
Flex Builder cannot locate the required debugger version of Flash Player. You might need to install the debugger version of Flash Player 9 or reinstall Flex Builder.
Do you want to try to debug with the current version?
這個問題的原因是由于flashplayer 升級到10了
List<Integer> projectids= projectServiceManagementService.listProjectByUserID(userid,usertype);
if( projectids.size()!=0 && projectids != null){
projectLists = projectServiceManagementService.getProjectListbyIds(projectids);
}
這段代碼中會有bug,bug在于當projectids 為null的時候 projectids.size()這個地方已經報錯了
所以正確的寫法應該是 if( projectids != null && projectids.size()!=0 )
1、Form中的dateField放到一個Ext.Window上之后依然會在firefox上出現過長問題,之前提到的方法不好使
2、一個Combo放到一個window上,遠程加載數據
當關掉窗口之后,第二次打開這個帶有combo的窗口,點下拉按鈕,不顯示數據
但是通過firebug看,數據已經取回來了
解決辦法
var Select_Project_Combo = function(){
var store = new Ext.data.JsonStore({
url: '/meetingseasy/projectService/listProjectAll.action',
root: 'projects',
fields: ['projectid', 'projectname']
});
var config = {
store : store,
displayField : 'projectname',
valueField : 'projectid',
typeAhead : true,
triggerAction : 'all',
//editable : false,
emptyText : '選擇工程...',
selectOnFocus : false,
listeners : {
select : function(combo, record, index) {
var projectid = record.data.projectid ;
Ext.Ajax.request({
url : 'meetingseasy/acceptProjectid.action',
success : selectProject_responseFn,
method:'POST',
//failure : responseFn,
params : {'projectid' : projectid}
});
}
}
};
function selectProject_responseFn(){
//alert("combo");
//var win = Ext.getCmp(projectComboWin);
//console.log(win);
}
Select_Project_Combo.superclass.constructor.call(this, config);
}
Ext.extend(Select_Project_Combo,Ext.form.ComboBox,{});
//Ext.ComponentMgr.registerType( 'ProjectCombo', ProjectCombo);
var SelectProject_windows = function(){
var _selectProjectCombo = new Ext.form.ComboBox({
id : 'projectComboWin',
……
store : new Ext.data.JsonStore({
url: '/projectService/listAll.action',
root: 'projects',
fields: ['projectid', 'projectname']
})
});
var config={
title : '選擇**項目',
width : 400, height : 200,
resizable : true,
//closeAction : 'hide', //就是這句話,當combo直接放在windows里面的時候,跟隨windows對象的生命周期,如果這里為hide的話,windows下次打開的時候沒變,而combo變了。所以下拉菜單不好用
modal : true
,items : _selectProjectCombo
}
SelectProject_windows.superclass.constructor.call(this, config);
}
Ext.extend(SelectProject_windows,Ext.Window,{});
今天報bug說,dataview數據重新load之后沒有刷新
我在dataview中加了 refresh : function(data) {
store.reloads(data);
},
提示reloads未定義~
改成refresh : function(data) {
store.reload(data);
},
之后初次render dataview的時候不停的reload~
現在action中有一個List<Day> days;
Day對象的定義
public class Day{
private List<Event> eventMorningList;
}
Event對象定義
public class Event{
private Integer id;
private Integer name;
// get set method
}
這個怎么顯示輸出比較好啊
打算做一個日歷表那樣的形式
一個周有一個列表,每天有一個list,list中是Event
我現在用freemarker,這樣寫好像是錯誤的
<#list days as pm>
${ pm.Event.name}
</#list>
輸出event name
因為在action直接拼table太麻煩了,感覺可視化效果不好,故打算采用freemarker這種標簽語言
但是好像freemarker不能搞對象中對象的屬性嘛
請教大家怎么搞?
謝謝大家給俺指點~
查了文檔以及別人做的flash樣式表
說是這句話
<mx:horizontalAxisRenderer>
<mx:AxisRenderer labelRotation="45" />
</mx:horizontalAxisRenderer>
但其實根本這句話好像不是我所需要的
我需要是坐標軸上的字顯示旋轉
所以只需要導入
@font-face
{
src: local("MyriadWebPro.ttf");
font-family: EmbeddedArial;
}
.myLineChart
{
font-family: EmbeddedArial;
}
字體需要MyriadWebPro.ttf下載
這個字體導入之后不需要加<mx:AxisRenderer labelRotation="45" />
方法就可以實現旋轉~
如果加了反而坐標重疊
.x-date-middle {
padding-top:2px;padding-bottom:2px;
width:130px; /* FF3 */
}
在頁面中加入此CSS樣式表
今天遇到一個FLEX的問題,需要對一個傳入的變量參數添加監(jiān)聽事件
搜了下,只有在RIACHINA找到答案,版主cimmicola給出了很好的解答
**************************************
一般用set 訪問符來定義這樣的變量
例如 public var sss:string →
private var _sss:string;
public function set sss(value:string){
_sss = value;
dispatchEvent(new Event("sssChanged"));
}
public function get sss():string{
return _sss;
}
這樣寫雖然是代碼多了很多,不過方便日后的擴展。
var str:String = Application.application.parameters.myparam;
在js中這樣寫
var swfurl = "myswf.swf?progId=" + idVal;
swfobject.embedSWF(swfurl, "repchartdiv", "1024", "500", "9.0.0", "expressInstall.swf");
也可以寫成
var attributes = {
"progId": idVal
};
swfobject.embedSWF("myswf.swf", "repchartdiv", "1024", "500", "9.0.0", "expressInstall.swf", null, null, attributes);