I am using Struts 2.0.11.2
MyAshok wrote:
>
> hi,
>
> Are you using struts 2.1.2 Beta for your project?
> With Regards,
> Ashok
>
>
>
>
> dynamicd wrote:
>>
>> After some long hours I got pagination and export working with ajaxtags
>> and displaytag
>> THis is how you do ajax pagination.
>>
>> AjaxTags 1.3 rc7
>> Struts2.0.12
>> DisplayTag 1.1.1
>>
>>
>> I had to make small change in the ajaxtags.js for it to work
>> Comment out the line that calls the prefunction in the ajaxtags.js
>>
>> /**
>> * Prefunction Invoke Ajax.Update TAG
>> */
>> AjaxJspTag.PreFunctionUpdateInvoke = Class.create();
>> AjaxJspTag.PreFunctionUpdateInvoke.prototype = Object.extend(new
>> AjaxJspTag.Base(), {
>>
>> initialize: function(ajaxupdateData) {
>> /**
>> this.preFunction = ajaxupdateData.preFunction;
>> if (isFunction(this.preFunction))
>> {
>> this.preFunction();
>> }
>> */
>> if (this.cancelExecution) {
>> alert("I am canceling the excution");
>> this.cancelExecution = false;
>> return ;
>> }
>> /**
>> * alert("Here I am in PreFunction Ajaxupdatedata"+ ajaxupdateData.id +
>> " " + ajaxupdateData.href + " " + ajaxupdateData.postFunction + "
>> prefunction" + this.preFunction);
>> */
>>
>> var thisCall = new
>> Ajax.Updater(ajaxupdateData.id,ajaxupdateData.href,{onComplete:
>> ajaxupdateData.postFunction});
>> }
>>
>> });
>>
>>
>> Add this to the head section of the page in this order
>>
>> <script type="text/javascript" src="js/prototype.js"></script>
>> <script type="text/javascript" src="js/scriptaculous.js"></script>
>> <script type="text/javascript" src="js/ajaxtags.js"></script>
>>
>> In the jsp page for me which is seperate from the indexpage
>>
>> <%@ taglib prefix="s" uri="/struts-tags" %>
>> <%@ taglib uri="http://displaytag.sf.net" prefix="display" %>
>> <%@ taglib uri="http://ajaxtags.org/tags/ajax" prefix="ajax" %>
>>
>> <s:div id="userpage">
>>
>> <form id="userform" method="POST">
>>
>> <ajax:displayTag id="userList" ajaxFlag="userList">
>>
>> <display:table name="userList" uid="userlist" class="table"
>> export="true" excludedParams="*" pagesize="15"
>> requestURI="/Dashboard/ViewAllUsers.action">
>> <display:column media="html"> <s:checkbox name="selectedItems"
>> theme="simple" fieldValue="%{#attr.userlist.id}"
>> ></s:checkbox></display:column>
>> <display:column property ="username" title="Username" escapeXml="true"
>> ></display:column>
>> <display:column property ="email" title="Email" escapeXml="true"
>> ></display:column>
>> <display:column property ="domain" title="SMTP Server Address"
>> escapeXml="true" ></display:column>
>> <display:column property ="role" title="Role"
>> escapeXml="true"></display:column>
>> <display:column property ="group.name" title="Group"
>> escapeXml="true"></display:column>
>>
>> </display:table>
>>
>> </ajax:displayTag>
>> </form>
>>
>> <s:url id="deleteuser" value="/Dashboard/deleteUser.action" />
>> <s:a indicator="indicator" href="%{deleteuser}" showLoadingText="false"
>> id="deleteUser" cssClass="anchors" theme="ajax" targets="users"
>> formId="userform">Delete</s:a>
>>
>> </s:div>
>>
>> One thing to note here is that do not use <s:form> use <form> instead.
>> s:form create a Table and when the ajax call happens it will refresh a
>> different div in the table and you will see 2 divs with same data
>>
>> When you look at the page source you will see the links ajaxified as one
>> below
>> a onclick="new AjaxJspTag.PreFunctionUpdateInvoke({id: "userList", href:
>> "/ViewAllUsers.action?d-3610194-p=2&userList=true" }); return false;"
>> href="javascript://nop/">Next
>> Hey Márcio
>> Where you ever successful in getting AjaxTags to work with Dispay Tag and
>> Struts2
>> I am at the same junction as you were. Please let me know.
>> Thanks
>>
>>
>>
>>
>> Márcio Gurgel wrote:
>>>
>>> Hi Randy,
>>>
>>> I also tried to set requestURI.
>>> I'm having lots of problems with components inside tabbedPanels...
>>>
>>> For example:
>>> This example works outside a tabbed panel:
>>>
>>> 2. Attach to "onmouseover", and "onclick" event on Area below and
>>> update
>>> content of Div1, highlight targets with green color
>>> <sx:bind id="ex2" href="%{#urlAbrirDadosGerais}" sources="div2"
>>> targets="div1" events="onmouseover,onclick" highlightColor="green"/>
>>> <div id="div2" style="width: 300px; height: 50px; border: 1px solid
>>> black">
>>> Mouse Over or Click Here!
>>> </div>
>>>
>>> When its inside a div from tabbedpanel just doesn't work.
>>>
>>> Does anyone can help me?
>>>
>>>
>>> 2008/4/15, Randy Burgess <[EMAIL PROTECTED]>:
>>>>
>>>> Well your requestURI is not set so the URL is set to the current JSP
>>>> and
>>>> not
>>>> the action. I have never had any success leaving requestURI blank with
>>>> DisplayTag on S1 or S2. I always set it to the name of an action.
>>>>
>>>> Regards,
>>>> Randy Burgess
>>>> Sr. Web Applications Developer
>>>> Nuvox Communications
>>>>
>>>>
>>>>
>>>> > From: Márcio Gurgel <[EMAIL PROTECTED]>
>>>> > Reply-To: Struts Users Mailing List <[email protected]>
>>>> > Date: Tue, 15 Apr 2008 01:18:34 -0300
>>>> > To: Struts Users Mailing List <[email protected]>
>>>> > Subject: Re: Struts 2 + AjaxTags + DisplayTag
>>>>
>>>> >
>>>> > Matt, tanks for your help. But I need to persist with displayTags /:
>>>> >
>>>> > I guess that there's some kind of validation inside struts 2 that
>>>> doesnt
>>>> > allow the correct work of ajaxtags..
>>>> > Just take a look at my generated url from displaytag pagination.
>>>> >
>>>> > http://localhost:8080/SGVDBA/view/usuario/UsuPesquisaResultados.jsp?
>>>> >
>>>> currentUsu.eMail=¤tUsu.chv=¤tUsu.dtGvr=&struts.enableJSONValidatio
>>>> > n=true
>>>> > &buttonPesquisar=Pesquisar&dojo.currentUsu.dtGvr=&d-49489-p=2
>>>> >
>>>> >
>>>> > Tanks all!
>>>> >
>>>> > 2008/4/14, matt.payne <[EMAIL PROTECTED]>:
>>>> >>
>>>> >>
>>>> >> You could try struts2 + jquery + jgrid
>>>> >> (http://trirand.com/jqgrid/jqgrid.html)
>>>> >> If you need ajax, you need something that returns an json or xml
>>>> response
>>>> >> (insert you velocity, freemarker, json result, jsp result here).
>>>> >>
>>>> >> Matt
>>>> >>
>>>> >>
>>>> >>
>>>> >> Márcio Gurgel wrote:
>>>> >>>
>>>> >>> Hi all!
>>>> >>>
>>>> >>> Since this morning I'm having troubles to configure ajaxTags in my
>>>> >>> project.
>>>> >>> I followed the steps from ajaxTags web site, I also saw the
>>>> ajaxTags
>>>> >> show
>>>> >>> case wich contains a example of display:table.
>>>> >>> But doen't work...
>>>> >>>
>>>> >>> Is there some kind os special configuration for struts 2?
>>>> >>> My displayTable is inside a <sx:tabbedPanel><sx:div>
>>>> >>>
>>>> >>> I also tried to use: useSelectedTabCookie="useSelectedTabCookie" to
>>>> >> select
>>>> >>> the correct tab when my displayTable pagination submits the page.
>>>> >>> In this case, the content of the first tab doesn't appear.
>>>> >>>
>>>> >>> Regards.
>>>> >>>
>>>> >>> Márcio Gurgel
>>>> >>>
>>>> >>>
>>>> >>
>>>> >>
>>>> >> --
>>>> >> View this message in context:
>>>> >>
>>>> http://www.nabble.com/Struts-2-%2B-AjaxTags-%2B-DisplayTag-tp16670438p1668945
>>>> >> 8.html
>>>> >> Sent from the Struts - User mailing list archive at Nabble.com.
>>>> >>
>>>> >>
>>>> >>
>>>> ---------------------------------------------------------------------
>>>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>>>> >>
>>>> >>
>>>>
>>>>
>>>>
>>>>
>>>> This email and any attachments ("Message") may contain legally
>>>> privileged
>>>> and/or confidential information. If you are not the addressee, or if
>>>> this
>>>> Message has been addressed to you in error, you are not authorized to
>>>> read,
>>>> copy, or distribute it, and we ask that you please delete it (including
>>>> all
>>>> copies) and notify the sender by return email. Delivery of this
>>>> Message to
>>>> any person other than the intended recipient(s) shall not be deemed a
>>>> waiver
>>>> of confidentiality and/or a privilege.
>>>>
>>>>
>>>> This email and any attachments ("Message") may contain legally
>>>> privileged
>>>> and/or confidential information. If you are not the addressee, or if
>>>> this
>>>> Message has been addressed to you in error, you are not authorized to
>>>> read,
>>>> copy, or distribute it, and we ask that you please delete it (including
>>>> all
>>>> copies) and notify the sender by return email. Delivery of this
>>>> Message to
>>>> any person other than the intended recipient(s) shall not be deemed a
>>>> waiver
>>>> of confidentiality and/or a privilege.
>>>>
>>>
>>>
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/Struts-2-%2B-AjaxTags-%2B-DisplayTag-tp16670438p19545948.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]