You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Arunkumar Balasubramanian <ar...@hotmail.com> on 2008/06/05 03:41:49 UTC

Display tag and AJAX

 
  Can we update the display:table with an ajax call? Here is what I was expecting to do.
 
 - There are different radio buttons (each will have different status of results) - Depending on the selection, the display:table has to update the rows. - There display:table headers dosen't change and the values inside the display:rable    changes based on the selections.
 
 I was trying to do the following.
 
 - Make an AJAX call when the user clicks on radio buttons, so that only the display:table    gets refreshed and not the entire page. - Based on the selections, the display:table will update the results.
 
 If someone was able to provide the reference for how to perform the above task it would be great.
 
 Thanks in advance.
_________________________________________________________________
It’s easy to add contacts from Facebook and other social sites through Windows Live™ Messenger. Learn how.
https://www.invite2messenger.net/im/?source=TXT_EML_WLH_LearnHow

RE: Display tag and AJAX

Posted by Arunkumar Balasubramanian <ar...@hotmail.com>.
Thanks so much for the valuable information.
 
I will implement ajaz anywere with my project and will get back to you about the results.
 
Once again thanks for the support.
 



> From: lrampersaud@ceis.cujae.edu.cu> To: user@struts.apache.org; lalchandrar@gmail.com> Subject: Re: Display tag and AJAX> Date: Sat, 7 Jun 2008 15:54:50 -0700> > sorry, i forgot to put the funcion. it is ajaxAnywhere.submitAJAX(parameter=value)> > ------------> Carpe diem> > > ----- Original Message ----- > From: "Lalchandra Rampersaud" <lr...@ceis.cujae.edu.cu>> To: "Struts Users Mailing List" <us...@struts.apache.org>> Sent: Saturday, June 07, 2008 3:49 PM> Subject: Re: Display tag and AJAX> > > > hi> > in reality ajaxanywhere does not need additional javascript funcions (by default comes packaged with aa.js). the function that is usually called is which invokes an action. the action is the one which allows the user to select the zone that is to be updated and also sends the data.> > > > attached is an example of an action which uses ajaxanywhere.> > > > > > > > import org.ajaxanywhere.AAUtils;> > > > public ActionForward first(ActionMapping mapping, ActionForm form,> > HttpServletRequest request, HttpServletResponse response)> > { > > if (AAUtils.isAjaxRequest(request)) {> > > > AAUtils.addZonesToRefresh(request, "projectsList");> > > > > > PaginatorHandler paginator = new PaginatorHandler(request, "projWorkerPaginator");> > paginator.GetPage(PaginatorHandler.typeOfPage.first);> > request.setAttribute("tabIndex", 4);> > > > }> > > > String url = "/pagesJSP/companyProjectBoss/Project/registerProjectBody.jsp";> > > > ServletContext sc = (ServletContext) getServlet().getServletContext();> > RequestDispatcher rd = sc.getRequestDispatcher(url);> > rd.forward(request, response);> > > > return null;> > }> > > > > > Saludos> > Lalchandra Rampersaud> > ------------> > Carpe diem> > > > > > ----- Original Message ----- > > From: "Arunkumar Balasubramanian" <ar...@hotmail.com>> > To: "Struts Users Mailing List" <us...@struts.apache.org>> > Sent: Thursday, June 05, 2008 9:52 PM> > Subject: RE: Display tag and AJAX> > > > > > > > Thanks for your reply.> > > > Can you give the reference of javascript functions used for the display:table used with in AjaxAnywhere tag? If you have an working example, it would be great, if you could provide the reference with other classes involved with display:table.> > > >
_________________________________________________________________
Instantly invite friends from Facebook and other social networks to join you on Windows Live™ Messenger.
https://www.invite2messenger.net/im/?source=TXT_EML_WLH_InviteFriends

Re: Display tag and AJAX

Posted by Lalchandra Rampersaud <lr...@ceis.cujae.edu.cu>.
sorry, i forgot to put the funcion.  it is ajaxAnywhere.submitAJAX(parameter=value)

------------
Carpe diem


----- Original Message ----- 
From: "Lalchandra Rampersaud" <lr...@ceis.cujae.edu.cu>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Saturday, June 07, 2008 3:49 PM
Subject: Re: Display tag and AJAX


> hi
> in reality ajaxanywhere does not need additional javascript funcions (by default comes packaged with aa.js).  the function that is usually called is  which invokes an action.  the action is the one which allows the user to select the zone that is to be updated and also sends the data.
> 
> attached is an example of an action which uses ajaxanywhere.
> 
> 
> 
> import org.ajaxanywhere.AAUtils;
> 
> public ActionForward first(ActionMapping mapping, ActionForm form,
>   HttpServletRequest request, HttpServletResponse response)
> {  
>  if (AAUtils.isAjaxRequest(request)) {
> 
>            AAUtils.addZonesToRefresh(request, "projectsList");
>            
>      
>      PaginatorHandler paginator = new PaginatorHandler(request, "projWorkerPaginator");
>      paginator.GetPage(PaginatorHandler.typeOfPage.first);
>      request.setAttribute("tabIndex", 4);
>   
> }
> 
>    String url = "/pagesJSP/companyProjectBoss/Project/registerProjectBody.jsp";
>    
>    ServletContext sc = (ServletContext) getServlet().getServletContext();
>    RequestDispatcher rd = sc.getRequestDispatcher(url);
>    rd.forward(request, response);
> 
>    return null;
> }
> 
> 
> Saludos
> Lalchandra Rampersaud
> ------------
> Carpe diem
> 
> 
> ----- Original Message ----- 
> From: "Arunkumar Balasubramanian" <ar...@hotmail.com>
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Sent: Thursday, June 05, 2008 9:52 PM
> Subject: RE: Display tag and AJAX
> 
> 
> 
> Thanks for your reply.
> 
> Can you give the reference of javascript functions used for the display:table used with in AjaxAnywhere tag? If you have an working example, it would be great, if you could provide the reference with other classes involved with display:table.
> 
>

Re: Display tag and AJAX

Posted by Lalchandra Rampersaud <lr...@ceis.cujae.edu.cu>.
hi
in reality ajaxanywhere does not need additional javascript funcions (by default comes packaged with aa.js).  the function that is usually called is  which invokes an action.  the action is the one which allows the user to select the zone that is to be updated and also sends the data.

attached is an example of an action which uses ajaxanywhere.



import org.ajaxanywhere.AAUtils;

public ActionForward first(ActionMapping mapping, ActionForm form,
   HttpServletRequest request, HttpServletResponse response)
 {  
  if (AAUtils.isAjaxRequest(request)) {

            AAUtils.addZonesToRefresh(request, "projectsList");
            
      
      PaginatorHandler paginator = new PaginatorHandler(request, "projWorkerPaginator");
      paginator.GetPage(PaginatorHandler.typeOfPage.first);
      request.setAttribute("tabIndex", 4);
   
 }

    String url = "/pagesJSP/companyProjectBoss/Project/registerProjectBody.jsp";
    
    ServletContext sc = (ServletContext) getServlet().getServletContext();
    RequestDispatcher rd = sc.getRequestDispatcher(url);
    rd.forward(request, response);

    return null;
 }


Saludos
Lalchandra Rampersaud
------------
Carpe diem


----- Original Message ----- 
From: "Arunkumar Balasubramanian" <ar...@hotmail.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Thursday, June 05, 2008 9:52 PM
Subject: RE: Display tag and AJAX



Thanks for your reply.
 
Can you give the reference of javascript functions used for the display:table used with in AjaxAnywhere tag? If you have an working example, it would be great, if you could provide the reference with other classes involved with display:table.
 
 

RE: Display tag and AJAX

Posted by Arunkumar Balasubramanian <ar...@hotmail.com>.
 
Thanks for your reply.
 
Can you give the reference of javascript functions used for the display:table used with in AjaxAnywhere tag? If you have an working example, it would be great, if you could provide the reference with other classes involved with display:table.
 
 



> From: lrampersaud@ceis.cujae.edu.cu> To: user@struts.apache.org> Subject: Re: Display tag and AJAX> Date: Thu, 5 Jun 2008 19:48:14 -0700> > yes, you can update a display table alone with an ajax call. > > this is one done with ajaxanywhere:> > <aa:zone name="bossTechnicalCompetitions">> <display:table name="workers"> decorator="displaytagClasses.DisplayRadio"> class="displaytag">> > <display:column property="projWorker" title=""> style="width: 10px" />> <display:column property="lastName"> title="Primer Apellido" />> <display:column property="surName"> title="Segundo Apellido" />> <display:column property="workerName"> title="Nombre(s)" />> <display:column property="lester" title="Detalles" />> > <display:footer>> <tr class="row_color">> <td style="width: 10px">> &nbsp;> </td>> <td>> &nbsp;> </td>> <td>> &nbsp;> </td>> <td>> &nbsp;> </td>> <td>> &nbsp;> </td>> </tr>> <tr>> <td colspan="4" class="headerTable" align="center">> > <DIV align="center" />> <c:out> value="${sessionScope.projWorkerPaginator.pageIndexText}" />> </DIV>> </td>> </tr>> </display:footer>> </display:table>> </aa:zone>> > > > Saludos> Lalchandra Rampersaud> ------------> Carpe diem> > > ----- Original Message ----- > From: "Arunkumar Balasubramanian" <ar...@hotmail.com>> To: "Struts Users Mailing List" <us...@struts.apache.org>> Sent: Wednesday, June 04, 2008 6:41 PM> Subject: Display tag and AJAX> > > > Can we update the display:table with an ajax call? Here is what I was expecting to do.> > - There are different radio buttons (each will have different status of results) - Depending on the selection, the display:table has to update the rows. - There display:table headers dosen't change and the values inside the display:rable changes based on the selections.> > I was trying to do the following.> > - Make an AJAX call when the user clicks on radio buttons, so that only the display:table gets refreshed and not the entire page. - Based on the selections, the display:table will update the results.> > If someone was able to provide the reference for how to perform the above task it would be great.> > Thanks in advance.> _________________________________________________________________> It’s easy to add contacts from Facebook and other social sites through Windows Live™ Messenger. Learn how.> https://www.invite2messenger.net/im/?source=TXT_EML_WLH_LearnHow
_________________________________________________________________
Instantly invite friends from Facebook and other social networks to join you on Windows Live™ Messenger.
https://www.invite2messenger.net/im/?source=TXT_EML_WLH_InviteFriends

Re: Display tag and AJAX

Posted by Lalchandra Rampersaud <lr...@ceis.cujae.edu.cu>.
yes, you can update a display table alone with an ajax call. 

this is one done with ajaxanywhere:

<aa:zone name="bossTechnicalCompetitions">
<display:table name="workers"
                   decorator="displaytagClasses.DisplayRadio"
                   class="displaytag">

                   <display:column property="projWorker" title=""
                    style="width: 10px" />
                   <display:column property="lastName"
                    title="Primer Apellido" />
                   <display:column property="surName"
                    title="Segundo Apellido" />
                   <display:column property="workerName"
                    title="Nombre(s)" />
                   <display:column property="lester" title="Detalles" />

                   <display:footer>
                    <tr class="row_color">
                     <td style="width: 10px">
                      &nbsp;
                     </td>
                     <td>
                      &nbsp;
                     </td>
                     <td>
                      &nbsp;
                     </td>
                     <td>
                      &nbsp;
                     </td>
                     <td>
                      &nbsp;
                     </td>
                    </tr>
                    <tr>
                     <td colspan="4" class="headerTable" align="center">

                      <DIV align="center" />
                       <c:out
                        value="${sessionScope.projWorkerPaginator.pageIndexText}" />
                      </DIV>
                     </td>
                    </tr>
                   </display:footer>
                  </display:table>
</aa:zone>



Saludos
Lalchandra Rampersaud
------------
Carpe diem


----- Original Message ----- 
From: "Arunkumar Balasubramanian" <ar...@hotmail.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Wednesday, June 04, 2008 6:41 PM
Subject: Display tag and AJAX



  Can we update the display:table with an ajax call? Here is what I was expecting to do.
 
 - There are different radio buttons (each will have different status of results) - Depending on the selection, the display:table has to update the rows. - There display:table headers dosen't change and the values inside the display:rable    changes based on the selections.
 
 I was trying to do the following.
 
 - Make an AJAX call when the user clicks on radio buttons, so that only the display:table    gets refreshed and not the entire page. - Based on the selections, the display:table will update the results.
 
 If someone was able to provide the reference for how to perform the above task it would be great.
 
 Thanks in advance.
_________________________________________________________________
It’s easy to add contacts from Facebook and other social sites through Windows Live™ Messenger. Learn how.
https://www.invite2messenger.net/im/?source=TXT_EML_WLH_LearnHow

Re: Display tag and AJAX

Posted by Márcio Gurgel <ma...@gmail.com>.
Hi felipe, could you post a example?

2008/6/5 Felipe Lorenz <fe...@gmail.com>:

> Hi.. you can out the display tag inside of a remote div... and, every time
> when you want refresh the DT, just refresh the div....
>
> On Wed, Jun 4, 2008 at 10:41 PM, Arunkumar Balasubramanian <
> arun-82@hotmail.com> wrote:
>
> >
> >  Can we update the display:table with an ajax call? Here is what I was
> > expecting to do.
> >
> >  - There are different radio buttons (each will have different status of
> > results) - Depending on the selection, the display:table has to update
> the
> > rows. - There display:table headers dosen't change and the values inside
> the
> > display:rable    changes based on the selections.
> >
> >  I was trying to do the following.
> >
> >  - Make an AJAX call when the user clicks on radio buttons, so that only
> > the display:table    gets refreshed and not the entire page. - Based on
> the
> > selections, the display:table will update the results.
> >
> >  If someone was able to provide the reference for how to perform the
> above
> > task it would be great.
> >
> >  Thanks in advance.
> > _________________________________________________________________
> > It's easy to add contacts from Facebook and other social sites through
> > Windows Live™ Messenger. Learn how.
> > https://www.invite2messenger.net/im/?source=TXT_EML_WLH_LearnHow
>

Re: Display tag and AJAX

Posted by Felipe Lorenz <fe...@gmail.com>.
Hi.. you can out the display tag inside of a remote div... and, every time
when you want refresh the DT, just refresh the div....

On Wed, Jun 4, 2008 at 10:41 PM, Arunkumar Balasubramanian <
arun-82@hotmail.com> wrote:

>
>  Can we update the display:table with an ajax call? Here is what I was
> expecting to do.
>
>  - There are different radio buttons (each will have different status of
> results) - Depending on the selection, the display:table has to update the
> rows. - There display:table headers dosen't change and the values inside the
> display:rable    changes based on the selections.
>
>  I was trying to do the following.
>
>  - Make an AJAX call when the user clicks on radio buttons, so that only
> the display:table    gets refreshed and not the entire page. - Based on the
> selections, the display:table will update the results.
>
>  If someone was able to provide the reference for how to perform the above
> task it would be great.
>
>  Thanks in advance.
> _________________________________________________________________
> It's easy to add contacts from Facebook and other social sites through
> Windows Live™ Messenger. Learn how.
> https://www.invite2messenger.net/im/?source=TXT_EML_WLH_LearnHow