You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Luciano <bg...@hotmail.com> on 2011/06/19 23:05:19 UTC
Select component and Ajax (Tapestry version < 5.2.0)
Hi everyone,
my case is quite simple : somewhere on the website I'm working on, I need to
trigger an Ajax request each time the internaut selects a new <option>
manipulating a regular HTML Select component.
I read the doc and I found exactly what I needed :
http://tapestry.apache.org/current/tapestry-core/ref/org/apache/tapestry5/corelib/components/Select.html
My problem is that this "zone" parameter is not available for me : I'm
working on an Tapestry 5.1.0.5 application.
Can you just help me to find a solution ?
I'm thinking about this :
- is it possible to patch the concerned files in order to add this new
"zone" parameter for the Tapestry select component ?
- easier : given that a Tapestry select component is always included in a
<t:form> component, I could use some JS to intercept the event : "the user
is clicking on a <option> markup" and then trigger at this time the <t:form>
(ajax way) with "$("idForm").fire(Tapestry.FORM_PROCESS_SUBMIT_EVENT);"
What do you think ? Does anyone here faced this particular situation ?
Thank you for the feedback.
Best regards everyone!
http://twitter.com/lboix
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Select-component-and-Ajax-Tapestry-version-5-2-0-tp4504415p4504415.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Select component and Ajax (Tapestry version < 5.2.0)
Posted by le...@gmail.com.
While i look for the solution i have used , here is an article that can help
you.
http://tapestry.1045711.n5.nabble.com/Select-does-not-submit-form-on-change-td2418954.html
Good Luck!
2011/6/19 <le...@gmail.com>
> Sorry .. the link i've passed to you is incorrect.
> I can't found the correct one because i haven't here the source code.
>
> I will give the right solution on tuesday morning or tomorrow if i find it
> on internet ok?
>
> Sorry again...
>
>
> 2011/6/19 <le...@gmail.com>
>
> Hi Luciano!
>> Some time ago i had the same problem.
>>
>> Here is a link with a simple solution . The idea is to add some extra
>> javascript and java code in order to enable ajax to the select component of
>> tapestry 5.1.
>>
>> Look and then tell me if it solves your problem:
>>
>> http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/select1
>>
>>
>> The best way is to use Tapestry 5.2 that has incorporated a new parameter
>> called "zone" where you say the zone to refresh when the selected element
>> changes. But i understand you because when i faced this problem it wasn 't
>> possible to me to migrate to the newest version because of some dependencies
>> like spring, hibernate and others.
>>
>> Good Luck!
>>
>>
>> 2011/6/19 Luciano <bg...@hotmail.com>
>>
>>> Hi everyone,
>>>
>>> my case is quite simple : somewhere on the website I'm working on, I need
>>> to
>>> trigger an Ajax request each time the internaut selects a new <option>
>>> manipulating a regular HTML Select component.
>>>
>>> I read the doc and I found exactly what I needed :
>>>
>>> http://tapestry.apache.org/current/tapestry-core/ref/org/apache/tapestry5/corelib/components/Select.html
>>>
>>> My problem is that this "zone" parameter is not available for me : I'm
>>> working on an Tapestry 5.1.0.5 application.
>>>
>>> Can you just help me to find a solution ?
>>>
>>> I'm thinking about this :
>>> - is it possible to patch the concerned files in order to add this new
>>> "zone" parameter for the Tapestry select component ?
>>> - easier : given that a Tapestry select component is always included in a
>>> <t:form> component, I could use some JS to intercept the event : "the
>>> user
>>> is clicking on a <option> markup" and then trigger at this time the
>>> <t:form>
>>> (ajax way) with "$("idForm").fire(Tapestry.FORM_PROCESS_SUBMIT_EVENT);"
>>>
>>> What do you think ? Does anyone here faced this particular situation ?
>>>
>>> Thank you for the feedback.
>>>
>>> Best regards everyone!
>>>
>>> http://twitter.com/lboix
>>>
>>>
>>> --
>>> View this message in context:
>>> http://tapestry.1045711.n5.nabble.com/Select-component-and-Ajax-Tapestry-version-5-2-0-tp4504415p4504415.html
>>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>
>
Re: Select component and Ajax (Tapestry version < 5.2.0)
Posted by le...@gmail.com.
Sorry .. the link i've passed to you is incorrect.
I can't found the correct one because i haven't here the source code.
I will give the right solution on tuesday morning or tomorrow if i find it
on internet ok?
Sorry again...
2011/6/19 <le...@gmail.com>
> Hi Luciano!
> Some time ago i had the same problem.
>
> Here is a link with a simple solution . The idea is to add some extra
> javascript and java code in order to enable ajax to the select component of
> tapestry 5.1.
>
> Look and then tell me if it solves your problem:
>
> http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/select1
>
>
> The best way is to use Tapestry 5.2 that has incorporated a new parameter
> called "zone" where you say the zone to refresh when the selected element
> changes. But i understand you because when i faced this problem it wasn 't
> possible to me to migrate to the newest version because of some dependencies
> like spring, hibernate and others.
>
> Good Luck!
>
>
> 2011/6/19 Luciano <bg...@hotmail.com>
>
>> Hi everyone,
>>
>> my case is quite simple : somewhere on the website I'm working on, I need
>> to
>> trigger an Ajax request each time the internaut selects a new <option>
>> manipulating a regular HTML Select component.
>>
>> I read the doc and I found exactly what I needed :
>>
>> http://tapestry.apache.org/current/tapestry-core/ref/org/apache/tapestry5/corelib/components/Select.html
>>
>> My problem is that this "zone" parameter is not available for me : I'm
>> working on an Tapestry 5.1.0.5 application.
>>
>> Can you just help me to find a solution ?
>>
>> I'm thinking about this :
>> - is it possible to patch the concerned files in order to add this new
>> "zone" parameter for the Tapestry select component ?
>> - easier : given that a Tapestry select component is always included in a
>> <t:form> component, I could use some JS to intercept the event : "the user
>> is clicking on a <option> markup" and then trigger at this time the
>> <t:form>
>> (ajax way) with "$("idForm").fire(Tapestry.FORM_PROCESS_SUBMIT_EVENT);"
>>
>> What do you think ? Does anyone here faced this particular situation ?
>>
>> Thank you for the feedback.
>>
>> Best regards everyone!
>>
>> http://twitter.com/lboix
>>
>>
>> --
>> View this message in context:
>> http://tapestry.1045711.n5.nabble.com/Select-component-and-Ajax-Tapestry-version-5-2-0-tp4504415p4504415.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
Re: Select component and Ajax (Tapestry version < 5.2.0)
Posted by le...@gmail.com.
Hi Luciano!
Some time ago i had the same problem.
Here is a link with a simple solution . The idea is to add some extra
javascript and java code in order to enable ajax to the select component of
tapestry 5.1.
Look and then tell me if it solves your problem:
http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/select1
The best way is to use Tapestry 5.2 that has incorporated a new parameter
called "zone" where you say the zone to refresh when the selected element
changes. But i understand you because when i faced this problem it wasn 't
possible to me to migrate to the newest version because of some dependencies
like spring, hibernate and others.
Good Luck!
2011/6/19 Luciano <bg...@hotmail.com>
> Hi everyone,
>
> my case is quite simple : somewhere on the website I'm working on, I need
> to
> trigger an Ajax request each time the internaut selects a new <option>
> manipulating a regular HTML Select component.
>
> I read the doc and I found exactly what I needed :
>
> http://tapestry.apache.org/current/tapestry-core/ref/org/apache/tapestry5/corelib/components/Select.html
>
> My problem is that this "zone" parameter is not available for me : I'm
> working on an Tapestry 5.1.0.5 application.
>
> Can you just help me to find a solution ?
>
> I'm thinking about this :
> - is it possible to patch the concerned files in order to add this new
> "zone" parameter for the Tapestry select component ?
> - easier : given that a Tapestry select component is always included in a
> <t:form> component, I could use some JS to intercept the event : "the user
> is clicking on a <option> markup" and then trigger at this time the
> <t:form>
> (ajax way) with "$("idForm").fire(Tapestry.FORM_PROCESS_SUBMIT_EVENT);"
>
> What do you think ? Does anyone here faced this particular situation ?
>
> Thank you for the feedback.
>
> Best regards everyone!
>
> http://twitter.com/lboix
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Select-component-and-Ajax-Tapestry-version-5-2-0-tp4504415p4504415.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
Re: Select component and Ajax (Tapestry version < 5.2.0)
Posted by Geoff Callender <ge...@gmail.com>.
You'll find an Ajax Select example that works with Tapestry 5.1.0.5 in jumpstart-4.12.2, downloadable from http://jumpstart.doublenegative.com.au/download.html .
Also on that page is one that works with Tapestry 5.0.18.
HTH,
Geoff
On 21/06/2011, at 9:59 PM, leandroaispuru@gmail.com wrote:
> Hi again Luciano.
>
> I used a zoneupdater mixin in order to update an specific zone.
> Here is the page where you can see a zone being updated when you enter text
> to a textfield.
> The same can be used by you to update the zone when you select some option.
>
> http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/onevent
>
> If you have any problem you can write to me again and i can pass you the
> source code.
>
> Good Luck!
>
> 2011/6/20 Thiago H. de Paula Figueiredo <th...@gmail.com>
>
>> On Sun, 19 Jun 2011 18:05:19 -0300, Luciano <bg...@hotmail.com> wrote:
>>
>> Hi everyone,
>>>
>>
>> Hi!
>>
>> my case is quite simple : somewhere on the website I'm working on, I need
>>> to trigger an Ajax request each time the internaut selects a new <option>
>>> manipulating a regular HTML Select component.
>>> I'm thinking about this :
>>> - is it possible to patch the concerned files in order to add this new
>>> "zone" parameter for the Tapestry select component ?
>>>
>>
>> It is, but I wouldn't recommend that. I'd copy the Tapestry 5.2.5 Select
>> component and call it AjaxSelect and something like this and add it to your
>> project.
>>
>>
>> What do you think ? Does anyone here faced this particular situation ?
>>>
>>
>> I implemented something like that (updating a <select> based on the
>> selection in another <select>)in an unreleased but used package. Sources
>> here: http://ars-machina.svn.**sourceforge.net/viewvc/ars-**
>> machina/brasil-tapestry/trunk/<http://ars-machina.svn.sourceforge.net/viewvc/ars-machina/brasil-tapestry/trunk/>
>>
>> --
>> Thiago H. de Paula Figueiredo
>> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
>> and instructor
>> Owner, Ars Machina Tecnologia da Informação Ltda.
>> http://www.arsmachina.com.br
>>
>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org<us...@tapestry.apache.org>
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Select component and Ajax (Tapestry version < 5.2.0)
Posted by le...@gmail.com.
Hi again Luciano.
I used a zoneupdater mixin in order to update an specific zone.
Here is the page where you can see a zone being updated when you enter text
to a textfield.
The same can be used by you to update the zone when you select some option.
http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/onevent
If you have any problem you can write to me again and i can pass you the
source code.
Good Luck!
2011/6/20 Thiago H. de Paula Figueiredo <th...@gmail.com>
> On Sun, 19 Jun 2011 18:05:19 -0300, Luciano <bg...@hotmail.com> wrote:
>
> Hi everyone,
>>
>
> Hi!
>
> my case is quite simple : somewhere on the website I'm working on, I need
>> to trigger an Ajax request each time the internaut selects a new <option>
>> manipulating a regular HTML Select component.
>> I'm thinking about this :
>> - is it possible to patch the concerned files in order to add this new
>> "zone" parameter for the Tapestry select component ?
>>
>
> It is, but I wouldn't recommend that. I'd copy the Tapestry 5.2.5 Select
> component and call it AjaxSelect and something like this and add it to your
> project.
>
>
> What do you think ? Does anyone here faced this particular situation ?
>>
>
> I implemented something like that (updating a <select> based on the
> selection in another <select>)in an unreleased but used package. Sources
> here: http://ars-machina.svn.**sourceforge.net/viewvc/ars-**
> machina/brasil-tapestry/trunk/<http://ars-machina.svn.sourceforge.net/viewvc/ars-machina/brasil-tapestry/trunk/>
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org<us...@tapestry.apache.org>
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
Re: Select component and Ajax (Tapestry version < 5.2.0)
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Sun, 19 Jun 2011 18:05:19 -0300, Luciano <bg...@hotmail.com> wrote:
> Hi everyone,
Hi!
> my case is quite simple : somewhere on the website I'm working on, I
> need to trigger an Ajax request each time the internaut selects a new
> <option>
> manipulating a regular HTML Select component.
> I'm thinking about this :
> - is it possible to patch the concerned files in order to add this new
> "zone" parameter for the Tapestry select component ?
It is, but I wouldn't recommend that. I'd copy the Tapestry 5.2.5 Select
component and call it AjaxSelect and something like this and add it to
your project.
> What do you think ? Does anyone here faced this particular situation ?
I implemented something like that (updating a <select> based on the
selection in another <select>)in an unreleased but used package. Sources
here:
http://ars-machina.svn.sourceforge.net/viewvc/ars-machina/brasil-tapestry/trunk/
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org