Web.config
New Community Forums available at http://forums.ext.net
 

Coolite Forums

Welcome Guest ( Login | Register )
 
Web.config
Subscribe
Last Login: 7/23/2008 1:09:32 PM
Posts: 7,
Posted 2/18/2008 1:05:23 PM

Group: Coolite Early Adopter
Could you post a quick example Web.config that shows where the changes for ScriptManager would go?  Thanks.
Last Login: 7/8/2010 1:50:34 AM
Posts: 4,722,
Posted 2/18/2008 9:13:41 PM

Group: Core Development Team
Hi swallace,

Sure thing. The Ajaxian/ExtJS blog posts caught us a bit off guard. We were hoping to have one more day to complete a few of the critical tutorials. I'll have a full Web.config Example/tutorial available within the next few hours. --
Geoffrey McGill
Coolite Inc.
Development Team
Skype : geoffrey.mcgill
Forum Guidelines | Coolite Examples | Coolite API Docs | ExtJS API Docs | Twitter

Last Login: 7/8/2010 1:50:34 AM
Posts: 4,722,
Posted 2/19/2008 6:35:20 AM

Group: Core Development Team
Hi swallace,

The following code demonstrates where to add the global "coolite" configSection to the Web.config. Each of the properties/attributes are listed with a bit of description, optional values and default values.

<?xml version="1.0"?>

<configuration>
    <configSections>
      <section name="coolite" type="Coolite.Ext.Web.GlobalConfig"/>
    </configSections>

  <!-- COOLITE GLOBAL CONFIGURATION ATTRIBUTES -->
  <!-- cleanResourceUrl = true|false
       The Coolite controls can clean up the autogenerate WebResource Url so they look presentable.
       Default is true -->
 
  <!-- gzip = true|false
       Whether to automatically render scripts with gzip compression.
       Default is true. -->
 
  <!-- scriptAdapter = Ext, jQuery, Prototype, YUI
       Which script adapter to use.
       Default is "Ext" -->
 
  <!-- renderScripts = true|false
       Whether to have the coolite controls output the required JavaScript includes or not.
       Gives developer option of manually including required <script> files.
       Default is true -->
 
  <!-- renderStyles = true|false
       Whether to have the coolite controls output the required StyleSheet includes or not.
       Gives developer option of manually including required <link>/<style> files.
       Default is true -->
 
  <!-- scriptMode = Release, Debug
       Whether to include the Release (condensed) or Debug (with documentation) JavaScript files
       Default is "release" -->
 
  <!-- theme = Default, Gray
       Which embedded theme to use.
       Default is "Default" -->

  <coolite
    cleanResourceUrl="true"
    gzip="true"
    scriptAdapter="Ext"
    renderScripts="true"
    renderStyles="true"
    scriptMode="Release"
    theme="Gray"
    />

</configuration>

The Theme can also be set at a Session level by using the ScriptManager.RegisterSessionTheme() method or directly by setting the "Coolite.Theme" Session value. Setting the Theme in the Session will override a Theme set in the Web.config.

Example

<script runat="server">
    protected void Page_Load(object sender, EventArgs e)
    {
        Coolite.Web.UI.ScriptManager.RegisterSessionTheme(Coolite.Web.UI.Theme.Gray);
    }
</script>


<script runat="server">
    protected void Page_Load(object sender, EventArgs e)
    {
        HttpContext.Current.Session["Coolite.Theme"] = Coolite.Web.UI.Theme.Gray;
    }
</script>


I have a detailed tutorial and screencast in the works, but they're not quite done. I'll update this thread once they're ready.

Hope this helps.

--
Geoffrey McGill
Coolite Inc.
Development Team
Skype : geoffrey.mcgill
Forum Guidelines | Coolite Examples | Coolite API Docs | ExtJS API Docs | Twitter
Last Login: 7/23/2008 1:09:32 PM
Posts: 7,
Posted 2/19/2008 8:11:49 AM

Group: Coolite Early Adopter
Perfect, thanks!
Last Login: 7/23/2008 1:09:32 PM
Posts: 7,
Posted 2/19/2008 8:40:55 AM

Group: Coolite Early Adopter
Looks like the sample is from an earlier/later version than the 0.3.1.12579 that I'm using. 

Here's a change that makes it work:

renderScripts="Embedded"
renderStyles="Embedded"

As given, the example produces the error:

The value of the property 'renderScripts' cannot be parsed. The error is: The enumeration value must be one of the following: None, File, Embedded.

Last Login: 7/8/2010 1:50:34 AM
Posts: 4,722,
Posted 2/19/2008 8:03:52 PM

Group: Core Development Team
Right you are regarding the renderScripts and renderStyles properties. That was my mistake. Both take a ResourceLocationType Enum value with possible options being Embedded, File or None.

Here's the updated Web.config sample.

<?xml version="1.0"?>

