-
30 May 2010 7:46 AM #1
Ext Designer export
Ext Designer export
Imagine a window with a grid that uses a store.
When I use Ext Designer to draw it, six files are created in the same directory of the *. xds.
Question number one. What to do with the files "xds_" that does not interest me?
Well, in my project I use a folder called "js" for all *. js. So the best practice would be:
1. Save my files "*. xds" in the folder js (But just mix the files "xds_", which I do not need because the structure of the project is already done. But I would not have a folder containing just files of type js) = (
2. Save my files in another location and keep copying them every time I re-export them (very annoying too).
Question number 2. includeOrder and how to pass parameters to the main window of the store to load the grid properly.
The file "xds_includeorder" says to include the files in the following order:
<script type="text/javascript" src="Department.ui.js"> </ script>
<script type="text/javascript" src="Department.js"> </ script>
<script type="text/javascript" src="storeDepartments.js"> </ script>
I can just change the file "Department.js," how could I change it to receive some parameter and pass it to the store?
I already tried to add a constructor but it did not work, returns the following error: h.directCfg is undefined.
The original code:
My code:PHP Code:Department = Ext.extend(DepartmentUi, {
initComponent: function() {
Department.superclass.initComponent.call(this);
}
});
PHP Code:Department = Ext.extend(DepartmentUi, {
constructor: function(cfg) {
cfg = cfg || {};
//or something as this.keytoloadthestore = cfg.keytoloadthestore
Department.superclass.constructor.call(this, Ext.apply(this, cfg));
},
initComponent: function() {
//then something as this.items.itemAt(0).store.reload({paramns: {'keytoload': this.keytoloadthestore}})
Department.superclass.initComponent.call(this);
}
});
I'm learning it and writing a new post on my blog to teach others the best way to use Ext Designer to gain produtivity.
Thanks! =]
-
30 May 2010 6:26 PM #2
Got the answer to the question number 2 here:
http://www.extjs.com/forum/showthrea...ight=DirectCfg
(That was right, i guess the error was ONLY on Ext Designer Export) [
]
I still need know about the xds_* files, about the question number one..
-
30 May 2010 9:19 PM #3Sencha - Desktop Packager Dev Team
- Join Date
- Mar 2007
- Location
- Baltimore, MD.
- Posts
- 1,745
- Vote Rating
- 6
If you use Linux or OS X, you can simply make a symbolic link to your exported js files in your js folder. If you use Windows...well...shame on you :-) In that case I would simply reference your exported files directly (putting them anywhere) until they are deemed "finished" and then you can move the finalized js files to your js folder. I would do whatever you need to do to avoid copying files on every export. Symbolic Links are the easiest thing that comes to mind, but if you don't have the ability to do that, then just have a split dev/prod environment and reference your xds exported files directly. Whatever it takes to avoid making a mountain out of a mole hill...
-
31 May 2010 4:24 AM #4
-
31 May 2010 6:43 AM #5Sencha - Desktop Packager Dev Team
- Join Date
- Mar 2007
- Location
- Baltimore, MD.
- Posts
- 1,745
- Vote Rating
- 6
In the future we'll think about the life cycle in which the Designer is used typically. I understand that it's perfect for full-out design->export->use situation, but when you do a lot of design revisions its export model becomes a little clumsy. It's nothing that 30 seconds of "elbow grease" won't solve (whether that's copying/pasting files or code, or what have you), but I totally get wanting to make the export pretty seamless and to "fit in" to a project the way you'd like. So again, we'll think this through for future growth of the product.
Similar Threads
-
Ext Designer trial VS Ext Designer final
By malem in forum Ext Designer: Help & DiscussionReplies: 5Last Post: 13 Oct 2010, 11:10 PM -
[CLOSED-126] Export Code to Disk not honoring export path in preferences
By tr888 in forum Ext Designer: BugsReplies: 3Last Post: 10 May 2010, 9:10 AM -
designer preview and export not working
By LoganHutch in forum Ext Designer: Help & DiscussionReplies: 7Last Post: 29 Mar 2010, 4:07 PM -
Ext Designer: How to add multiple radio buttons with designer?
By lelapinblanc in forum Ext Designer: Help & DiscussionReplies: 1Last Post: 26 Mar 2010, 1:38 PM -
export and ext.onready
By wp.joju in forum Ext 3.x: Help & DiscussionReplies: 5Last Post: 27 Aug 2009, 1:16 AM


Reply With Quote