Using Displaymode on flyweight elements - Ext JS
Ext.fly('book-title-form').setVisibilityMode(Ext.Element.DISPLAY).show();
Ext.fly('book-isbn-form').show();
Ext.fly('book-keywords-form').show();
Ext.fly('book-description-form').show();
This will work... so my question is knowing that I'm the only developer and nothing is going to happen in between the 1st statement and the last that would change the display mode.... is this safe?
#
2
02-25-2007, 05:23 AM
It should be fine. Just make sure you change it back!
#
3
02-25-2007, 10:00 AM
General question as I'm still pretty new to ext:
So Ext.fly is to be preferred over Ext.get if I just need the element for one call in that place?
#
4
02-25-2007, 10:08 AM
Yep. It can decrease memory usage - especially for elements which can be removed from the document at any time (like via ajax).
#
5
02-25-2007, 10:18 AM
Ok, thanks. Am I missing something or does mask/unmask not work with fly?
Ext.get("gridDiv").mask();
works, but
Ext.fly("gridDiv").mask();
does not (but also gives no error).
#
6
02-25-2007, 10:51 AM
Any stateful operation (masking, event handlers using "this", shims, etc) need a normal Element.
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
원생 Ajax와 jQuery Ajax의 차이점 예시 분석선언: 이번에 소개한 것은 aax와 백그라운드를 이용하여 데이터 교환을 하는 작은 예이기 때문에 demo는 서버를 통해 열어야 합니다.서버 환경은 구축하기 매우 좋다. 인터넷에서wamp나xampp를 다운로드하여 한 ...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.