I've changed the order and now that error doesn't appear, but it doesn't work 
yet...
 
I have done a test with this page:
 
<%@ page import="ads.web.action.UsuarioAction"%>
<%@ taglib uri="http://displaytag.sf.net"; prefix="display" %>

<%
Object result = session.getAttribute( "result" );
UsuarioAction ac = new UsuarioAction();
System.out.println(ac.getTodosUsuarios());
session.setAttribute( "result", ac.getTodosUsuarios() );
%>
<html>
<head>

<script language='javascript' src="src/javascript/jquery.js" 
type="text/javascript"></script>
<script src="src/javascript/displayTagAjax.js">

</script>
</head>
<body>

 
<div id="ajxDspId"> 
<display:table name="sessionScope.result" pagesize="2" htmlId="dispTable" 
sort="list">
<display:column property="idUsuario" title="ID" />
<display:column property="nombre" sortable="true"/>
<display:column property="mail" sortable="true"/>

</display:table> 
</div>
<!--- end display tag -->

 
</body>
</html>
 
 
If after the login my action goes to the test.page directly, it works properly 
and the links are changed. 
 
But if after the login I go to a new page with a menu:
 
<%@ page pageEncoding="ISO-8859-1" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
<script language='javascript' src="src/javascript/jquery.js" 
type="text/javascript"></script>
<script src="src/javascript/displayTagAjax.js"></script>
<script src="src/javascript/optiontransferselect.js" type="text/javascript"/>
<s:head theme="ajax"/>
<link rel="stylesheet" media="all" type="text/css" href="src/css/default.css" />
<script src="src/javascript/stuHover.js" type="text/javascript"></script>

</head>

<body> 

<s:div id="divPagina">
<s:url id="buscarUsuario" action='IrBuscarUsuario'/>

<s:div id="divMenu">
<img class="logo" src=".../../src/images/logo.jpg"/>
<br><br>

<ul id="menu">
<li class="sub">Usuarios
<ul>
<li><s:a id="linkBuscarUsuario"
theme="ajax"
href="%{buscarUsuario}"
targets="divContenedor"
showLoadingText="false">Buscar usuario</s:a></li>
</ul>
</li> 
</ul>
</s:div>
<s:div id="divContenedor" theme="ajax">
</s:div>
</s:div>
<script>

</script> 
</body>
</html>
 
And when I go then to the test page (which must be shown in divContenedor), the 
links are not displayed ok and when I click on sorting or pagination, then it 
works but the result is not displayed in the divContenedor. It is opened in a 
new page and my menu is lost!
 
If I check with firebug, all js are loaded (in the menu page and in the test 
page).
 
> To: user@struts.apache.org> From: [EMAIL PROTECTED]> Subject: Re: Sorting 
> with displaytag issue due to theme="ajax"> Date: Tue, 9 Sep 2008 18:08:57 
> -0400> > Francisco Exposito wrote:> > Also I've tried to use displayTagAjax. 
> In order to use it, I define in the main page:> > > > <script 
> src="src/javascript/displayTagAjax.js" type="text/javascript"/>> > <script 
> src="src/javascript/jquery.js" type="text/javascript"/>> > > > But when I 
> reload this page, I receive the error "jQuery is not defined" and the error 
> seems to be in the line of displayTagAjax.js: > > > > jQuery(function($) {> > 
> changeLinks();> > }); > > I assume it was a typo, since in a later email you 
> have the order > corrected. But just in case it's the obvious thing: since > 
> displayTagAjax.js conatains a call to jQuery, the jquery.js script needs > to 
> be loaded first...> > L.> > > 
> ---------------------------------------------------------------------> To 
> unsubscribe, e-mail: [EMAIL PROTECTED]> For additional commands, e-mail: 
> [EMAIL PROTECTED]> 
_________________________________________________________________
¿Sigue el calor? Consulta MSN El tiempo
http://eltiempo.es.msn.com/

Reply via email to