Grokbase Groups Struts user May 2007
FAQ
Hi all,

I try to insert a datetimepicker tag in my JSP, and I have the following
javascript error :
symbol 'struts.widget' is not defined after loading '__package__.js'

here is my JSP :
<%@ taglib uri="/struts-dojo-tags" prefix="sx"%>

<sx:head />
<s:form action="contacts">

<table border="0" width="100%" height="100%">
<tr>
<td>
<sx:datetimepicker name="dateDeb" label=
"test.datepicker" />
</td>
</tr>
</table>

</s:form>

I'm in version 2.1.0-SNAPSHOT (of today) for "core", "codebehind-plugin",
"dojo-plugin", "sitemesh-plugin", "spring-plugin" and "tiles-plugin" jars.

What's wrong ?

Thanks for your help,

Regards,

Michaël

Search Discussions

  • Musachy Barroso at May 23, 2007 at 1:05 pm
    that usually means that there is a javascript error in one of the struts
    dojo widgets. If you set debug="true" on the head tag you should a lot of
    errors on the page.

    musachy
    On 5/23/07, MLENEVEUT@abusinessware.com wrote:

    Hi all,

    I try to insert a datetimepicker tag in my JSP, and I have the following
    javascript error :
    symbol 'struts.widget' is not defined after loading '__package__.js'

    here is my JSP :
    <%@ taglib uri="/struts-dojo-tags" prefix="sx"%>

    <sx:head />
    <s:form action="contacts">

    <table border="0" width="100%" height="100%">
    <tr>
    <td>
    <sx:datetimepicker name="dateDeb" label=
    "test.datepicker" />
    </td>
    </tr>
    </table>

    </s:form>

    I'm in version 2.1.0-SNAPSHOT (of today) for "core", "codebehind-plugin",
    "dojo-plugin", "sitemesh-plugin", "spring-plugin" and "tiles-plugin" jars.

    What's wrong ?

    Thanks for your help,

    Regards,

    Michaël



    --
    "Hey you! Would you help me to carry the stone?" Pink Floyd
  • Musachy Barroso at May 23, 2007 at 1:15 pm
    I just compiled/deployed the dojo plugin and showcase seems to be working
    fine, are you compiling S2.1 yourself?

    musachy
    On 5/23/07, Musachy Barroso wrote:

    that usually means that there is a javascript error in one of the struts
    dojo widgets. If you set debug="true" on the head tag you should a lot of
    errors on the page.

    musachy

    On 5/23/07, MLENEVEUT@abusinessware.com <MLENEVEUT@abusinessware.com >
    wrote:
    Hi all,

    I try to insert a datetimepicker tag in my JSP, and I have the following

    javascript error :
    symbol 'struts.widget' is not defined after loading '__package__.js'

    here is my JSP :
    <%@ taglib uri="/struts-dojo-tags" prefix="sx"%>

    <sx:head />
    <s:form action="contacts">

    <table border="0" width="100%" height="100%">
    <tr>
    <td>
    <sx:datetimepicker name="dateDeb" label=
    "test.datepicker" />
    </td>
    </tr>
    </table>

    </s:form>

    I'm in version 2.1.0-SNAPSHOT (of today) for "core",
    "codebehind-plugin",
    "dojo-plugin", "sitemesh-plugin", "spring-plugin" and "tiles-plugin"
    jars.

    What's wrong ?

    Thanks for your help,

    Regards,

    Michaël



    --
    "Hey you! Would you help me to carry the stone?" Pink Floyd



    --
    "Hey you! Would you help me to carry the stone?" Pink Floyd
  • Mleneveut at May 23, 2007 at 3:14 pm
    In Firefox I have this :
    DEBUG: DEPRECATED: dojo.event replaced by dojo.event.* -- will be removed
    in version: 0.5
    DEBUG: DEPRECATED: dojo.io replaced by dojo.io.* -- will be removed in
    version: 0.5

    But nothing in IE.

    Just to say, the datepicker is working fine (it opens, I can choose a
    date, it fills the input), but I have this javascript error, and my HTML
    page is not good rendered.


    Michaël



    "Musachy Barroso" <musachy@gmail.com>
    23/05/2007 15:12
    Veuillez répondre à
    "Struts Users Mailing List" <user@struts.apache.org>


    A
    "Struts Users Mailing List" <user@struts.apache.org>
    cc

    Objet
    Re: [S2 v2.1.0] DateTimePicker : Dojo javascript error






    that usually means that there is a javascript error in one of the struts
    dojo widgets. If you set debug="true" on the head tag you should a lot of
    errors on the page.

    musachy
    On 5/23/07, MLENEVEUT@abusinessware.com wrote:

    Hi all,

    I try to insert a datetimepicker tag in my JSP, and I have the following
    javascript error :
    symbol 'struts.widget' is not defined after loading '__package__.js'

    here is my JSP :
    <%@ taglib uri="/struts-dojo-tags" prefix="sx"%>

    <sx:head />
    <s:form action="contacts">

    <table border="0" width="100%" height="100%">
    <tr>
    <td>
    <sx:datetimepicker name="dateDeb" label=
    "test.datepicker" />
    </td>
    </tr>
    </table>

    </s:form>

    I'm in version 2.1.0-SNAPSHOT (of today) for "core",
    "codebehind-plugin",
    "dojo-plugin", "sitemesh-plugin", "spring-plugin" and "tiles-plugin" jars.
    What's wrong ?

    Thanks for your help,

    Regards,

    Michaël



    --
    "Hey you! Would you help me to carry the stone?" Pink Floyd
  • Musachy Barroso at May 23, 2007 at 3:24 pm
    Can you do a maven clean and recompile/redeploy? In the last days I've been
    making changes that could result in that kind of problem, but at least it
    was fine on the weekend, and it is working for me now (XP\FF)

    musachy
    On 5/23/07, MLENEVEUT@abusinessware.com wrote:

    In Firefox I have this :
    DEBUG: DEPRECATED: dojo.event replaced by dojo.event.* -- will be removed
    in version: 0.5
    DEBUG: DEPRECATED: dojo.io replaced by dojo.io.* -- will be removed in
    version: 0.5

    But nothing in IE.

    Just to say, the datepicker is working fine (it opens, I can choose a
    date, it fills the input), but I have this javascript error, and my HTML
    page is not good rendered.


    Michaël



    "Musachy Barroso" <musachy@gmail.com>
    23/05/2007 15:12
    Veuillez répondre à
    "Struts Users Mailing List" <user@struts.apache.org>


    A
    "Struts Users Mailing List" <user@struts.apache.org>
    cc

    Objet
    Re: [S2 v2.1.0] DateTimePicker : Dojo javascript error






    that usually means that there is a javascript error in one of the struts
    dojo widgets. If you set debug="true" on the head tag you should a lot of
    errors on the page.

    musachy
    On 5/23/07, MLENEVEUT@abusinessware.com wrote:

    Hi all,

    I try to insert a datetimepicker tag in my JSP, and I have the following
    javascript error :
    symbol 'struts.widget' is not defined after loading '__package__.js'

    here is my JSP :
    <%@ taglib uri="/struts-dojo-tags" prefix="sx"%>

    <sx:head />
    <s:form action="contacts">

    <table border="0" width="100%" height="100%">
    <tr>
    <td>
    <sx:datetimepicker name="dateDeb" label=
    "test.datepicker" />
    </td>
    </tr>
    </table>

    </s:form>

    I'm in version 2.1.0-SNAPSHOT (of today) for "core",
    "codebehind-plugin",
    "dojo-plugin", "sitemesh-plugin", "spring-plugin" and "tiles-plugin" jars.
    What's wrong ?

    Thanks for your help,

    Regards,

    Michaël



    --
    "Hey you! Would you help me to carry the stone?" Pink Floyd

    --
    "Hey you! Would you help me to carry the stone?" Pink Floyd
  • Mleneveut at May 23, 2007 at 3:36 pm
    I get all the SVN workspace this morning, I didn't have it before...

    I resolved the javascript bug saying "unterminated string" by modifing the
    head.ftl : I set the "," before each parameter, elsewhere whe have a ","
    for the last parameter.
    <script language="JavaScript" type="text/javascript">
    // Dojo configuration
    djConfig = {
    isDebug: ${parameters.debug?default(false)?string}
    ,bindEncoding: "${parameters.encoding}"
    <#if parameters.baseRelativePath?if_exists != "">
    ,baseRelativePath: "<@s.url value=
    '${parameters.baseRelativePath}' includeParams='none' encode='false' />"
    ,baseScriptUri: "<@s.url value='${parameters.baseRelativePath}'
    includeParams='none' encode='false' />"
    <#else>
    ,baseRelativePath: "${base}/struts/dojo/"
    ,baseScriptUri: "${base}/struts/dojo/"
    </#if>
    <#if parameters.locale?if_exists != "">
    ,locale: "${parameters.locale}"
    </#if>
    <#if parameters.extraLocales?exists>
    ,extraLocale: [
    <#list parameters.extraLocales as locale>
    "${locale}",
    </#list>
    ]
    </#if>
    };
    </script>

    Now I have these errors :
    DEBUG: DEPRECATED: dojo.event replaced by dojo.event.* -- will be removed
    in version: 0.5
    DEBUG: DEPRECATED: dojo.io replaced by dojo.io.* -- will be removed in
    version: 0.5
    DEBUG: failed loading /crm/struts/dojo/struts/widget/StrutsTreeSelector.js
    with error: [SyntaxError: Identificateur, chaîne ou nombre attendu]
    FATAL exception raised: Could not load 'struts.widget.StrutsTreeSelector';
    last tried '__package__.js'
    DEBUG: failed loading /crm/struts/dojo/struts/widget/__package__.js with
    error: [Error: Could not load 'struts.widget.StrutsTreeSelector'; last
    tried '__package__.js']
    FATAL exception raised: symbol 'struts.widget' is not defined after
    loading '__package__.js'

    I add a folder struts/dojo in my "WebContent" folder, containing the
    resource of dojo-plugin "resources\org\apache\struts2\static\dojo\struts",
    but the same errors occures :/


    Michaël



    "Musachy Barroso" <musachy@gmail.com>
    23/05/2007 17:30
    Veuillez répondre à
    "Struts Users Mailing List" <user@struts.apache.org>


    A
    "Struts Users Mailing List" <user@struts.apache.org>
    cc

    Objet
    Re: [S2 v2.1.0] DateTimePicker : Dojo javascript error






    Can you do a maven clean and recompile/redeploy? In the last days I've
    been
    making changes that could result in that kind of problem, but at least it
    was fine on the weekend, and it is working for me now (XP\FF)

    musachy
    On 5/23/07, MLENEVEUT@abusinessware.com wrote:

    In Firefox I have this :
    DEBUG: DEPRECATED: dojo.event replaced by dojo.event.* -- will be removed
    in version: 0.5
    DEBUG: DEPRECATED: dojo.io replaced by dojo.io.* -- will be removed in
    version: 0.5

    But nothing in IE.

    Just to say, the datepicker is working fine (it opens, I can choose a
    date, it fills the input), but I have this javascript error, and my HTML
    page is not good rendered.


    Michaël



    "Musachy Barroso" <musachy@gmail.com>
    23/05/2007 15:12
    Veuillez répondre à
    "Struts Users Mailing List" <user@struts.apache.org>


    A
    "Struts Users Mailing List" <user@struts.apache.org>
    cc

    Objet
    Re: [S2 v2.1.0] DateTimePicker : Dojo javascript error






    that usually means that there is a javascript error in one of the struts
    dojo widgets. If you set debug="true" on the head tag you should a lot of
    errors on the page.

    musachy
    On 5/23/07, MLENEVEUT@abusinessware.com wrote:

    Hi all,

    I try to insert a datetimepicker tag in my JSP, and I have the
    following
    javascript error :
    symbol 'struts.widget' is not defined after loading '__package__.js'

    here is my JSP :
    <%@ taglib uri="/struts-dojo-tags" prefix="sx"%>

    <sx:head />
    <s:form action="contacts">

    <table border="0" width="100%" height="100%">
    <tr>
    <td>
    <sx:datetimepicker name="dateDeb" label=
    "test.datepicker" />
    </td>
    </tr>
    </table>

    </s:form>

    I'm in version 2.1.0-SNAPSHOT (of today) for "core",
    "codebehind-plugin",
    "dojo-plugin", "sitemesh-plugin", "spring-plugin" and "tiles-plugin" jars.
    What's wrong ?

    Thanks for your help,

    Regards,

    Michaël



    --
    "Hey you! Would you help me to carry the stone?" Pink Floyd

    --
    "Hey you! Would you help me to carry the stone?" Pink Floyd
  • Mleneveut at May 24, 2007 at 4:08 pm
    Hi,

    I updated the source code, done a "mvn clean" and recompile
    ("mvn")/redeploy the jars, and I have the same errors :
    XP/IE 6 :
    DEBUG: DEPRECATED: dojo.event replaced by dojo.event.* -- will be removed
    in version: 0.5
    DEBUG: DEPRECATED: dojo.io replaced by dojo.io.* -- will be removed in
    version: 0.5
    DEBUG: failed loading /crm/struts/dojo/struts/widget/StrutsTreeSelector.js
    with error: [SyntaxError: Identificateur, chaîne ou nombre attendu]
    FATAL exception raised: Could not load 'struts.widget.StrutsTreeSelector';
    last tried '__package__.js'
    DEBUG: failed loading /crm/struts/dojo/struts/widget/__package__.js with
    error: [Error: Could not load 'struts.widget.StrutsTreeSelector'; last
    tried '__package__.js']
    FATAL exception raised: symbol 'struts.widget' is not defined after
    loading '__package__.js'

    XP/FF 2 :
    DEBUG: DEPRECATED: dojo.event replaced by dojo.event.* -- will be removed
    in version: 0.5
    DEBUG: DEPRECATED: dojo.io replaced by dojo.io.* -- will be removed in
    version: 0.5

    Generated HTML :
    <script language="JavaScript" type="text/javascript">
    // Dojo configuration
    djConfig = {
    isDebug: true
    ,bindEncoding: "UTF-8"
    ,baseRelativePath: "/crm/struts/dojo/"
    ,baseScriptUri: "/crm/struts/dojo/"
    };
    </script>
    <script language="JavaScript" type="text/javascript"
    src="/crm/struts/dojo/dojo.js"></script>

    <script language="JavaScript" type="text/javascript"
    src="/crm/struts/ajax/dojoRequire.js"></script>

    <link rel="stylesheet" href="/crm/struts/xhtml/styles.css"
    type="text/css"/>
    <script language="JavaScript" src="/crm/struts/utils.js"
    type="text/javascript"></script>
    <script language="JavaScript" src="/crm/struts/xhtml/validation.js"
    type="text/javascript"></script>
    <script language="JavaScript" src="/crm/struts/css_xhtml/validation.js"
    type="text/javascript"></script>


    <form id="contacts" name="contacts" onsubmit="return true;"
    action="/crm/contacts.action" method="POST">
    <table class="wwFormTable">
    <table border="0" width="100%" height="100%">
    <tr>
    <td class="tdLabel"><label for="contacts_dateDeb" class="label">Date
    de début
    :&nbsp;</label></td>
    <td
    <div
    dojoType="struts:StrutsDatePicker" id="contacts_dateDeb"
    name="dateDeb" inputName="dojo.dateDeb" displayFormat="dd/MM/yyyy"
    saveFormat="rfc"></div>
    </td>
    </tr>
    </table>
    </table></form>


    I don't have any folder named /crm/struts/... Is that normal that the
    head.ftl generates this ? Do I have to copy some files from
    dojo-plugin/resources to /crm/struts ? Or specify another baseRelativePath
    ?

    Thanks for your help.

    Regards,

    Michaël



    MLENEVEUT@abusinessware.com
    23/05/2007 17:43
    Veuillez répondre à
    "Struts Users Mailing List" <user@struts.apache.org>


    A
    "Struts Users Mailing List" <user@struts.apache.org>
    cc

    Objet
    Re: [S2 v2.1.0] DateTimePicker : Dojo javascript error






    I get all the SVN workspace this morning, I didn't have it before...

    I resolved the javascript bug saying "unterminated string" by modifing the

    head.ftl : I set the "," before each parameter, elsewhere whe have a ","
    for the last parameter.
    <script language="JavaScript" type="text/javascript">
    // Dojo configuration
    djConfig = {
    isDebug: ${parameters.debug?default(false)?string}
    ,bindEncoding: "${parameters.encoding}"
    <#if parameters.baseRelativePath?if_exists != "">
    ,baseRelativePath: "<@s.url value=
    '${parameters.baseRelativePath}' includeParams='none' encode='false' />"
    ,baseScriptUri: "<@s.url value='${parameters.baseRelativePath}'
    includeParams='none' encode='false' />"
    <#else>
    ,baseRelativePath: "${base}/struts/dojo/"
    ,baseScriptUri: "${base}/struts/dojo/"
    </#if>
    <#if parameters.locale?if_exists != "">
    ,locale: "${parameters.locale}"
    </#if>
    <#if parameters.extraLocales?exists>
    ,extraLocale: [
    <#list parameters.extraLocales as locale>
    "${locale}",
    </#list>
    ]
    </#if>
    };
    </script>

    Now I have these errors :
    DEBUG: DEPRECATED: dojo.event replaced by dojo.event.* -- will be removed
    in version: 0.5
    DEBUG: DEPRECATED: dojo.io replaced by dojo.io.* -- will be removed in
    version: 0.5
    DEBUG: failed loading /crm/struts/dojo/struts/widget/StrutsTreeSelector.js

    with error: [SyntaxError: Identificateur, chaîne ou nombre attendu]
    FATAL exception raised: Could not load 'struts.widget.StrutsTreeSelector';

    last tried '__package__.js'
    DEBUG: failed loading /crm/struts/dojo/struts/widget/__package__.js with
    error: [Error: Could not load 'struts.widget.StrutsTreeSelector'; last
    tried '__package__.js']
    FATAL exception raised: symbol 'struts.widget' is not defined after
    loading '__package__.js'

    I add a folder struts/dojo in my "WebContent" folder, containing the
    resource of dojo-plugin "resources\org\apache\struts2\static\dojo\struts",

    but the same errors occures :/


    Michaël



    "Musachy Barroso" <musachy@gmail.com>
    23/05/2007 17:30
    Veuillez répondre à
    "Struts Users Mailing List" <user@struts.apache.org>


    A
    "Struts Users Mailing List" <user@struts.apache.org>
    cc

    Objet
    Re: [S2 v2.1.0] DateTimePicker : Dojo javascript error






    Can you do a maven clean and recompile/redeploy? In the last days I've
    been
    making changes that could result in that kind of problem, but at least it
    was fine on the weekend, and it is working for me now (XP\FF)

    musachy
    On 5/23/07, MLENEVEUT@abusinessware.com wrote:

    In Firefox I have this :
    DEBUG: DEPRECATED: dojo.event replaced by dojo.event.* -- will be removed
    in version: 0.5
    DEBUG: DEPRECATED: dojo.io replaced by dojo.io.* -- will be removed in
    version: 0.5

    But nothing in IE.

    Just to say, the datepicker is working fine (it opens, I can choose a
    date, it fills the input), but I have this javascript error, and my HTML
    page is not good rendered.


    Michaël



    "Musachy Barroso" <musachy@gmail.com>
    23/05/2007 15:12
    Veuillez répondre à
    "Struts Users Mailing List" <user@struts.apache.org>


    A
    "Struts Users Mailing List" <user@struts.apache.org>
    cc

    Objet
    Re: [S2 v2.1.0] DateTimePicker : Dojo javascript error






    that usually means that there is a javascript error in one of the struts
    dojo widgets. If you set debug="true" on the head tag you should a lot of
    errors on the page.

    musachy
    On 5/23/07, MLENEVEUT@abusinessware.com wrote:

    Hi all,

    I try to insert a datetimepicker tag in my JSP, and I have the
    following
    javascript error :
    symbol 'struts.widget' is not defined after loading '__package__.js'

    here is my JSP :
    <%@ taglib uri="/struts-dojo-tags" prefix="sx"%>

    <sx:head />
    <s:form action="contacts">

    <table border="0" width="100%" height="100%">
    <tr>
    <td>
    <sx:datetimepicker name="dateDeb" label=
    "test.datepicker" />
    </td>
    </tr>
    </table>

    </s:form>

    I'm in version 2.1.0-SNAPSHOT (of today) for "core",
    "codebehind-plugin",
    "dojo-plugin", "sitemesh-plugin", "spring-plugin" and "tiles-plugin" jars.
    What's wrong ?

    Thanks for your help,

    Regards,

    Michaël



    --
    "Hey you! Would you help me to carry the stone?" Pink Floyd

    --
    "Hey you! Would you help me to carry the stone?" Pink Floyd
  • Musachy Barroso at May 24, 2007 at 5:37 pm
    the "/struts" folder is inside the struts-core jar, and no, you shouldn't
    have to specify anything else. I'm clueless about this one, even more weird
    is that you said the datepicker was showing up, even with the error.

    musachy
    On 5/24/07, MLENEVEUT@abusinessware.com wrote:

    Hi,

    I updated the source code, done a "mvn clean" and recompile
    ("mvn")/redeploy the jars, and I have the same errors :
    XP/IE 6 :
    DEBUG: DEPRECATED: dojo.event replaced by dojo.event.* -- will be removed
    in version: 0.5
    DEBUG: DEPRECATED: dojo.io replaced by dojo.io.* -- will be removed in
    version: 0.5
    DEBUG: failed loading /crm/struts/dojo/struts/widget/StrutsTreeSelector.js
    with error: [SyntaxError: Identificateur, chaîne ou nombre attendu]
    FATAL exception raised: Could not load 'struts.widget.StrutsTreeSelector';
    last tried '__package__.js'
    DEBUG: failed loading /crm/struts/dojo/struts/widget/__package__.js with
    error: [Error: Could not load 'struts.widget.StrutsTreeSelector'; last
    tried '__package__.js']
    FATAL exception raised: symbol 'struts.widget' is not defined after
    loading '__package__.js'

    XP/FF 2 :
    DEBUG: DEPRECATED: dojo.event replaced by dojo.event.* -- will be removed
    in version: 0.5
    DEBUG: DEPRECATED: dojo.io replaced by dojo.io.* -- will be removed in
    version: 0.5

    Generated HTML :
    <script language="JavaScript" type="text/javascript">
    // Dojo configuration
    djConfig = {
    isDebug: true
    ,bindEncoding: "UTF-8"
    ,baseRelativePath: "/crm/struts/dojo/"
    ,baseScriptUri: "/crm/struts/dojo/"
    };
    </script>
    <script language="JavaScript" type="text/javascript"
    src="/crm/struts/dojo/dojo.js"></script>

    <script language="JavaScript" type="text/javascript"
    src="/crm/struts/ajax/dojoRequire.js"></script>

    <link rel="stylesheet" href="/crm/struts/xhtml/styles.css"
    type="text/css"/>
    <script language="JavaScript" src="/crm/struts/utils.js"
    type="text/javascript"></script>
    <script language="JavaScript" src="/crm/struts/xhtml/validation.js"
    type="text/javascript"></script>
    <script language="JavaScript" src="/crm/struts/css_xhtml/validation.js"
    type="text/javascript"></script>


    <form id="contacts" name="contacts" onsubmit="return true;"
    action="/crm/contacts.action" method="POST">
    <table class="wwFormTable">
    <table border="0" width="100%" height="100%">
    <tr>
    <td class="tdLabel"><label for="contacts_dateDeb" class="label">Date
    de début
    :&nbsp;</label></td>
    <td
    <div
    dojoType="struts:StrutsDatePicker" id="contacts_dateDeb"
    name="dateDeb" inputName="dojo.dateDeb" displayFormat="dd/MM/yyyy"
    saveFormat="rfc"></div>
    </td>
    </tr>
    </table>
    </table></form>


    I don't have any folder named /crm/struts/... Is that normal that the
    head.ftl generates this ? Do I have to copy some files from
    dojo-plugin/resources to /crm/struts ? Or specify another baseRelativePath
    ?

    Thanks for your help.

    Regards,

    Michaël



    MLENEVEUT@abusinessware.com
    23/05/2007 17:43
    Veuillez répondre à
    "Struts Users Mailing List" <user@struts.apache.org>


    A
    "Struts Users Mailing List" <user@struts.apache.org>
    cc

    Objet
    Re: [S2 v2.1.0] DateTimePicker : Dojo javascript error






    I get all the SVN workspace this morning, I didn't have it before...

    I resolved the javascript bug saying "unterminated string" by modifing the

    head.ftl : I set the "," before each parameter, elsewhere whe have a ","
    for the last parameter.
    <script language="JavaScript" type="text/javascript">
    // Dojo configuration
    djConfig = {
    isDebug: ${parameters.debug?default(false)?string}
    ,bindEncoding: "${parameters.encoding}"
    <#if parameters.baseRelativePath?if_exists != "">
    ,baseRelativePath: "<@s.url value=
    '${parameters.baseRelativePath}' includeParams='none' encode='false' />"
    ,baseScriptUri: "<@s.url value='${parameters.baseRelativePath}'
    includeParams='none' encode='false' />"
    <#else>
    ,baseRelativePath: "${base}/struts/dojo/"
    ,baseScriptUri: "${base}/struts/dojo/"
    </#if>
    <#if parameters.locale?if_exists != "">
    ,locale: "${parameters.locale}"
    </#if>
    <#if parameters.extraLocales?exists>
    ,extraLocale: [
    <#list parameters.extraLocales as locale>
    "${locale}",
    </#list>
    ]
    </#if>
    };
    </script>

    Now I have these errors :
    DEBUG: DEPRECATED: dojo.event replaced by dojo.event.* -- will be removed
    in version: 0.5
    DEBUG: DEPRECATED: dojo.io replaced by dojo.io.* -- will be removed in
    version: 0.5
    DEBUG: failed loading /crm/struts/dojo/struts/widget/StrutsTreeSelector.js

    with error: [SyntaxError: Identificateur, chaîne ou nombre attendu]
    FATAL exception raised: Could not load 'struts.widget.StrutsTreeSelector';

    last tried '__package__.js'
    DEBUG: failed loading /crm/struts/dojo/struts/widget/__package__.js with
    error: [Error: Could not load 'struts.widget.StrutsTreeSelector'; last
    tried '__package__.js']
    FATAL exception raised: symbol 'struts.widget' is not defined after
    loading '__package__.js'

    I add a folder struts/dojo in my "WebContent" folder, containing the
    resource of dojo-plugin "resources\org\apache\struts2\static\dojo\struts",

    but the same errors occures :/


    Michaël



    "Musachy Barroso" <musachy@gmail.com>
    23/05/2007 17:30
    Veuillez répondre à
    "Struts Users Mailing List" <user@struts.apache.org>


    A
    "Struts Users Mailing List" <user@struts.apache.org>
    cc

    Objet
    Re: [S2 v2.1.0] DateTimePicker : Dojo javascript error






    Can you do a maven clean and recompile/redeploy? In the last days I've
    been
    making changes that could result in that kind of problem, but at least it
    was fine on the weekend, and it is working for me now (XP\FF)

    musachy
    On 5/23/07, MLENEVEUT@abusinessware.com wrote:

    In Firefox I have this :
    DEBUG: DEPRECATED: dojo.event replaced by dojo.event.* -- will be removed
    in version: 0.5
    DEBUG: DEPRECATED: dojo.io replaced by dojo.io.* -- will be removed in
    version: 0.5

    But nothing in IE.

    Just to say, the datepicker is working fine (it opens, I can choose a
    date, it fills the input), but I have this javascript error, and my HTML
    page is not good rendered.


    Michaël



    "Musachy Barroso" <musachy@gmail.com>
    23/05/2007 15:12
    Veuillez répondre à
    "Struts Users Mailing List" <user@struts.apache.org>


    A
    "Struts Users Mailing List" <user@struts.apache.org>
    cc

    Objet
    Re: [S2 v2.1.0] DateTimePicker : Dojo javascript error






    that usually means that there is a javascript error in one of the struts
    dojo widgets. If you set debug="true" on the head tag you should a lot of
    errors on the page.

    musachy

    On 5/23/07, MLENEVEUT@abusinessware.com <MLENEVEUT@abusinessware.com>
    wrote:
    Hi all,

    I try to insert a datetimepicker tag in my JSP, and I have the
    following
    javascript error :
    symbol 'struts.widget' is not defined after loading '__package__.js'

    here is my JSP :
    <%@ taglib uri="/struts-dojo-tags" prefix="sx"%>

    <sx:head />
    <s:form action="contacts">

    <table border="0" width="100%" height="100%">
    <tr>
    <td>
    <sx:datetimepicker name="dateDeb" label=
    "test.datepicker" />
    </td>
    </tr>
    </table>

    </s:form>

    I'm in version 2.1.0-SNAPSHOT (of today) for "core",
    "codebehind-plugin",
    "dojo-plugin", "sitemesh-plugin", "spring-plugin" and "tiles-plugin" jars.
    What's wrong ?

    Thanks for your help,

    Regards,

    Michaël



    --
    "Hey you! Would you help me to carry the stone?" Pink Floyd

    --
    "Hey you! Would you help me to carry the stone?" Pink Floyd


    --
    "Hey you! Would you help me to carry the stone?" Pink Floyd
  • Mleneveut at May 25, 2007 at 7:15 am
    I have some kind of errors in the showcase app I just cleaned/recompiled :

    in IE 6 :
    DEBUG: DEPRECATED: dojo.event replaced by dojo.event.* -- will be removed
    in version: 0.5
    DEBUG: DEPRECATED: dojo.io replaced by dojo.io.* -- will be removed in
    version: 0.5
    DEBUG: failed loading
    /struts2-showcase/struts/dojo/struts/widget/StrutsTreeSelector.js with
    error: [SyntaxError: Identificateur, chaîne ou nombre attendu]
    FATAL exception raised: Could not load 'struts.widget.StrutsTreeSelector';
    last tried '__package__.js'
    DEBUG: failed loading
    /struts2-showcase/struts/dojo/struts/widget/__package__.js with error:
    [Error: Could not load 'struts.widget.StrutsTreeSelector'; last tried
    '__package__.js']
    FATAL exception raised: symbol 'struts.widget' is not defined after
    loading '__package__.js'

    in FF 2 :
    DEBUG: DEPRECATED: dojo.event replaced by dojo.event.* -- will be removed
    in version: 0.5
    DEBUG: DEPRECATED: dojo.io replaced by dojo.io.* -- will be removed in
    version: 0.5





    Regards,

    Michaël



    "Musachy Barroso" <musachy@gmail.com>
    24/05/2007 19:38
    Veuillez répondre à
    "Struts Users Mailing List" <user@struts.apache.org>


    A
    "Struts Users Mailing List" <user@struts.apache.org>
    cc

    Objet
    Re: [S2 v2.1.0] DateTimePicker : Dojo javascript error






    the "/struts" folder is inside the struts-core jar, and no, you shouldn't
    have to specify anything else. I'm clueless about this one, even more
    weird
    is that you said the datepicker was showing up, even with the error.

    musachy
    On 5/24/07, MLENEVEUT@abusinessware.com wrote:

    Hi,

    I updated the source code, done a "mvn clean" and recompile
    ("mvn")/redeploy the jars, and I have the same errors :
    XP/IE 6 :
    DEBUG: DEPRECATED: dojo.event replaced by dojo.event.* -- will be removed
    in version: 0.5
    DEBUG: DEPRECATED: dojo.io replaced by dojo.io.* -- will be removed in
    version: 0.5
    DEBUG: failed loading
    /crm/struts/dojo/struts/widget/StrutsTreeSelector.js
    with error: [SyntaxError: Identificateur, chaîne ou nombre attendu]
    FATAL exception raised: Could not load
    'struts.widget.StrutsTreeSelector';
    last tried '__package__.js'
    DEBUG: failed loading /crm/struts/dojo/struts/widget/__package__.js with
    error: [Error: Could not load 'struts.widget.StrutsTreeSelector'; last
    tried '__package__.js']
    FATAL exception raised: symbol 'struts.widget' is not defined after
    loading '__package__.js'

    XP/FF 2 :
    DEBUG: DEPRECATED: dojo.event replaced by dojo.event.* -- will be removed
    in version: 0.5
    DEBUG: DEPRECATED: dojo.io replaced by dojo.io.* -- will be removed in
    version: 0.5

    Generated HTML :
    <script language="JavaScript" type="text/javascript">
    // Dojo configuration
    djConfig = {
    isDebug: true
    ,bindEncoding: "UTF-8"
    ,baseRelativePath: "/crm/struts/dojo/"
    ,baseScriptUri: "/crm/struts/dojo/"
    };
    </script>
    <script language="JavaScript" type="text/javascript"
    src="/crm/struts/dojo/dojo.js"></script>

    <script language="JavaScript" type="text/javascript"
    src="/crm/struts/ajax/dojoRequire.js"></script>

    <link rel="stylesheet" href="/crm/struts/xhtml/styles.css"
    type="text/css"/>
    <script language="JavaScript" src="/crm/struts/utils.js"
    type="text/javascript"></script>
    <script language="JavaScript" src="/crm/struts/xhtml/validation.js"
    type="text/javascript"></script>
    <script language="JavaScript" src="/crm/struts/css_xhtml/validation.js"
    type="text/javascript"></script>


    <form id="contacts" name="contacts" onsubmit="return true;"
    action="/crm/contacts.action" method="POST">
    <table class="wwFormTable">
    <table border="0" width="100%" height="100%">
    <tr>
    <td class="tdLabel"><label for="contacts_dateDeb" class="label">Date
    de début
    :&nbsp;</label></td>
    <td
    <div
    dojoType="struts:StrutsDatePicker" id="contacts_dateDeb"
    name="dateDeb" inputName="dojo.dateDeb" displayFormat="dd/MM/yyyy"
    saveFormat="rfc"></div>
    </td>
    </tr>
    </table>
    </table></form>


    I don't have any folder named /crm/struts/... Is that normal that the
    head.ftl generates this ? Do I have to copy some files from
    dojo-plugin/resources to /crm/struts ? Or specify another
    baseRelativePath
    ?

    Thanks for your help.

    Regards,

    Michaël



    MLENEVEUT@abusinessware.com
    23/05/2007 17:43
    Veuillez répondre à
    "Struts Users Mailing List" <user@struts.apache.org>


    A
    "Struts Users Mailing List" <user@struts.apache.org>
    cc

    Objet
    Re: [S2 v2.1.0] DateTimePicker : Dojo javascript error






    I get all the SVN workspace this morning, I didn't have it before...

    I resolved the javascript bug saying "unterminated string" by modifing the
    head.ftl : I set the "," before each parameter, elsewhere whe have a ","
    for the last parameter.
    <script language="JavaScript" type="text/javascript">
    // Dojo configuration
    djConfig = {
    isDebug: ${parameters.debug?default(false)?string}
    ,bindEncoding: "${parameters.encoding}"
    <#if parameters.baseRelativePath?if_exists != "">
    ,baseRelativePath: "<@s.url value=
    '${parameters.baseRelativePath}' includeParams='none' encode='false' />"
    ,baseScriptUri: "<@s.url
    value='${parameters.baseRelativePath}'
    includeParams='none' encode='false' />"
    <#else>
    ,baseRelativePath: "${base}/struts/dojo/"
    ,baseScriptUri: "${base}/struts/dojo/"
    </#if>
    <#if parameters.locale?if_exists != "">
    ,locale: "${parameters.locale}"
    </#if>
    <#if parameters.extraLocales?exists>
    ,extraLocale: [
    <#list parameters.extraLocales as locale>
    "${locale}",
    </#list>
    ]
    </#if>
    };
    </script>

    Now I have these errors :
    DEBUG: DEPRECATED: dojo.event replaced by dojo.event.* -- will be removed
    in version: 0.5
    DEBUG: DEPRECATED: dojo.io replaced by dojo.io.* -- will be removed in
    version: 0.5
    DEBUG: failed loading
    /crm/struts/dojo/struts/widget/StrutsTreeSelector.js
    with error: [SyntaxError: Identificateur, chaîne ou nombre attendu]
    FATAL exception raised: Could not load
    'struts.widget.StrutsTreeSelector';
    last tried '__package__.js'
    DEBUG: failed loading /crm/struts/dojo/struts/widget/__package__.js with
    error: [Error: Could not load 'struts.widget.StrutsTreeSelector'; last
    tried '__package__.js']
    FATAL exception raised: symbol 'struts.widget' is not defined after
    loading '__package__.js'

    I add a folder struts/dojo in my "WebContent" folder, containing the
    resource of dojo-plugin
    "resources\org\apache\struts2\static\dojo\struts",
    but the same errors occures :/


    Michaël



    "Musachy Barroso" <musachy@gmail.com>
    23/05/2007 17:30
    Veuillez répondre à
    "Struts Users Mailing List" <user@struts.apache.org>


    A
    "Struts Users Mailing List" <user@struts.apache.org>
    cc

    Objet
    Re: [S2 v2.1.0] DateTimePicker : Dojo javascript error






    Can you do a maven clean and recompile/redeploy? In the last days I've
    been
    making changes that could result in that kind of problem, but at least it
    was fine on the weekend, and it is working for me now (XP\FF)

    musachy
    On 5/23/07, MLENEVEUT@abusinessware.com wrote:

    In Firefox I have this :
    DEBUG: DEPRECATED: dojo.event replaced by dojo.event.* -- will be removed
    in version: 0.5
    DEBUG: DEPRECATED: dojo.io replaced by dojo.io.* -- will be removed in
    version: 0.5

    But nothing in IE.

    Just to say, the datepicker is working fine (it opens, I can choose a
    date, it fills the input), but I have this javascript error, and my
    HTML
    page is not good rendered.


    Michaël



    "Musachy Barroso" <musachy@gmail.com>
    23/05/2007 15:12
    Veuillez répondre à
    "Struts Users Mailing List" <user@struts.apache.org>


    A
    "Struts Users Mailing List" <user@struts.apache.org>
    cc

    Objet
    Re: [S2 v2.1.0] DateTimePicker : Dojo javascript error






    that usually means that there is a javascript error in one of the
    struts
    dojo widgets. If you set debug="true" on the head tag you should a lot of
    errors on the page.

    musachy

    On 5/23/07, MLENEVEUT@abusinessware.com <MLENEVEUT@abusinessware.com>
    wrote:
    Hi all,

    I try to insert a datetimepicker tag in my JSP, and I have the
    following
    javascript error :
    symbol 'struts.widget' is not defined after loading '__package__.js'

    here is my JSP :
    <%@ taglib uri="/struts-dojo-tags" prefix="sx"%>

    <sx:head />
    <s:form action="contacts">

    <table border="0" width="100%" height="100%">
    <tr>
    <td>
    <sx:datetimepicker name="dateDeb" label=
    "test.datepicker" />
    </td>
    </tr>
    </table>

    </s:form>

    I'm in version 2.1.0-SNAPSHOT (of today) for "core",
    "codebehind-plugin",
    "dojo-plugin", "sitemesh-plugin", "spring-plugin" and "tiles-plugin" jars.
    What's wrong ?

    Thanks for your help,

    Regards,

    Michaël



    --
    "Hey you! Would you help me to carry the stone?" Pink Floyd

    --
    "Hey you! Would you help me to carry the stone?" Pink Floyd


    --
    "Hey you! Would you help me to carry the stone?" Pink Floyd
  • Andrew Penrose at May 23, 2007 at 1:24 pm
    Check to see if you have scriptaculos.js included as well as you dojo scripts...I was getting a problem with firefox in relation to this.
    Andrew

    -----Original Message-----
    From: Musachy Barroso
    Sent: 23 May 2007 14:15
    To: Struts Users Mailing List
    Subject: Re: [S2 v2.1.0] DateTimePicker : Dojo javascript error

    I just compiled/deployed the dojo plugin and showcase seems to be working
    fine, are you compiling S2.1 yourself?

    musachy
    On 5/23/07, Musachy Barroso wrote:

    that usually means that there is a javascript error in one of the struts
    dojo widgets. If you set debug="true" on the head tag you should a lot of
    errors on the page.

    musachy

    On 5/23/07, MLENEVEUT@abusinessware.com <MLENEVEUT@abusinessware.com >
    wrote:
    Hi all,

    I try to insert a datetimepicker tag in my JSP, and I have the following

    javascript error :
    symbol 'struts.widget' is not defined after loading '__package__.js'

    here is my JSP :
    <%@ taglib uri="/struts-dojo-tags" prefix="sx"%>

    <sx:head />
    <s:form action="contacts">

    <table border="0" width="100%" height="100%">
    <tr>
    <td>
    <sx:datetimepicker name="dateDeb" label=
    "test.datepicker" />
    </td>
    </tr>
    </table>

    </s:form>

    I'm in version 2.1.0-SNAPSHOT (of today) for "core",
    "codebehind-plugin",
    "dojo-plugin", "sitemesh-plugin", "spring-plugin" and "tiles-plugin"
    jars.

    What's wrong ?

    Thanks for your help,

    Regards,

    Michaël



    --
    "Hey you! Would you help me to carry the stone?" Pink Floyd



    --
    "Hey you! Would you help me to carry the stone?" Pink Floyd

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
    For additional commands, e-mail: user-help@struts.apache.org
  • Julien Leonard at May 23, 2007 at 1:53 pm
    Maybe with this : <sx:head theme="ajax"/> instead of <sx:head />

    2007/5/23, Andrew Penrose <Andrew.Penrose@ward.ie>:
    Check to see if you have scriptaculos.js included as well as you dojo
    scripts...I was getting a problem with firefox in relation to this.
    Andrew

    -----Original Message-----
    From: Musachy Barroso
    Sent: 23 May 2007 14:15
    To: Struts Users Mailing List
    Subject: Re: [S2 v2.1.0] DateTimePicker : Dojo javascript error

    I just compiled/deployed the dojo plugin and showcase seems to be working
    fine, are you compiling S2.1 yourself?

    musachy
    On 5/23/07, Musachy Barroso wrote:

    that usually means that there is a javascript error in one of the struts
    dojo widgets. If you set debug="true" on the head tag you should a lot of
    errors on the page.

    musachy

    On 5/23/07, MLENEVEUT@abusinessware.com <MLENEVEUT@abusinessware.com >
    wrote:
    Hi all,

    I try to insert a datetimepicker tag in my JSP, and I have the
    following
    javascript error :
    symbol 'struts.widget' is not defined after loading '__package__.js'

    here is my JSP :
    <%@ taglib uri="/struts-dojo-tags" prefix="sx"%>

    <sx:head />
    <s:form action="contacts">

    <table border="0" width="100%" height="100%">
    <tr>
    <td>
    <sx:datetimepicker name="dateDeb" label=
    "test.datepicker" />
    </td>
    </tr>
    </table>

    </s:form>

    I'm in version 2.1.0-SNAPSHOT (of today) for "core",
    "codebehind-plugin",
    "dojo-plugin", "sitemesh-plugin", "spring-plugin" and "tiles-plugin"
    jars.

    What's wrong ?

    Thanks for your help,

    Regards,

    Michaël



    --
    "Hey you! Would you help me to carry the stone?" Pink Floyd



    --
    "Hey you! Would you help me to carry the stone?" Pink Floyd

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
    For additional commands, e-mail: user-help@struts.apache.org
  • Mleneveut at May 23, 2007 at 3:07 pm

    Maybe with this : <sx:head theme="ajax"/> instead of <sx:head />
    theme is not in the DTD of sx:head
    Check to see if you have scriptaculos.js included as well as you dojo
    scripts...I was getting a problem with firefox in relation to this.
    Andrew
    Where do I have to have this scriptaculos.js ? Declared in my JSP ? I
    don't see any file named like this in Dojo plugin.
    are you compiling S2.1 yourself?
    Yes, with maven 2 from the SVN source (
    http://svn.apache.org/repos/asf/struts/struts2/trunk) of today.
    If you set debug="true"
    Nothing more happens :/

    My JSP :
    <%@ taglib uri="/struts-tags" prefix="s"%>
    <%@ taglib uri="/struts-dojo-tags" prefix="sx"%>

    <sx:head debug="true"/>

    <s:form action="contacts">
    <table border="0" width="100%" height="100%">
    <sx:datetimepicker name="dateDeb" label="contacts.dateDeb" />
    </table>
    </s:form>

    The HTML generated :
    <script language="JavaScript" type="text/javascript">
    // Dojo configuration
    djConfig = {
    isDebug: true,
    bindEncoding: "UTF-8",
    baseRelativePath: "/crm/struts/dojo/",
    baseScriptUri: "/crm/struts/dojo/",
    };
    </script>

    <script language="JavaScript" type="text/javascript"
    src="/crm/struts/dojo/dojo.js"></script>

    <script language="JavaScript" type="text/javascript"
    src="/crm/struts/ajax/dojoRequire.js"></script>
    <link rel="stylesheet" href="/crm/struts/xhtml/styles.css"
    type="text/css"/>
    <script language="JavaScript" src="/crm/struts/utils.js"
    type="text/javascript"></script>
    <script language="JavaScript" src="/crm/struts/xhtml/validation.js"
    type="text/javascript"></script>
    <script language="JavaScript" src="/crm/struts/css_xhtml/validation.js"
    type="text/javascript"></script>


    <form id="contacts" name="contacts" onsubmit="return true;"
    action="/crm/contacts.action" method="POST">
    <table class="wwFormTable">
    <table border="0" width="100%" height="100%">
    <tr>
    <td class="tdLabel"><label for="contacts_dateDeb" class="label">Date
    de début
    :&nbsp;</label></td>
    <td
    <div
    dojoType="struts:StrutsDatePicker" id="contacts_dateDeb"
    name="dateDeb" inputName="dojo.dateDeb" saveFormat="rfc"></div>
    </td>
    </tr>

    <tr valign="middle" align="center">
    <td colspan="2">
    Cette page est en cours de construction.<br/>
    <img src="img/construction.jpg?onglet=20"
    border="0"/>
    </td>
    </tr>
    </table>
    </table></form>

    One thing : /crm is my app context. But I don't have any folder named
    "struts" in my webapp. Do I have to add the Dojo templates in my webapp,
    or does Struts find it in the dojo-plugin.jar ? How does he find the
    dojo.js, dojoRequire.js, ... ?


    Michaël



    "Julien Leonard" <jl.degetel@gmail.com>
    23/05/2007 15:56
    Veuillez répondre à
    "Struts Users Mailing List" <user@struts.apache.org>


    A
    "Struts Users Mailing List" <user@struts.apache.org>
    cc

    Objet
    Re: [S2 v2.1.0] DateTimePicker : Dojo javascript error






    Maybe with this : <sx:head theme="ajax"/> instead of <sx:head />

    2007/5/23, Andrew Penrose <Andrew.Penrose@ward.ie>:
    Check to see if you have scriptaculos.js included as well as you dojo
    scripts...I was getting a problem with firefox in relation to this.
    Andrew

    -----Original Message-----
    From: Musachy Barroso
    Sent: 23 May 2007 14:15
    To: Struts Users Mailing List
    Subject: Re: [S2 v2.1.0] DateTimePicker : Dojo javascript error

    I just compiled/deployed the dojo plugin and showcase seems to be working
    fine, are you compiling S2.1 yourself?

    musachy
    On 5/23/07, Musachy Barroso wrote:

    that usually means that there is a javascript error in one of the
    struts
    dojo widgets. If you set debug="true" on the head tag you should a lot of
    errors on the page.

    musachy

    On 5/23/07, MLENEVEUT@abusinessware.com <MLENEVEUT@abusinessware.com >
    wrote:
    Hi all,

    I try to insert a datetimepicker tag in my JSP, and I have the
    following
    javascript error :
    symbol 'struts.widget' is not defined after loading '__package__.js'

    here is my JSP :
    <%@ taglib uri="/struts-dojo-tags" prefix="sx"%>

    <sx:head />
    <s:form action="contacts">

    <table border="0" width="100%" height="100%">
    <tr>
    <td>
    <sx:datetimepicker name="dateDeb" label=
    "test.datepicker" />
    </td>
    </tr>
    </table>

    </s:form>

    I'm in version 2.1.0-SNAPSHOT (of today) for "core",
    "codebehind-plugin",
    "dojo-plugin", "sitemesh-plugin", "spring-plugin" and "tiles-plugin"
    jars.

    What's wrong ?

    Thanks for your help,

    Regards,

    Michaël



    --
    "Hey you! Would you help me to carry the stone?" Pink Floyd



    --
    "Hey you! Would you help me to carry the stone?" Pink Floyd

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
    For additional commands, e-mail: user-help@struts.apache.org

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categoriesstruts
postedMay 23, '07 at 12:24p
activeMay 25, '07 at 7:15a
posts12
users4
websitestruts.apache.org
irc#struts

People

Translate

site design / logo © 2022 Grokbase