<configuration>
    <configSections>
      <section name="coolite" type="Coolite.Web.UI.GlobalConfig"/>
    </configSections>

  <!-- COOLITE GLOBAL CONFIGURATION ATTRIBUTES -->
  <!-- cleanResourceUrl = true|false
       The Coolite controls can clean up the autogenerate WebResource Url so they look presentable.
       Default is true -->
 
  <!-- gzip = true|false
       Whether to automatically render scripts with gzip compression.
       Only works when renderScripts="Embedded" and/or renderStyles="Embedded".
       Default is true. -->
 
  <!-- scriptAdapter = Ext, jQuery, Prototype, YUI
       Which script adapter to use.
       Default is "Ext" -->
 
  <!-- renderScripts = Embedded, File, None
       Whether to have the coolite controls output the required JavaScript includes or not.
       Gives developer option of manually including required <script> files.
       Default is Embedded -->
 
  <!-- renderStyles = Embedded, File, None
       Whether to have the coolite controls output the required StyleSheet includes or not.
       Gives developer option of manually including required <link> or <style> files.
       Default is Embedded -->
 
  <!-- scriptMode = Release, Debug
       Whether to include the Release (condensed) or Debug (with imline documentation) Ext JavaScript files.
       Default is "Release" -->
 
  <!-- theme = Default, Gray
       Which embedded theme to use.
       Default is "Default" -->

  <coolite
    cleanResourceUrl="true"
    gzip="true"
    scriptAdapter="Ext"
    renderScripts="true"
    renderStyles="true"
    scriptMode="Release"
    theme="Gray"
    />

</configuration>


Hope this helps. --
Geoffrey McGill
Coolite Inc.
Development Team
Skype : geoffrey.mcgill
Forum Guidelines | Coolite Examples | Coolite API Docs | ExtJS API Docs | Twitter

Last Login: 7/8/2010 1:50:34 AM
Posts: 4,722,
Posted 2/23/2008 7:40:02 PM

Group: Core Development Team

We found a couple problems when running the Assembly in Medium Trust mode. One was fixed in code and will be available with the next release. The other requires a simple edit to the web.config.

The requirePermission="false" attribute must be applied to the coolite configuration section.

Here's the full revised web.config sample.

<?xml version="1.0"?>
<configuration>
  <configSections>
    <section name="coolite" type="Coolite.Ext.Web.GlobalConfig" requirePermission="false" />
  </configSections>
  <!-- COOLITE GLOBAL CONFIGURATION ATTRIBUTES -->
  <!-- cleanResourceUrl = true|false       
       The Coolite controls can clean up the autogenerate WebResource Url so they look presentable.       
       Default is true -->
 
  <!-- gzip = true|false       
       Whether to automatically render scripts with gzip compression.       
       Only works when renderScripts="Embedded" and/or renderStyles="Embedded".      
       Default is true. -->
 
  <!-- scriptAdapter = Ext|jQuery|Prototype|YUI       
       Which script adapter to use.       
       Default is "Ext" -->
 
  <!-- renderScripts = Embedded|File|None      
       Whether to have the coolite controls output the required JavaScript includes or not.      
       Gives developer option of manually including required <script> files.       
       Default is Embedded -->
 
  <!-- renderStyles = Embedded|File|None      
       Whether to have the coolite controls output the required StyleSheet includes or not.      
       Gives developer option of manually including required <link> or <style> files.      
       Default is Embedded -->
 
  <!-- scriptMode = Release|Debug       
       Whether to include the Release (condensed) or Debug (with inline documentation) Ext JavaScript files.      
       Default is "Release" -->
 
  <!-- theme = Default|Gray       
       Which embedded theme to use.      
       Default is "Default" -->
 
  <coolite   
      cleanResourceUrl="true"   
      gzip="true"   
      scriptAdapter="Ext"    
      renderScripts="true"   
      renderStyles="true"   
      scriptMode="Release"   
      theme="Gray"   
      />
</configuration>


You can switch into Medium Trust mode to test by adding adding the following <trust> node to your web.config, within the <system.web> node.

<system.web>
    <trust level="Medium" />
</system.web>

--
Geoffrey McGill
Coolite Inc.
Development Team
Skype : geoffrey.mcgill
Forum Guidelines | Coolite Examples | Coolite API Docs | ExtJS API Docs | Twitter
Last Login: 7/8/2010 1:50:34 AM
Posts: 4,722,
Posted 3/28/2008 11:06:43 AM

Group: Core Development Team
As of version 0.4.1, we've added several other options for setting each of these global config properties. The following forum post details each of the four methods.

http://www.coolite.com/forums/FindPost177.aspx

As well, a new global config property called ResourcePath was added. More information available within the following forum post.

http://www.coolite.com/forums/FindPost178.aspx

Hope this helps.
--
Geoffrey McGill
Coolite Inc.
Development Team
Skype : geoffrey.mcgill
Forum Guidelines | Coolite Examples | Coolite API Docs | ExtJS API Docs | Twitter
Last Login: 6/16/2009 12:23:31 AM
Posts: 43,
Posted 12/8/2008 9:46:32 PM

Group: Coolite Early Adopter
hi,geoffrey

    How to change the custom theme by Ajax methods or Ajax events?
Last Login: 7/8/2010 1:50:34 AM
Posts: 4,722,
Posted 12/9/2008 6:28:18 AM

Group: Core Development Team
Hi jachnicky,

It's probably best to start a new thread since your question is a new topic. thx.

--
Geoffrey McGill
Coolite Inc.
Development Team
Skype : geoffrey.mcgill
Forum Guidelines | Coolite Examples | Coolite API Docs | ExtJS API Docs | Twitter
« Prev Topic | Next Topic »
Reading This Topic
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.
All times are GMT -5:00, Time now is 4:41pm