struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcos34 <marcos.guillenmarti...@gmail.com>
Subject Using json in Struts 2.1.8.1 bis
Date Wed, 22 Sep 2010 20:51:26 GMT

I know that is happening.

Strust 2:
struts2-dojo-plugin-2.1.8.1.jar
struts2-json-plugin-2.1.8.1.jar
json-lib-2.1.jar
etc...

If I run examples works <sx:autocompleter ...

But no:
    <s:url id="ajaxUsuarios" value="UserNoGestor"/>
    <sx:autocompleter list="usuariosNoGestor" name="usuario"
href="%{ajaxUsuarios}" label="Usuario"/>

The debug says :
DEBUG: please consider using a mimetype of text/json-comment-filtered to
avoid potential security issues with JSON endpoints
DEBUG: [SyntaxError: Unexpected token <]
DEBUG: .....
<script language="JavaScript" type="text/javascript">    // Dojo
configuration
    djConfig = {        isDebug: true,        bindEncoding: "UTF-8"
          ,baseRelativePath: "/prueba3/struts/dojo/"
          ,baseScriptUri: "/prueba3/struts/dojo/"         ,parseWidgets :
false
            };</script>  <script language="JavaScript"
type="text/javascript"
        src="/prueba3/struts/dojo/struts_dojo.js"></script>
<script language="JavaScript" type="text/javascript"
        src="/prueba3/struts/ajax/dojoRequire.js"></script>
<script language="JavaScript" type="text/javascript">
    dojo.hostenv.writeIncludes(true);</script>     
<link rel="stylesheet" href="/prueba3/struts/xhtml/styles.css"
type="text/css"/>
<script language="JavaScript" src="/prueba3/struts/utils.js"
type="text/javascript"></script>
<script language="JavaScript" src="/prueba3/struts/xhtml/validation.js"
type="text/javascript"></script>
<script language="JavaScript" src="/prueba3/struts/css_xhtml/validation.js"
type="text/javascript"></script>

..........

 <tr> <td class="tdLabel"><label for="usertogestor_usuario"
class="label">Usuario:</label></td> <td > 
 <input dojoType="struts:ComboBox" dataUrl="UserNoGestor"
id="usertogestor_usuario" name="usuario" keyName="usuarioKey"
visibleDownArrow="true" /> 
 <option value="paty">paty</option> <option value="alvaro">alvaro</option>
</select> </td> 
 </tr> 
 <script language="JavaScript"
type="text/javascript">djConfig.searchIds.push("usertogestor_usuario");</script>

Being paty and alvaro values list="usuariosNoGestor" of UserNoGestor action

Thanks
-- 
View this message in context: http://old.nabble.com/Using-json-in-Struts-2.1.8.1-bis-tp29783871p29783871.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Mime
View raw message