View Full Version : General Question
RyanZec
29 Oct 2007, 3:47 AM
I do like that polished widgets that extjs provide but have 1 issue. For example, the portal is something i was to try but the only html that is in the page in the them changer. All the other content is directly in the javascript. I like that way that jquery works buy changing the html that si on the page. I reason i think that is better(and correct em if i am wrong) and the browsers can process html faster than javascript. is is possible to do the portal example with all the html in the web page itself and not the javascript files.
Another thing it that i really don't want to be using 2 javascript libraries. Are there any tutorials that would show how to select dom elements and modify css and stuff like that within extjs itself?
evant
29 Oct 2007, 3:57 AM
http://extjs.com/deploy/ext/docs/output/Ext.DomQuery.html
http://extjs.com/deploy/ext/docs/output/Ext.util.CSS.html
http://extjs.com/deploy/ext/docs/output/Ext.Element.html#applyStyles
As for your first concern, it isn't really a big deal.
RyanZec
29 Oct 2007, 4:35 AM
it a bit of a deal for me since i use php to generate html and don't want to use php to generate javascript.
brian.moeskau
29 Oct 2007, 5:03 AM
Just because the examples show one thing does not mean that's the only way to do it. You could quite easily render portlets as static HTML in divs then sucks those into Panels/portlets via JS. Pretty much all the major widgets in Ext support rendering components from markup.
RyanZec
29 Oct 2007, 5:50 AM
Yea, I read ont he DomQuery and CSS stuff, I just really love the way that jquery does its stuff but want to use 1 standard library.
johns
29 Oct 2007, 2:42 PM
Pretty much all the major widgets in Ext support rendering components from markup.
Is this done via Component.applyToMarkup(HtmlElement)?
If it is, what does a panel consider as "valid" markup? From the docs:
"Apply this component to existing markup that is valid. With this function, no call to render() is required."
I'm sorry I haven't rtfc, but are there id's that I would have to include in my custom markup?
So, I guess my question is, will any valid html do? That can't be the case right?
Animal
29 Oct 2007, 2:58 PM
Why not? A Panel may be used as a simple manager for HTML content if it is not being used to house a Layout.
johns
29 Oct 2007, 5:55 PM
so there is a catch -- I can't have an accordian layout of Panels inside a container Panel if I've applied custom html to the container.
Wouldn't it be great if that were not the case?
Animal
30 Oct 2007, 12:38 AM
How can you have it both ways?
Having a Panel manage a complex layout in which it must size its components exactly really requires that the Panel be in full control of its own content.
If you just throw arbitrary HTML into its body (which there is nothing preventing you from doing, try it!), then all you will do is spoil the nice accordion.
if you want an accordion AND something below it, use a layout:'border'. Put a Panel with layout:'accordion' in the center, and another Panel in the south, and put any old HTML into the south Panel's body.
i use a panel for the layout of a defined region for dynamically loaded/dump html content(s) by creating a panel to load the url, so such panels are placeholders for html contents, dynamically destroy/newed. I haven't tried yet but I would like to change the region layout by destroying the panel for that region layout and new it with different layout. is this doable ?
when a panel is first created at panel factory without knowing what html content/js stuffs is to be loaded on it, how can i make such dynamically loaded html contents be self-contained (like iframe) so that all events originated on the page will not go beyond the placeholder panel ? I prefer to do something at panel creation inside panel factory to make sure that html contents to be loaded will act independently of the rest of html main page, is this doable ? if not, what can I do on html contents that are going to be loaded.
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.