Ext


Go Back   Ext JS Forums > Ext JS Community Forums (2.0) > Ext 2.x: Help

Reply
 
Thread Tools
  #1  
Old 07-11-2008, 05:44 AM
dimitrij.zub dimitrij.zub is offline
Ext User
 
Join Date: Jun 2008
Posts: 56
dimitrij.zub is on a distinguished road
Default Messy Layouts

Hi everyone.

I have kind of a complex layout which is randomly rendered as a mess. So the fields move, are too big and so on. And as well randomly the field looks just perfect!

Does anybody have any idea what the problem might be?
Reply With Quote
  #2  
Old 07-11-2008, 05:48 AM
Animal's Avatar
Animal Animal is offline
Ext JS - Community Support Team
 
Join Date: Mar 2007
Location: East Midlands, UK
Posts: 23,352
Animal will become famous soon enough
Default

Sorry, my crystal ball is at home right now.

In the absence of that, and in the same vein as your posting, I'd say the answer is: You've done something wrong.
__________________
ExtJs forum volunteer. No official connection to the Ext Company. I do not speak for them.
ExtJs consultancy offered. £ 50/hour. Evenings+weekends. the_bagbournes@btinternet.com

Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
See Saki's samples: http://examples.extjs.eu/
Build your own Ext: http://extjs.com/products/extjs/build/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
Reply With Quote
  #3  
Old 07-11-2008, 05:55 AM
dimitrij.zub dimitrij.zub is offline
Ext User
 
Join Date: Jun 2008
Posts: 56
dimitrij.zub is on a distinguished road
Default

OK so no obvious reason

Lets see:

I am adding a custom panel to a tab pane.

Upon this adding it gets layouted kinda messy.

I am attaching the files below which are doing the jobs.

See the messy1, messy2 and fine.jpgs

I have the feeling that i am doing something wrong in the design of how the components should work, as I am not a JavaScript extpert.

Some help on making the beheviour of ExtJS deterministic would be highly appriciated.
Attached Images
File Type: jpg messy1.jpg (40.5 KB, 16 views)
File Type: jpg messy2.jpg (48.1 KB, 14 views)
File Type: jpg fine.jpg (50.2 KB, 17 views)
Attached Files
File Type: txt Ext.rt.EditAccountPanel.txt (6.3 KB, 6 views)
File Type: txt Ext.rt.Portal.Actions.txt (3.1 KB, 5 views)
Reply With Quote
  #4  
Old 07-11-2008, 06:14 AM
Animal's Avatar
Animal Animal is offline
Ext JS - Community Support Team
 
Join Date: Mar 2007
Location: East Midlands, UK
Posts: 23,352
Animal will become famous soon enough
Default

It looks OK at first glance.

One thing I noticed:

_tab_panel.insert(0, _panel).show();
You don't get to show the items in a multi-child Container. You ask the Container to show the one you want. Use setActiveItem. And configure your TabPanel with layoutOnTabChange:true
__________________
ExtJs forum volunteer. No official connection to the Ext Company. I do not speak for them.
ExtJs consultancy offered. £ 50/hour. Evenings+weekends. the_bagbournes@btinternet.com

Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
See Saki's samples: http://examples.extjs.eu/
Build your own Ext: http://extjs.com/products/extjs/build/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
Reply With Quote
  #5  
Old 07-11-2008, 06:28 AM
dimitrij.zub dimitrij.zub is offline
Ext User
 
Join Date: Jun 2008
Posts: 56
dimitrij.zub is on a distinguished road
Default

Done that. Still the problem persists.

The funny thing is, that it DOES render the tab sometimes just perfect. But if I close it and open it again, is MIGHT be messed up.

As well I have a lot of strange behavior going on in my project like some elements are not shown if i remove some lines of text and so on.

But back to the basic problem and maybe some best practice. ...

I am building the portal in panel objects all should behave independent what shall I do to have the most independend structure with JS/ExtJS?

I have the feeling that it just sucks at a lot of spaces and depends on a lot of factors how the whole thing is behaving and its slipping out of controll some how

I did the blog 'Writing big application with Ext' and followed the guidlines but still i feel like im running into some mess the bigger the project will get
Reply With Quote
  #6  
Old 07-11-2008, 06:32 AM
Animal's Avatar
Animal Animal is offline
Ext JS - Community Support Team
 
Join Date: Mar 2007
Location: East Midlands, UK
Posts: 23,352
Animal will become famous soon enough
Default

"Close it and open it."?

Does it get destroyed, and recreated?

It would be easier to see what was going on if you could post a link to a live page.
__________________
ExtJs forum volunteer. No official connection to the Ext Company. I do not speak for them.
ExtJs consultancy offered. £ 50/hour. Evenings+weekends. the_bagbournes@btinternet.com

Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
See Saki's samples: http://examples.extjs.eu/
Build your own Ext: http://extjs.com/products/extjs/build/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
Reply With Quote
  #7  
Old 07-11-2008, 07:02 AM
dimitrij.zub dimitrij.zub is offline
Ext User
 
Join Date: Jun 2008
Posts: 56
dimitrij.zub is on a distinguished road
Default

I cant provide a live page now as I have no access to the router here

Close it means:

I close it on the panel (Click on the x)

Open it means: It gets recreated. (See Actions...)

Funny thing i just discovered:

If i add another panel with fields and then add the EditAccountPanel the chance to have a messed up layout is much higher. (See Actions -> password_panel)
Reply With Quote
  #8  
Old 07-11-2008, 07:15 AM
Animal's Avatar
Animal Animal is offline
Ext JS - Community Support Team
 
Join Date: Mar 2007
Location: East Midlands, UK
Posts: 23,352
Animal will become famous soon enough
Default

You are hardcoding an ID into a class definition. Classes are reusable, but IDs must be unique:

Ext.rt.EditAccountPanel = Ext.extend(Ext.form.FormPanel, {	
	id: 'Ext.rt.EditAccountPanel', <-- bad
__________________
ExtJs forum volunteer. No official connection to the Ext Company. I do not speak for them.
ExtJs consultancy offered. £ 50/hour. Evenings+weekends. the_bagbournes@btinternet.com

Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
See Saki's samples: http://examples.extjs.eu/
Build your own Ext: http://extjs.com/products/extjs/build/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
Reply With Quote
  #9  
Old 07-11-2008, 08:15 AM
dimitrij.zub dimitrij.zub is offline
Ext User
 
Join Date: Jun 2008
Posts: 56
dimitrij.zub is on a distinguished road
Default

I did this i.o. to find the class later in the management (s. Actions) -> tab.activate.

You have an idea of how to manage this otherwise?
Reply With Quote
  #10  
Old 07-11-2008, 08:34 AM
dimitrij.zub dimitrij.zub is offline
Ext User
 
Join Date: Jun 2008
Posts: 56
dimitrij.zub is on a distinguished road
Default

Tried removing ids from everywhere. Still random layout problems.
Reply With Quote
Reply

Thread Tools

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

All times are GMT -5. The time now is 09:00 AM.

© 2006-2009 Ext, LLC
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.