Loading ...
Sorry, an error occurred while loading the content.

Ajile with Dojo

Expand Messages
  • Josh Trutwin
    Hi, I m trying to use Ajile with Dojo basically to make sure Dojo is fully imported on my pages before attempting to create widgets, etc. I thought I had
    Message 1 of 2 , Jan 30, 2007
    • 0 Attachment
      Hi,

      I'm trying to use Ajile with Dojo basically to make sure Dojo is fully
      imported on my pages before attempting to create widgets, etc. I
      thought I had something working but I'm just having some problems.

      I have Ajile-0.7.8 installed in /ajile as an Apache alias.
      I have dojo-0.4.1 installed in /dojo as an Apache alias:

      My HTML page uses the following:

      <script type="text/javascript"
      src="/ajile/lib/com.iskitz.ajile.0.7.8.js"></script>
      <script type="text/javascript" src="init_dojo.js"></script>

      init_dojo.js contains:


      var djConfig = {
      isDebug: false,
      debugAtAllCosts: false
      };

      function dojo_init() {
      alert("dojo init");
      Ajile.ShowLog();
      dojo.require("dojo.widget.ComboBox");
      dojo.hostenv.makeWidgets();
      }

      Ajile.AddImportListener('dojo', dojoImportListener);

      function dojoImportListener(moduleName) {
      if ("undefined" == typeof(dojo)) {
      return;
      }

      dojo_init();
      Ajile.RemoveImportListener('dojo', dojoImportListener);
      }

      Ajile.EnableDebug();
      Import("dojo", "/dojo");



      Inside the /dojo root there is a file dojo.js that needs to be imported.

      The listener seems to work as the dojo_init() alert pops up. But the
      dojo.require produces errors "Could not load 'dojo.widget.ComboBox';
      last tried '__package__.js'". Enabling dojo debug doesn't help
      (actually it hangs)

      I know this is the right dojo.require() line but I'm not sure I'm
      doing the Ajile part of this correctly.

      Anyone have experience getting Ajile and Dojo to play nicely?

      Thanks,

      Josh
    • iskitzdev
      Hi Josh, Thanks for writing to the group. I took a look at the problem you posted and only saw the reported error when I didn t have Dojo fully unzipped (src
      Message 2 of 2 , Feb 2 2:29 AM
      • 0 Attachment
        Hi Josh,
        Thanks for writing to the group. I took a look at the problem you
        posted and only saw the reported error when I didn't have Dojo fully
        unzipped (src directory is needed).

        I've uploaded a zip file showing Ajile & Dojo working together based
        on the sample code you provided in your post. For more info on the
        uploaded zip see the posting at:

        http://tech.groups.yahoo.com/group/ajile/message/128


        Hope that helps,
        Michael


        --- In ajile@yahoogroups.com, "Josh Trutwin" <josh@...> wrote:
        >
        > Hi,
        >
        > I'm trying to use Ajile with Dojo basically to make sure Dojo is fully
        > imported on my pages before attempting to create widgets, etc. I
        > thought I had something working but I'm just having some problems.
        >
        > I have Ajile-0.7.8 installed in /ajile as an Apache alias.
        > I have dojo-0.4.1 installed in /dojo as an Apache alias:
        >
        > My HTML page uses the following:
        >
        > <script type="text/javascript"
        > src="/ajile/lib/com.iskitz.ajile.0.7.8.js"></script>
        > <script type="text/javascript" src="init_dojo.js"></script>
        >
        > init_dojo.js contains:
        >
        >
        > var djConfig = {
        > isDebug: false,
        > debugAtAllCosts: false
        > };
        >
        > function dojo_init() {
        > alert("dojo init");
        > Ajile.ShowLog();
        > dojo.require("dojo.widget.ComboBox");
        > dojo.hostenv.makeWidgets();
        > }
        >
        > Ajile.AddImportListener('dojo', dojoImportListener);
        >
        > function dojoImportListener(moduleName) {
        > if ("undefined" == typeof(dojo)) {
        > return;
        > }
        >
        > dojo_init();
        > Ajile.RemoveImportListener('dojo', dojoImportListener);
        > }
        >
        > Ajile.EnableDebug();
        > Import("dojo", "/dojo");
        >
        >
        >
        > Inside the /dojo root there is a file dojo.js that needs to be
        imported.
        >
        > The listener seems to work as the dojo_init() alert pops up. But the
        > dojo.require produces errors "Could not load 'dojo.widget.ComboBox';
        > last tried '__package__.js'". Enabling dojo debug doesn't help
        > (actually it hangs)
        >
        > I know this is the right dojo.require() line but I'm not sure I'm
        > doing the Ajile part of this correctly.
        >
        > Anyone have experience getting Ajile and Dojo to play nicely?
        >
        > Thanks,
        >
        > Josh
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.