0 Replies Latest reply on Aug 26, 2013 11:50 PM by preethidevaraj

    Custom DWR

    preethidevaraj

      Hi,

      We have created a custom DWR which is used it to render a custom Header. Also, the URLLookup DWR (OOB) is used.

      The complete javascript for the header is placed header-javascript.ftl and the reference for the DWR is also included in it like,

      <@resource.dwr file="URLLookup" id="core"/>

      <@resource.dwr file="<CustomDWR>"/>

       

      But including this is header-javascript.ftl, dint reflect the header in the welcome/home page - resulted in DWR not found error. Hence we defined the DWR in header.soy by providing a "depends" in the template.

      * @depends dwr=URLLookup

      * @depends dwr=<CustomDWR>

       

      which helped to work fine in welcome page also. But we noticed that the DWR call was not successful in a Community landing page ie, (http:localhost:8080/community/space1).

      On loading this page, the below error appears in the console (firebug tool),

      TypeError: dwr.engine._execute is not a function


      However it works in content, people tabs of a community. The error occurs only in the Overview tab of the Community.

       

      Please let me know (asap) if i am missing something or the DWR has to be declared in any other FTL. (I tried to include it in place.soy also, dint help)

       

      There are no errors related to DWR in the logs too.

       

      Note: After a restart to the instance if we start to browse with the welcome page and then navigate to the community page, then the DWR call is successful But when we start with the community page or when we edit some template in themes in admin console and refresh the community page directly then the DWR doesn't succeed and the above mentioned error appears in the console.

       

      Thanks,

      Preethi Devaraj