1. #1
    Ext User
    Join Date
    Oct 2007
    Posts
    201
    Vote Rating
    0
    RyanZec is on a distinguished road

      0  

    Default General Question

    General Question


    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?

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,921
    Vote Rating
    632
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

  3. #3
    Ext User
    Join Date
    Oct 2007
    Posts
    201
    Vote Rating
    0
    RyanZec is on a distinguished road

      0  

    Default


    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.

  4. #4
    Sencha User
    Join Date
    Apr 2012
    Location
    Austin, Texas
    Posts
    2
    Vote Rating
    0
    brian.moeskau is an unknown quantity at this point

      0  

    Default


    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.

  5. #5
    Ext User
    Join Date
    Oct 2007
    Posts
    201
    Vote Rating
    0
    RyanZec is on a distinguished road

      0  

    Default


    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.

  6. #6
    Ext User johns's Avatar
    Join Date
    Oct 2007
    Posts
    10
    Vote Rating
    0
    johns is on a distinguished road

      0  

    Post


    Quote Originally Posted by brian.moeskau View Post
    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?

  7. #7
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,505
    Vote Rating
    53
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Why not? A Panel may be used as a simple manager for HTML content if it is not being used to house a Layout.

  8. #8
    Ext User johns's Avatar
    Join Date
    Oct 2007
    Posts
    10
    Vote Rating
    0
    johns is on a distinguished road

      0  

    Default


    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?

  9. #9
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,505
    Vote Rating
    53
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    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.

  10. #10
    Sencha User
    Join Date
    Oct 2007
    Posts
    447
    Vote Rating
    0
    mxu is on a distinguished road

      0  

    Arrow


    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.