The unique difference I see is that the correct one doesn't use ajax, isn't it?
As I've seen, the javascripts are executed only when the menu page is loaded. When I go to the secondary page, it is not executed. I've created a button adding it a call to the function changeLoads (which is inside the displayTagAjax.js) and when I click on the button, then the references are changed. But it should be executed automatically. > Date: Wed, 10 Sep 2008 03:37:30 -0700 > From: [EMAIL PROTECTED] > Subject: RE: Sorting with displaytag issue due to theme="ajax" > To: user@struts.apache.org > > There are too many differences between your two examples. You should build up > the functionality from one to another until it breaks and start from there. > > One thing I'd comment is that if your divs are just containers then don't use > the <s:div...> tag, as with the ajax theme they're really designed for > something else--just use HTML divs. I'd try that first, then start to isolate > the problem one step at a time. > > Dave > > --- On Wed, 9/10/08, Francisco Exposito wrote: > > 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/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > _________________________________________________________________ Llega la nueva temporada. Consulta las nuevas tendencias en MSN Estilo http://estilo.es.msn.com/moda/