1. #1
    Sencha User
    Join Date
    Apr 2013
    Posts
    1
    Vote Rating
    0
    p.petrov@softteco.com is on a distinguished road

      0  

    Default Changing themes in GXT 3.0 dynamically

    Changing themes in GXT 3.0 dynamically


    Hi.

    Is there a solution or examples to change themes dynamically in GXT 3X?
    All questions about this were not answered.

    Regards,
    Pavel

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Jan 2012
    Location
    Arlington, WA
    Posts
    377
    Vote Rating
    15
    branflake2267 will become famous soon enough

      0  

    Default


    Themes are baked into the modules permutations so and creating a entry point for each theme is needed.

    For example:
    http://www.sencha.com/examples/explorer-gray.html - explorer gray theme
    http://www.sencha.com/examples/explorer-blue.html - explorer blue theme

    The html page points to the module to load for instance the gray theme html:
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <title>Sencha GXT Explorer Demo - development build</title>
    <link rel="stylesheet" type="text/css" href="explorer/reset.css" />
    <link rel="stylesheet" type="text/css" href="examples/css/resources.css" />
    
    
    </head>
    <body>
    <!-- path to gwt module of gray theme-->
    <script language='javascript' src='explorerGray/explorerGray.nocache.js'></script>
    <iframe src="javascript:''" id="__gwt_historyFrame" style="position:absolute;width:0;height:0;border:0"></iframe>
    </body>
    </html>
    And the gray module that is loaded by the explorer-gray.html. In this case, it extends the main module and changes the theme.
    Code:
    <module rename-to='explorerGray'>
      <inherits name='com.sencha.gxt.explorer.Explorer'/>
      <inherits name='com.sencha.gxt.theme.gray.Gray'/>
      
      <replace-with class='com.sencha.gxt.explorer.client.chart.GrayThemedChartAppearance'>
        <when-type-is class='com.sencha.gxt.explorer.client.chart.ThemedChartExample.ThemedChartAppearance'/>
      </replace-with>
    </module>
    In this configuration the theme can be changed by using the Window.Location.assign(...) to navigate to an entrypoint that uses a different theme.
    Code:
    Window.Location.assign(pathEntryPoint);
    I didn't cover every detail in entry point configuration. Would you like some more details on any particular module configuration to load a theme?

    Brandon

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi