Created
March 15, 2012 05:29
-
-
Save hapiben/2042157 to your computer and use it in GitHub Desktop.
Secured ExtJS Components Implementation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Button - Normal instantiation | |
*/ | |
var btn = new GepsRelease4AccessControlSecuredButton({ | |
name: 'btn_Sample' // Required property. | |
,acp: 'Abstract' // Required property. (Access Rights Prefix) | |
,text: 'Sample' | |
,iconCls: 'icon-sample' | |
}); | |
/** | |
* Button - Lazy instantiation | |
*/ | |
config.items = [{ | |
name: 'btn_Sample' | |
,xtype: 'securedbutton' | |
,acp: 'Abstract' | |
,text: 'Sample' | |
,iconCls: 'icon-sample' | |
}]; | |
/*********************************** Form Components ***********************************/ | |
/** | |
* Textfield - Normal instantiation | |
*/ | |
var btn = new GepsRelease4AccessControlSecuredTextField({ | |
name: 'FirstName' // Optional property. Required if your mapping this component to a object model | |
,sName: 'btn_FirstName' // Required property. sName stands for secured name | |
,acp: 'Abstract' // Required property. (Access Rights Prefix) | |
,text: 'Sample' | |
,iconCls: 'icon-sample' | |
}); | |
/** | |
* Textfield - Lazy instantiation | |
*/ | |
config.items = [{ | |
name: 'FirstName' | |
,sName: 'btn_FirstName' | |
,xtype: 'securedtextfield' | |
,acp: 'Abstract' | |
,text: 'Sample' | |
,iconCls: 'icon-sample' | |
}]; | |
/** | |
* The textfield code above also applies to all form components except button. | |
* The reason of having sName instead of name is because of the mapped object model. | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment