You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Daniel Castro <df...@gmail.com> on 2006/09/20 20:56:58 UTC

Doubt about implementing Ajax request

Guys, please help me, if possible.

I have a page with a search form, and those form fields are used as
parameteres for a search query (SQL).

There are two content holders, that are div tags with specified ids, to hold
the ajax return of the search and ajax return of the search details.
Those content holders are placed bellow the search form, on the same page.

What is the search result and what is the search detail?
Well, the search result is a 6 columns table sqlmodel component (from
contrib library) where the first column is the pk of the database entry that
is displayed and the last column is a button to invoke the display of the
details.

The search detail is a table that displays less relevant informations about
one row of the search.

so lets suppose that
1 - I have the form page with the submit button
2 - I have a tapestry tabel component that returns the search result

3 - I have a class that returns a string containing the html code of that
detail table associated with a primary key.
4 - I have a button on the result table, for each row, that passes the id of
the row as atttribute or parameter
5 - I have the place holders identified (two div tags)

How shoul I implement the ajax call for the search and the detail? Please,
step by step explanatuion if possble.
My big problem is how to do this call, i tried some approaches to solve
this, but none was sucessful.

Thanks everyone.

-- 
--------
We shall go on to the end.
We shall fight in France
We shall fightover the seas and oceans.
We shall fight with growing confidence and growing strength in the air.
We shall defend our island whatever the cost may be
We shall fight on beaches, we shall fight on the landing grounds,
We shall fight in the fields and in the streets,
We shall fight on the hills.
We shall never surrender.
Winston Churchill

Re: Doubt about implementing Ajax request

Posted by Daniel Castro <df...@gmail.com>.
I solved the problem.

now instead of having two components that intereact each other, I have a
single component.  Muche easier :D Thanks everyone for the help.

--------
We shall go on to the end.
We shall fight in France
We shall fightover the seas and oceans.
We shall fight with growing confidence and growing strength in the air.
We shall defend our island whatever the cost may be
We shall fight on beaches, we shall fight on the landing grounds,
We shall fight in the fields and in the streets,
We shall fight on the hills.
We shall never surrender.
Winston Churchill

Re: Doubt about implementing Ajax request

Posted by Jesse Kuhnert <jk...@gmail.com>.
Hmmm...It sounds like you have a lot going on here. The example given is
hard to follow for me but I can give you some hints?

When you specify updateComponents="" or call
ResponseBuilder.updateComponent(String
id) what will happen is that your components
IComponent.renderComponent(IMarkupWriter
writer, IRequestCycle cycle) method will be called. ..Whatever content you
write to that writer ~will~ be sent back out to the response.

Perhaps you should start with something simpler to find the source of your
problem? Ie just have a page with a DirectLink that updates a normal Table
and see if you can get that to work...When you get past that you can slowly
start to incorporate what you did there into your custom component to find
the source of the problem.

On 9/24/06, Daniel Castro <df...@gmail.com> wrote:
>
> I am still working with my Ajax issues, and made some progress.
> I am using the upateComponents attribute, but nothing happens.
>
> Well, let me explain how is organized the page that uses ajax.
>
> I have a page with a form to search and a submit button.  When I submit
> the
> search a resultgrid is displayed.  This resultGrid is a component that
> extends from BaseComponent ad has a DirectLink to show the details.  This
> DirectLink is shown below.
>
> <a jwcid="@DirectLink" parameters="ognl:elemento.produto.catalogo"
> listener="listener:doSomething" async="ognl:true"
> updateComponents="ognl:{'detalhe'}">
>
>     public void doSomething(String id){
>         CmdSelectProdutoDetalhe cmd = new CmdSelectProdutoDetalhe(id);
>         detalhe = cmd.executar();
>         System.out.println(detalhe.getDimensoes().toString());
>         System.out.println(detalhe.getPreco().toString());
>         DetalheGrid detalhegrid =
> (DetalheGrid)this.getPage().getComponent("detalhe");
>         detalhegrid.setElemento(detalhe);
>     }
>
> My page has a component called 'detalhe'
>
> <table jwcid="detalhe" cssClass="resultadoBuscaDetalhe"
> componentId="detalhe">
>
> But everytime I click on the direct link i receive a message 'WARNING:
> 20:32:19: No ajax-response elements recieved.'
>
> How to use an ajax request from a page component to update another page
> component?
> - Page P has the components A and B
> - A displays a link and when I click on that link I execute doSomething
> method and populate B and display it.
>
> How to do it?
>
>
>
> On 9/21/06, Jesse Kuhnert <jk...@gmail.com> wrote:
> >
> > Look for the parameters "updateComponents/async" in most of the
> > Submit/Link
> > / Form type components in the 4.1 documentation.
> >
> > On 9/21/06, Daniel Castro <df...@gmail.com> wrote:
> > >
> > > Anyone?
> > >
> > > I am using Ajax 4.1.  Need to do an ajax request to a class method so
> > this
> > > method will do a search on database and return the result to the
> > > page.  How
> > > to do it?
> > >
> > > On 9/21/06, Daniel Castro <df...@gmail.com> wrote:
> > > >
> > > > The problem is that the documentation was not clear, for me, and I
> > dont
> > > > know what Tapestry API to use to make an Ajax call...to invoke a
> > method
> > > of a
> > > > class of mine and receive the response. and also how to make the
> > binding
> > > > between my button and the class method to call
> > > >
> > > >
> > > > On 9/21/06, Jesse Kuhnert <jk...@gmail.com> wrote:
> > > > >
> > > > > Yes it does. Your post looked complicated enough that I figured
> you
> > > > > already
> > > > > knew that and ran into other issues....It's fairly trivial to do
> > what
> > > > > you
> > > > > want with all of the built in components if you read the
> > documentation
> > > > > provided for them.
> > > > >
> > > > > Just don't go trying to modify a table. No matter how great our
> ajax
> > > > > stuff
> > > > > is it can't make IE not suck. (though the new FilteringTable will
> > help
> > > > > when
> > > > > it lands soon)
> > > > >
> > > > > On 9/21/06, Daniel Castro < dfcastro@gmail.com> wrote:
> > > > > >
> > > > > > Thanks :) I will look :)
> > > > > > But I thought tapestry 4.1 would have some features for ajax
> > submit
> > > > > > already
> > > > > > implemented.
> > > > > >
> > > > > > On 9/20/06, Karthik N <ka...@gmail.com> wrote:
> > > > > > >
> > > > > > > you should look at the excellent Tacos framework to help you
> on
> > > > > this.
> > > > > > It
> > > > > > > makes Ajax with Tapestry a breeze, thanks to some great work
> > done.
> > > > > > >
> > > > > > > http://tacos.sourceforge.net/
> > > > > > >
> > > > > > > in addition, if need be, you can look at Dojo and DWR to help
> > you
> > > > > with
> > > > > > > Ajax.
> > > > > > >
> > > > > > > On 9/21/06, Daniel Castro <df...@gmail.com> wrote:
> > > > > > > >
> > > > > > > > Guys, please help me, if possible.
> > > > > > > >
> > > > > > > > I have a page with a search form, and those form fields are
> > used
> > > > > as
> > > > > > > > parameteres for a search query (SQL).
> > > > > > > >
> > > > > > > > There are two content holders, that are div tags with
> > specified
> > > > > ids,
> > > > > > to
> > > > > > > > hold
> > > > > > > > the ajax return of the search and ajax return of the search
> > > > > details.
> > > > > > > > Those content holders are placed bellow the search form, on
> > the
> > > > > same
> > > > > > > page.
> > > > > > > >
> > > > > > > > What is the search result and what is the search detail?
> > > > > > > > Well, the search result is a 6 columns table sqlmodel
> > component
> > > > > (from
> > > > > > > > contrib library) where the first column is the pk of the
> > > database
> > > > > > entry
> > > > > > > > that
> > > > > > > > is displayed and the last column is a button to invoke the
> > > display
> > > > > of
> > > > > > > the
> > > > > > > > details.
> > > > > > > >
> > > > > > > > The search detail is a table that displays less relevant
> > > > > informations
> > > > > > > > about
> > > > > > > > one row of the search.
> > > > > > > >
> > > > > > > > so lets suppose that
> > > > > > > > 1 - I have the form page with the submit button
> > > > > > > > 2 - I have a tapestry tabel component that returns the
> search
> > > > > result
> > > > > > > >
> > > > > > > > 3 - I have a class that returns a string containing the html
> > > code
> > > > > of
> > > > > > > that
> > > > > > > > detail table associated with a primary key.
> > > > > > > > 4 - I have a button on the result table, for each row, that
> > > passes
> > > > > the
> > > > > > > id
> > > > > > > > of
> > > > > > > > the row as atttribute or parameter
> > > > > > > > 5 - I have the place holders identified (two div tags)
> > > > > > > >
> > > > > > > > How shoul I implement the ajax call for the search and the
> > > detail?
> > > > >
> > > > > > > Please,
> > > > > > > > step by step explanatuion if possble.
> > > > > > > > My big problem is how to do this call, i tried some
> approaches
> > > to
> > > > > > solve
> > > > > > > > this, but none was sucessful.
> > > > > > > >
> > > > > > > > Thanks everyone.
> > > > > > > >
> > > > > > > > --
> > > > > > > > --------
> > > > > > > > We shall go on to the end.
> > > > > > > > We shall fight in France
> > > > > > > > We shall fightover the seas and oceans.
> > > > > > > > We shall fight with growing confidence and growing strength
> in
> > > the
> > > > > > air.
> > > > > > > > We shall defend our island whatever the cost may be
> > > > > > > > We shall fight on beaches, we shall fight on the landing
> > > grounds,
> > > > > > > > We shall fight in the fields and in the streets,
> > > > > > > > We shall fight on the hills.
> > > > > > > > We shall never surrender.
> > > > > > > > Winston Churchill
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Thanks, Karthik
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > --------
> > > > > > We shall go on to the end.
> > > > > > We shall fight in France
> > > > > > We shall fightover the seas and oceans.
> > > > > > We shall fight with growing confidence and growing strength in
> the
> > > > > air.
> > > > > > We shall defend our island whatever the cost may be
> > > > > > We shall fight on beaches, we shall fight on the landing
> grounds,
> > > > > > We shall fight in the fields and in the streets,
> > > > > > We shall fight on the hills.
> > > > > > We shall never surrender.
> > > > > > Winston Churchill
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Jesse Kuhnert
> > > > > Tapestry/Dojo/(and a dash of TestNG), team member/developer
> > > > >
> > > > > Open source based consulting work centered around
> > > > > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > --------
> > > > We shall go on to the end.
> > > > We shall fight in France
> > > > We shall fightover the seas and oceans.
> > > > We shall fight with growing confidence and growing strength in the
> > air.
> > > > We shall defend our island whatever the cost may be
> > > > We shall fight on beaches, we shall fight on the landing grounds,
> > > > We shall fight in the fields and in the streets,
> > > > We shall fight on the hills.
> > > > We shall never surrender.
> > > > Winston Churchill
> > > >
> > >
> > >
> > >
> > > --
> > > --------
> > > We shall go on to the end.
> > > We shall fight in France
> > > We shall fightover the seas and oceans.
> > > We shall fight with growing confidence and growing strength in the
> air.
> > > We shall defend our island whatever the cost may be
> > > We shall fight on beaches, we shall fight on the landing grounds,
> > > We shall fight in the fields and in the streets,
> > > We shall fight on the hills.
> > > We shall never surrender.
> > > Winston Churchill
> > >
> > >
> >
> >
> > --
> > Jesse Kuhnert
> > Tapestry/Dojo/(and a dash of TestNG), team member/developer
> >
> > Open source based consulting work centered around
> > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
> >
> >
>
>
> --
> --------
> We shall go on to the end.
> We shall fight in France
> We shall fightover the seas and oceans.
> We shall fight with growing confidence and growing strength in the air.
> We shall defend our island whatever the cost may be
> We shall fight on beaches, we shall fight on the landing grounds,
> We shall fight in the fields and in the streets,
> We shall fight on the hills.
> We shall never surrender.
> Winston Churchill
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

Re: Doubt about implementing Ajax request

Posted by Daniel Castro <df...@gmail.com>.
I am still working with my Ajax issues, and made some progress.
I am using the upateComponents attribute, but nothing happens.

Well, let me explain how is organized the page that uses ajax.

I have a page with a form to search and a submit button.  When I submit the
search a resultgrid is displayed.  This resultGrid is a component that
extends from BaseComponent ad has a DirectLink to show the details.  This
DirectLink is shown below.

<a jwcid="@DirectLink" parameters="ognl:elemento.produto.catalogo"
listener="listener:doSomething" async="ognl:true"
updateComponents="ognl:{'detalhe'}">

    public void doSomething(String id){
        CmdSelectProdutoDetalhe cmd = new CmdSelectProdutoDetalhe(id);
        detalhe = cmd.executar();
        System.out.println(detalhe.getDimensoes().toString());
        System.out.println(detalhe.getPreco().toString());
        DetalheGrid detalhegrid =
(DetalheGrid)this.getPage().getComponent("detalhe");
        detalhegrid.setElemento(detalhe);
    }

My page has a component called 'detalhe'

<table jwcid="detalhe" cssClass="resultadoBuscaDetalhe"
componentId="detalhe">

But everytime I click on the direct link i receive a message 'WARNING:
20:32:19: No ajax-response elements recieved.'

How to use an ajax request from a page component to update another page
component?
- Page P has the components A and B
- A displays a link and when I click on that link I execute doSomething
method and populate B and display it.

How to do it?



On 9/21/06, Jesse Kuhnert <jk...@gmail.com> wrote:
>
> Look for the parameters "updateComponents/async" in most of the
> Submit/Link
> / Form type components in the 4.1 documentation.
>
> On 9/21/06, Daniel Castro <df...@gmail.com> wrote:
> >
> > Anyone?
> >
> > I am using Ajax 4.1.  Need to do an ajax request to a class method so
> this
> > method will do a search on database and return the result to the
> > page.  How
> > to do it?
> >
> > On 9/21/06, Daniel Castro <df...@gmail.com> wrote:
> > >
> > > The problem is that the documentation was not clear, for me, and I
> dont
> > > know what Tapestry API to use to make an Ajax call...to invoke a
> method
> > of a
> > > class of mine and receive the response. and also how to make the
> binding
> > > between my button and the class method to call
> > >
> > >
> > > On 9/21/06, Jesse Kuhnert <jk...@gmail.com> wrote:
> > > >
> > > > Yes it does. Your post looked complicated enough that I figured you
> > > > already
> > > > knew that and ran into other issues....It's fairly trivial to do
> what
> > > > you
> > > > want with all of the built in components if you read the
> documentation
> > > > provided for them.
> > > >
> > > > Just don't go trying to modify a table. No matter how great our ajax
> > > > stuff
> > > > is it can't make IE not suck. (though the new FilteringTable will
> help
> > > > when
> > > > it lands soon)
> > > >
> > > > On 9/21/06, Daniel Castro < dfcastro@gmail.com> wrote:
> > > > >
> > > > > Thanks :) I will look :)
> > > > > But I thought tapestry 4.1 would have some features for ajax
> submit
> > > > > already
> > > > > implemented.
> > > > >
> > > > > On 9/20/06, Karthik N <ka...@gmail.com> wrote:
> > > > > >
> > > > > > you should look at the excellent Tacos framework to help you on
> > > > this.
> > > > > It
> > > > > > makes Ajax with Tapestry a breeze, thanks to some great work
> done.
> > > > > >
> > > > > > http://tacos.sourceforge.net/
> > > > > >
> > > > > > in addition, if need be, you can look at Dojo and DWR to help
> you
> > > > with
> > > > > > Ajax.
> > > > > >
> > > > > > On 9/21/06, Daniel Castro <df...@gmail.com> wrote:
> > > > > > >
> > > > > > > Guys, please help me, if possible.
> > > > > > >
> > > > > > > I have a page with a search form, and those form fields are
> used
> > > > as
> > > > > > > parameteres for a search query (SQL).
> > > > > > >
> > > > > > > There are two content holders, that are div tags with
> specified
> > > > ids,
> > > > > to
> > > > > > > hold
> > > > > > > the ajax return of the search and ajax return of the search
> > > > details.
> > > > > > > Those content holders are placed bellow the search form, on
> the
> > > > same
> > > > > > page.
> > > > > > >
> > > > > > > What is the search result and what is the search detail?
> > > > > > > Well, the search result is a 6 columns table sqlmodel
> component
> > > > (from
> > > > > > > contrib library) where the first column is the pk of the
> > database
> > > > > entry
> > > > > > > that
> > > > > > > is displayed and the last column is a button to invoke the
> > display
> > > > of
> > > > > > the
> > > > > > > details.
> > > > > > >
> > > > > > > The search detail is a table that displays less relevant
> > > > informations
> > > > > > > about
> > > > > > > one row of the search.
> > > > > > >
> > > > > > > so lets suppose that
> > > > > > > 1 - I have the form page with the submit button
> > > > > > > 2 - I have a tapestry tabel component that returns the search
> > > > result
> > > > > > >
> > > > > > > 3 - I have a class that returns a string containing the html
> > code
> > > > of
> > > > > > that
> > > > > > > detail table associated with a primary key.
> > > > > > > 4 - I have a button on the result table, for each row, that
> > passes
> > > > the
> > > > > > id
> > > > > > > of
> > > > > > > the row as atttribute or parameter
> > > > > > > 5 - I have the place holders identified (two div tags)
> > > > > > >
> > > > > > > How shoul I implement the ajax call for the search and the
> > detail?
> > > >
> > > > > > Please,
> > > > > > > step by step explanatuion if possble.
> > > > > > > My big problem is how to do this call, i tried some approaches
> > to
> > > > > solve
> > > > > > > this, but none was sucessful.
> > > > > > >
> > > > > > > Thanks everyone.
> > > > > > >
> > > > > > > --
> > > > > > > --------
> > > > > > > We shall go on to the end.
> > > > > > > We shall fight in France
> > > > > > > We shall fightover the seas and oceans.
> > > > > > > We shall fight with growing confidence and growing strength in
> > the
> > > > > air.
> > > > > > > We shall defend our island whatever the cost may be
> > > > > > > We shall fight on beaches, we shall fight on the landing
> > grounds,
> > > > > > > We shall fight in the fields and in the streets,
> > > > > > > We shall fight on the hills.
> > > > > > > We shall never surrender.
> > > > > > > Winston Churchill
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Thanks, Karthik
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > --------
> > > > > We shall go on to the end.
> > > > > We shall fight in France
> > > > > We shall fightover the seas and oceans.
> > > > > We shall fight with growing confidence and growing strength in the
> > > > air.
> > > > > We shall defend our island whatever the cost may be
> > > > > We shall fight on beaches, we shall fight on the landing grounds,
> > > > > We shall fight in the fields and in the streets,
> > > > > We shall fight on the hills.
> > > > > We shall never surrender.
> > > > > Winston Churchill
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Jesse Kuhnert
> > > > Tapestry/Dojo/(and a dash of TestNG), team member/developer
> > > >
> > > > Open source based consulting work centered around
> > > > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
> > > >
> > > >
> > >
> > >
> > > --
> > > --------
> > > We shall go on to the end.
> > > We shall fight in France
> > > We shall fightover the seas and oceans.
> > > We shall fight with growing confidence and growing strength in the
> air.
> > > We shall defend our island whatever the cost may be
> > > We shall fight on beaches, we shall fight on the landing grounds,
> > > We shall fight in the fields and in the streets,
> > > We shall fight on the hills.
> > > We shall never surrender.
> > > Winston Churchill
> > >
> >
> >
> >
> > --
> > --------
> > We shall go on to the end.
> > We shall fight in France
> > We shall fightover the seas and oceans.
> > We shall fight with growing confidence and growing strength in the air.
> > We shall defend our island whatever the cost may be
> > We shall fight on beaches, we shall fight on the landing grounds,
> > We shall fight in the fields and in the streets,
> > We shall fight on the hills.
> > We shall never surrender.
> > Winston Churchill
> >
> >
>
>
> --
> Jesse Kuhnert
> Tapestry/Dojo/(and a dash of TestNG), team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
>
>


-- 
--------
We shall go on to the end.
We shall fight in France
We shall fightover the seas and oceans.
We shall fight with growing confidence and growing strength in the air.
We shall defend our island whatever the cost may be
We shall fight on beaches, we shall fight on the landing grounds,
We shall fight in the fields and in the streets,
We shall fight on the hills.
We shall never surrender.
Winston Churchill

Re: Doubt about implementing Ajax request

Posted by Jesse Kuhnert <jk...@gmail.com>.
Look for the parameters "updateComponents/async" in most of the Submit/Link
/ Form type components in the 4.1 documentation.

On 9/21/06, Daniel Castro <df...@gmail.com> wrote:
>
> Anyone?
>
> I am using Ajax 4.1.  Need to do an ajax request to a class method so this
> method will do a search on database and return the result to the
> page.  How
> to do it?
>
> On 9/21/06, Daniel Castro <df...@gmail.com> wrote:
> >
> > The problem is that the documentation was not clear, for me, and I dont
> > know what Tapestry API to use to make an Ajax call...to invoke a method
> of a
> > class of mine and receive the response. and also how to make the binding
> > between my button and the class method to call
> >
> >
> > On 9/21/06, Jesse Kuhnert <jk...@gmail.com> wrote:
> > >
> > > Yes it does. Your post looked complicated enough that I figured you
> > > already
> > > knew that and ran into other issues....It's fairly trivial to do what
> > > you
> > > want with all of the built in components if you read the documentation
> > > provided for them.
> > >
> > > Just don't go trying to modify a table. No matter how great our ajax
> > > stuff
> > > is it can't make IE not suck. (though the new FilteringTable will help
> > > when
> > > it lands soon)
> > >
> > > On 9/21/06, Daniel Castro < dfcastro@gmail.com> wrote:
> > > >
> > > > Thanks :) I will look :)
> > > > But I thought tapestry 4.1 would have some features for ajax submit
> > > > already
> > > > implemented.
> > > >
> > > > On 9/20/06, Karthik N <ka...@gmail.com> wrote:
> > > > >
> > > > > you should look at the excellent Tacos framework to help you on
> > > this.
> > > > It
> > > > > makes Ajax with Tapestry a breeze, thanks to some great work done.
> > > > >
> > > > > http://tacos.sourceforge.net/
> > > > >
> > > > > in addition, if need be, you can look at Dojo and DWR to help you
> > > with
> > > > > Ajax.
> > > > >
> > > > > On 9/21/06, Daniel Castro <df...@gmail.com> wrote:
> > > > > >
> > > > > > Guys, please help me, if possible.
> > > > > >
> > > > > > I have a page with a search form, and those form fields are used
> > > as
> > > > > > parameteres for a search query (SQL).
> > > > > >
> > > > > > There are two content holders, that are div tags with specified
> > > ids,
> > > > to
> > > > > > hold
> > > > > > the ajax return of the search and ajax return of the search
> > > details.
> > > > > > Those content holders are placed bellow the search form, on the
> > > same
> > > > > page.
> > > > > >
> > > > > > What is the search result and what is the search detail?
> > > > > > Well, the search result is a 6 columns table sqlmodel component
> > > (from
> > > > > > contrib library) where the first column is the pk of the
> database
> > > > entry
> > > > > > that
> > > > > > is displayed and the last column is a button to invoke the
> display
> > > of
> > > > > the
> > > > > > details.
> > > > > >
> > > > > > The search detail is a table that displays less relevant
> > > informations
> > > > > > about
> > > > > > one row of the search.
> > > > > >
> > > > > > so lets suppose that
> > > > > > 1 - I have the form page with the submit button
> > > > > > 2 - I have a tapestry tabel component that returns the search
> > > result
> > > > > >
> > > > > > 3 - I have a class that returns a string containing the html
> code
> > > of
> > > > > that
> > > > > > detail table associated with a primary key.
> > > > > > 4 - I have a button on the result table, for each row, that
> passes
> > > the
> > > > > id
> > > > > > of
> > > > > > the row as atttribute or parameter
> > > > > > 5 - I have the place holders identified (two div tags)
> > > > > >
> > > > > > How shoul I implement the ajax call for the search and the
> detail?
> > >
> > > > > Please,
> > > > > > step by step explanatuion if possble.
> > > > > > My big problem is how to do this call, i tried some approaches
> to
> > > > solve
> > > > > > this, but none was sucessful.
> > > > > >
> > > > > > Thanks everyone.
> > > > > >
> > > > > > --
> > > > > > --------
> > > > > > We shall go on to the end.
> > > > > > We shall fight in France
> > > > > > We shall fightover the seas and oceans.
> > > > > > We shall fight with growing confidence and growing strength in
> the
> > > > air.
> > > > > > We shall defend our island whatever the cost may be
> > > > > > We shall fight on beaches, we shall fight on the landing
> grounds,
> > > > > > We shall fight in the fields and in the streets,
> > > > > > We shall fight on the hills.
> > > > > > We shall never surrender.
> > > > > > Winston Churchill
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Thanks, Karthik
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > --------
> > > > We shall go on to the end.
> > > > We shall fight in France
> > > > We shall fightover the seas and oceans.
> > > > We shall fight with growing confidence and growing strength in the
> > > air.
> > > > We shall defend our island whatever the cost may be
> > > > We shall fight on beaches, we shall fight on the landing grounds,
> > > > We shall fight in the fields and in the streets,
> > > > We shall fight on the hills.
> > > > We shall never surrender.
> > > > Winston Churchill
> > > >
> > > >
> > >
> > >
> > > --
> > > Jesse Kuhnert
> > > Tapestry/Dojo/(and a dash of TestNG), team member/developer
> > >
> > > Open source based consulting work centered around
> > > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
> > >
> > >
> >
> >
> > --
> > --------
> > We shall go on to the end.
> > We shall fight in France
> > We shall fightover the seas and oceans.
> > We shall fight with growing confidence and growing strength in the air.
> > We shall defend our island whatever the cost may be
> > We shall fight on beaches, we shall fight on the landing grounds,
> > We shall fight in the fields and in the streets,
> > We shall fight on the hills.
> > We shall never surrender.
> > Winston Churchill
> >
>
>
>
> --
> --------
> We shall go on to the end.
> We shall fight in France
> We shall fightover the seas and oceans.
> We shall fight with growing confidence and growing strength in the air.
> We shall defend our island whatever the cost may be
> We shall fight on beaches, we shall fight on the landing grounds,
> We shall fight in the fields and in the streets,
> We shall fight on the hills.
> We shall never surrender.
> Winston Churchill
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

Re: Doubt about implementing Ajax request

Posted by Daniel Castro <df...@gmail.com>.
Anyone?

I am using Ajax 4.1.  Need to do an ajax request to a class method so this
method will do a search on database and return the result to the page.  How
to do it?

On 9/21/06, Daniel Castro <df...@gmail.com> wrote:
>
> The problem is that the documentation was not clear, for me, and I dont
> know what Tapestry API to use to make an Ajax call...to invoke a method of a
> class of mine and receive the response. and also how to make the binding
> between my button and the class method to call
>
>
> On 9/21/06, Jesse Kuhnert <jk...@gmail.com> wrote:
> >
> > Yes it does. Your post looked complicated enough that I figured you
> > already
> > knew that and ran into other issues....It's fairly trivial to do what
> > you
> > want with all of the built in components if you read the documentation
> > provided for them.
> >
> > Just don't go trying to modify a table. No matter how great our ajax
> > stuff
> > is it can't make IE not suck. (though the new FilteringTable will help
> > when
> > it lands soon)
> >
> > On 9/21/06, Daniel Castro < dfcastro@gmail.com> wrote:
> > >
> > > Thanks :) I will look :)
> > > But I thought tapestry 4.1 would have some features for ajax submit
> > > already
> > > implemented.
> > >
> > > On 9/20/06, Karthik N <ka...@gmail.com> wrote:
> > > >
> > > > you should look at the excellent Tacos framework to help you on
> > this.
> > > It
> > > > makes Ajax with Tapestry a breeze, thanks to some great work done.
> > > >
> > > > http://tacos.sourceforge.net/
> > > >
> > > > in addition, if need be, you can look at Dojo and DWR to help you
> > with
> > > > Ajax.
> > > >
> > > > On 9/21/06, Daniel Castro <df...@gmail.com> wrote:
> > > > >
> > > > > Guys, please help me, if possible.
> > > > >
> > > > > I have a page with a search form, and those form fields are used
> > as
> > > > > parameteres for a search query (SQL).
> > > > >
> > > > > There are two content holders, that are div tags with specified
> > ids,
> > > to
> > > > > hold
> > > > > the ajax return of the search and ajax return of the search
> > details.
> > > > > Those content holders are placed bellow the search form, on the
> > same
> > > > page.
> > > > >
> > > > > What is the search result and what is the search detail?
> > > > > Well, the search result is a 6 columns table sqlmodel component
> > (from
> > > > > contrib library) where the first column is the pk of the database
> > > entry
> > > > > that
> > > > > is displayed and the last column is a button to invoke the display
> > of
> > > > the
> > > > > details.
> > > > >
> > > > > The search detail is a table that displays less relevant
> > informations
> > > > > about
> > > > > one row of the search.
> > > > >
> > > > > so lets suppose that
> > > > > 1 - I have the form page with the submit button
> > > > > 2 - I have a tapestry tabel component that returns the search
> > result
> > > > >
> > > > > 3 - I have a class that returns a string containing the html code
> > of
> > > > that
> > > > > detail table associated with a primary key.
> > > > > 4 - I have a button on the result table, for each row, that passes
> > the
> > > > id
> > > > > of
> > > > > the row as atttribute or parameter
> > > > > 5 - I have the place holders identified (two div tags)
> > > > >
> > > > > How shoul I implement the ajax call for the search and the detail?
> >
> > > > Please,
> > > > > step by step explanatuion if possble.
> > > > > My big problem is how to do this call, i tried some approaches to
> > > solve
> > > > > this, but none was sucessful.
> > > > >
> > > > > Thanks everyone.
> > > > >
> > > > > --
> > > > > --------
> > > > > We shall go on to the end.
> > > > > We shall fight in France
> > > > > We shall fightover the seas and oceans.
> > > > > We shall fight with growing confidence and growing strength in the
> > > air.
> > > > > We shall defend our island whatever the cost may be
> > > > > We shall fight on beaches, we shall fight on the landing grounds,
> > > > > We shall fight in the fields and in the streets,
> > > > > We shall fight on the hills.
> > > > > We shall never surrender.
> > > > > Winston Churchill
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Thanks, Karthik
> > > >
> > > >
> > >
> > >
> > > --
> > > --------
> > > We shall go on to the end.
> > > We shall fight in France
> > > We shall fightover the seas and oceans.
> > > We shall fight with growing confidence and growing strength in the
> > air.
> > > We shall defend our island whatever the cost may be
> > > We shall fight on beaches, we shall fight on the landing grounds,
> > > We shall fight in the fields and in the streets,
> > > We shall fight on the hills.
> > > We shall never surrender.
> > > Winston Churchill
> > >
> > >
> >
> >
> > --
> > Jesse Kuhnert
> > Tapestry/Dojo/(and a dash of TestNG), team member/developer
> >
> > Open source based consulting work centered around
> > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
> >
> >
>
>
> --
> --------
> We shall go on to the end.
> We shall fight in France
> We shall fightover the seas and oceans.
> We shall fight with growing confidence and growing strength in the air.
> We shall defend our island whatever the cost may be
> We shall fight on beaches, we shall fight on the landing grounds,
> We shall fight in the fields and in the streets,
> We shall fight on the hills.
> We shall never surrender.
> Winston Churchill
>



-- 
--------
We shall go on to the end.
We shall fight in France
We shall fightover the seas and oceans.
We shall fight with growing confidence and growing strength in the air.
We shall defend our island whatever the cost may be
We shall fight on beaches, we shall fight on the landing grounds,
We shall fight in the fields and in the streets,
We shall fight on the hills.
We shall never surrender.
Winston Churchill

Re: Doubt about implementing Ajax request

Posted by Daniel Castro <df...@gmail.com>.
The problem is that the documentation was not clear, for me, and I dont know
what Tapestry API to use to make an Ajax call...to invoke a method of a
class of mine and receive the response. and also how to make the binding
between my button and the class method to call


On 9/21/06, Jesse Kuhnert <jk...@gmail.com> wrote:
>
> Yes it does. Your post looked complicated enough that I figured you
> already
> knew that and ran into other issues....It's fairly trivial to do what you
> want with all of the built in components if you read the documentation
> provided for them.
>
> Just don't go trying to modify a table. No matter how great our ajax stuff
> is it can't make IE not suck. (though the new FilteringTable will help
> when
> it lands soon)
>
> On 9/21/06, Daniel Castro <df...@gmail.com> wrote:
> >
> > Thanks :) I will look :)
> > But I thought tapestry 4.1 would have some features for ajax submit
> > already
> > implemented.
> >
> > On 9/20/06, Karthik N <ka...@gmail.com> wrote:
> > >
> > > you should look at the excellent Tacos framework to help you on this.
> > It
> > > makes Ajax with Tapestry a breeze, thanks to some great work done.
> > >
> > > http://tacos.sourceforge.net/
> > >
> > > in addition, if need be, you can look at Dojo and DWR to help you with
> > > Ajax.
> > >
> > > On 9/21/06, Daniel Castro <df...@gmail.com> wrote:
> > > >
> > > > Guys, please help me, if possible.
> > > >
> > > > I have a page with a search form, and those form fields are used as
> > > > parameteres for a search query (SQL).
> > > >
> > > > There are two content holders, that are div tags with specified ids,
> > to
> > > > hold
> > > > the ajax return of the search and ajax return of the search details.
> > > > Those content holders are placed bellow the search form, on the same
> > > page.
> > > >
> > > > What is the search result and what is the search detail?
> > > > Well, the search result is a 6 columns table sqlmodel component
> (from
> > > > contrib library) where the first column is the pk of the database
> > entry
> > > > that
> > > > is displayed and the last column is a button to invoke the display
> of
> > > the
> > > > details.
> > > >
> > > > The search detail is a table that displays less relevant
> informations
> > > > about
> > > > one row of the search.
> > > >
> > > > so lets suppose that
> > > > 1 - I have the form page with the submit button
> > > > 2 - I have a tapestry tabel component that returns the search result
> > > >
> > > > 3 - I have a class that returns a string containing the html code of
> > > that
> > > > detail table associated with a primary key.
> > > > 4 - I have a button on the result table, for each row, that passes
> the
> > > id
> > > > of
> > > > the row as atttribute or parameter
> > > > 5 - I have the place holders identified (two div tags)
> > > >
> > > > How shoul I implement the ajax call for the search and the detail?
> > > Please,
> > > > step by step explanatuion if possble.
> > > > My big problem is how to do this call, i tried some approaches to
> > solve
> > > > this, but none was sucessful.
> > > >
> > > > Thanks everyone.
> > > >
> > > > --
> > > > --------
> > > > We shall go on to the end.
> > > > We shall fight in France
> > > > We shall fightover the seas and oceans.
> > > > We shall fight with growing confidence and growing strength in the
> > air.
> > > > We shall defend our island whatever the cost may be
> > > > We shall fight on beaches, we shall fight on the landing grounds,
> > > > We shall fight in the fields and in the streets,
> > > > We shall fight on the hills.
> > > > We shall never surrender.
> > > > Winston Churchill
> > > >
> > > >
> > >
> > >
> > > --
> > > Thanks, Karthik
> > >
> > >
> >
> >
> > --
> > --------
> > We shall go on to the end.
> > We shall fight in France
> > We shall fightover the seas and oceans.
> > We shall fight with growing confidence and growing strength in the air.
> > We shall defend our island whatever the cost may be
> > We shall fight on beaches, we shall fight on the landing grounds,
> > We shall fight in the fields and in the streets,
> > We shall fight on the hills.
> > We shall never surrender.
> > Winston Churchill
> >
> >
>
>
> --
> Jesse Kuhnert
> Tapestry/Dojo/(and a dash of TestNG), team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
>
>


-- 
--------
We shall go on to the end.
We shall fight in France
We shall fightover the seas and oceans.
We shall fight with growing confidence and growing strength in the air.
We shall defend our island whatever the cost may be
We shall fight on beaches, we shall fight on the landing grounds,
We shall fight in the fields and in the streets,
We shall fight on the hills.
We shall never surrender.
Winston Churchill

Re: Doubt about implementing Ajax request

Posted by Jesse Kuhnert <jk...@gmail.com>.
Yes it does. Your post looked complicated enough that I figured you already
knew that and ran into other issues....It's fairly trivial to do what you
want with all of the built in components if you read the documentation
provided for them.

Just don't go trying to modify a table. No matter how great our ajax stuff
is it can't make IE not suck. (though the new FilteringTable will help when
it lands soon)

On 9/21/06, Daniel Castro <df...@gmail.com> wrote:
>
> Thanks :) I will look :)
> But I thought tapestry 4.1 would have some features for ajax submit
> already
> implemented.
>
> On 9/20/06, Karthik N <ka...@gmail.com> wrote:
> >
> > you should look at the excellent Tacos framework to help you on this.
> It
> > makes Ajax with Tapestry a breeze, thanks to some great work done.
> >
> > http://tacos.sourceforge.net/
> >
> > in addition, if need be, you can look at Dojo and DWR to help you with
> > Ajax.
> >
> > On 9/21/06, Daniel Castro <df...@gmail.com> wrote:
> > >
> > > Guys, please help me, if possible.
> > >
> > > I have a page with a search form, and those form fields are used as
> > > parameteres for a search query (SQL).
> > >
> > > There are two content holders, that are div tags with specified ids,
> to
> > > hold
> > > the ajax return of the search and ajax return of the search details.
> > > Those content holders are placed bellow the search form, on the same
> > page.
> > >
> > > What is the search result and what is the search detail?
> > > Well, the search result is a 6 columns table sqlmodel component (from
> > > contrib library) where the first column is the pk of the database
> entry
> > > that
> > > is displayed and the last column is a button to invoke the display of
> > the
> > > details.
> > >
> > > The search detail is a table that displays less relevant informations
> > > about
> > > one row of the search.
> > >
> > > so lets suppose that
> > > 1 - I have the form page with the submit button
> > > 2 - I have a tapestry tabel component that returns the search result
> > >
> > > 3 - I have a class that returns a string containing the html code of
> > that
> > > detail table associated with a primary key.
> > > 4 - I have a button on the result table, for each row, that passes the
> > id
> > > of
> > > the row as atttribute or parameter
> > > 5 - I have the place holders identified (two div tags)
> > >
> > > How shoul I implement the ajax call for the search and the detail?
> > Please,
> > > step by step explanatuion if possble.
> > > My big problem is how to do this call, i tried some approaches to
> solve
> > > this, but none was sucessful.
> > >
> > > Thanks everyone.
> > >
> > > --
> > > --------
> > > We shall go on to the end.
> > > We shall fight in France
> > > We shall fightover the seas and oceans.
> > > We shall fight with growing confidence and growing strength in the
> air.
> > > We shall defend our island whatever the cost may be
> > > We shall fight on beaches, we shall fight on the landing grounds,
> > > We shall fight in the fields and in the streets,
> > > We shall fight on the hills.
> > > We shall never surrender.
> > > Winston Churchill
> > >
> > >
> >
> >
> > --
> > Thanks, Karthik
> >
> >
>
>
> --
> --------
> We shall go on to the end.
> We shall fight in France
> We shall fightover the seas and oceans.
> We shall fight with growing confidence and growing strength in the air.
> We shall defend our island whatever the cost may be
> We shall fight on beaches, we shall fight on the landing grounds,
> We shall fight in the fields and in the streets,
> We shall fight on the hills.
> We shall never surrender.
> Winston Churchill
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

Re: Doubt about implementing Ajax request

Posted by Daniel Castro <df...@gmail.com>.
Thanks :) I will look :)
But I thought tapestry 4.1 would have some features for ajax submit already
implemented.

On 9/20/06, Karthik N <ka...@gmail.com> wrote:
>
> you should look at the excellent Tacos framework to help you on this.   It
> makes Ajax with Tapestry a breeze, thanks to some great work done.
>
> http://tacos.sourceforge.net/
>
> in addition, if need be, you can look at Dojo and DWR to help you with
> Ajax.
>
> On 9/21/06, Daniel Castro <df...@gmail.com> wrote:
> >
> > Guys, please help me, if possible.
> >
> > I have a page with a search form, and those form fields are used as
> > parameteres for a search query (SQL).
> >
> > There are two content holders, that are div tags with specified ids, to
> > hold
> > the ajax return of the search and ajax return of the search details.
> > Those content holders are placed bellow the search form, on the same
> page.
> >
> > What is the search result and what is the search detail?
> > Well, the search result is a 6 columns table sqlmodel component (from
> > contrib library) where the first column is the pk of the database entry
> > that
> > is displayed and the last column is a button to invoke the display of
> the
> > details.
> >
> > The search detail is a table that displays less relevant informations
> > about
> > one row of the search.
> >
> > so lets suppose that
> > 1 - I have the form page with the submit button
> > 2 - I have a tapestry tabel component that returns the search result
> >
> > 3 - I have a class that returns a string containing the html code of
> that
> > detail table associated with a primary key.
> > 4 - I have a button on the result table, for each row, that passes the
> id
> > of
> > the row as atttribute or parameter
> > 5 - I have the place holders identified (two div tags)
> >
> > How shoul I implement the ajax call for the search and the detail?
> Please,
> > step by step explanatuion if possble.
> > My big problem is how to do this call, i tried some approaches to solve
> > this, but none was sucessful.
> >
> > Thanks everyone.
> >
> > --
> > --------
> > We shall go on to the end.
> > We shall fight in France
> > We shall fightover the seas and oceans.
> > We shall fight with growing confidence and growing strength in the air.
> > We shall defend our island whatever the cost may be
> > We shall fight on beaches, we shall fight on the landing grounds,
> > We shall fight in the fields and in the streets,
> > We shall fight on the hills.
> > We shall never surrender.
> > Winston Churchill
> >
> >
>
>
> --
> Thanks, Karthik
>
>


-- 
--------
We shall go on to the end.
We shall fight in France
We shall fightover the seas and oceans.
We shall fight with growing confidence and growing strength in the air.
We shall defend our island whatever the cost may be
We shall fight on beaches, we shall fight on the landing grounds,
We shall fight in the fields and in the streets,
We shall fight on the hills.
We shall never surrender.
Winston Churchill

Re: Doubt about implementing Ajax request

Posted by Karthik N <ka...@gmail.com>.
you should look at the excellent Tacos framework to help you on this.   It
makes Ajax with Tapestry a breeze, thanks to some great work done.

http://tacos.sourceforge.net/

in addition, if need be, you can look at Dojo and DWR to help you with Ajax.

On 9/21/06, Daniel Castro <df...@gmail.com> wrote:
>
> Guys, please help me, if possible.
>
> I have a page with a search form, and those form fields are used as
> parameteres for a search query (SQL).
>
> There are two content holders, that are div tags with specified ids, to
> hold
> the ajax return of the search and ajax return of the search details.
> Those content holders are placed bellow the search form, on the same page.
>
> What is the search result and what is the search detail?
> Well, the search result is a 6 columns table sqlmodel component (from
> contrib library) where the first column is the pk of the database entry
> that
> is displayed and the last column is a button to invoke the display of the
> details.
>
> The search detail is a table that displays less relevant informations
> about
> one row of the search.
>
> so lets suppose that
> 1 - I have the form page with the submit button
> 2 - I have a tapestry tabel component that returns the search result
>
> 3 - I have a class that returns a string containing the html code of that
> detail table associated with a primary key.
> 4 - I have a button on the result table, for each row, that passes the id
> of
> the row as atttribute or parameter
> 5 - I have the place holders identified (two div tags)
>
> How shoul I implement the ajax call for the search and the detail? Please,
> step by step explanatuion if possble.
> My big problem is how to do this call, i tried some approaches to solve
> this, but none was sucessful.
>
> Thanks everyone.
>
> --
> --------
> We shall go on to the end.
> We shall fight in France
> We shall fightover the seas and oceans.
> We shall fight with growing confidence and growing strength in the air.
> We shall defend our island whatever the cost may be
> We shall fight on beaches, we shall fight on the landing grounds,
> We shall fight in the fields and in the streets,
> We shall fight on the hills.
> We shall never surrender.
> Winston Churchill
>
>


-- 
Thanks, Karthik