You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Tony Nelson <tn...@starpoint.com> on 2011/07/05 20:39:14 UTC
Looking for a sample
Hi all,
I've spent as much time and brain cells as I can on this.
Does anyone has a working sample of Zone update based with information input by the user?
Specifically, I have a text field that a user fills in, clicks an add link/button, and I want to insert the new value in a <ul> in a zone.
I've tried everything I can think but can't seem to pass the value from the text field to the zone update method.
Thanks in advance,
-Tony
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Looking for a sample
Posted by Taha Hafeez <ta...@gmail.com>.
Hi Tom
It is not tested
Tapestry.Initializer.textUpdate = function(params)
{
Event.observe(params.buttonId, "click", function()
{
var zoneManager = Tapestry.findZoneManagerFromZoneId(zoneId);
if(zoneManager)
{
zoneManager.updateFromURL(params.URL + "/" +
urlencode($(textComponent).value));
}
});
};
in java
void afterRender()
{
Link link = resources.createEventLink("update");
JSONObject params = new JSONObject();
params.put("textComponentId", getTextComponentIdSomeHow());
params.put("URL", link.toAbsoluteURI());
params.put("buttonId", getButtonIdSomeHow());
javaScriptSupport.addInitializerCall("textUpdate", params);
}
Object onUpdate(String text)
{
//do whatever
return whateverZoneOrComponent;
}
Also
http://tawus.wordpress.com/2011/07/01/a-periodic-zone-refresh-mixin-for-tapestry/
might
help
regards
Taha
On Wed, Jul 6, 2011 at 12:09 AM, Tony Nelson <tn...@starpoint.com> wrote:
> Hi all,
>
> I've spent as much time and brain cells as I can on this.
>
> Does anyone has a working sample of Zone update based with information
> input by the user?
>
> Specifically, I have a text field that a user fills in, clicks an add
> link/button, and I want to insert the new value in a <ul> in a zone.
>
> I've tried everything I can think but can't seem to pass the value from the
> text field to the zone update method.
>
> Thanks in advance,
> -Tony
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
Re: Looking for a sample
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Tue, 05 Jul 2011 15:59:10 -0300, Taha Hafeez <ta...@gmail.com>
wrote:
> Hi Thiago
Hi Taha!
> You always have a better answer :)
I don't think so. :) And JumpStart has many! Very useful!
--
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
Re: Looking for a sample
Posted by Taha Hafeez <ta...@gmail.com>.
Hi Thiago
You always have a better answer :)
Taha
On Wed, Jul 6, 2011 at 12:26 AM, Thiago H. de Paula Figueiredo <
thiagohp@gmail.com> wrote:
> On Tue, 05 Jul 2011 15:39:14 -0300, Tony Nelson <tn...@starpoint.com>
> wrote:
>
> Hi all,
>>
>
> Hi!
>
>
> I've spent as much time and brain cells as I can on this.
>> Does anyone has a working sample of Zone update based with information
>> input by the user?
>>
>
> Always check the Tapestry JumpStart application and samples.
>
> --
> 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: Looking for a sample
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Tue, 05 Jul 2011 15:39:14 -0300, Tony Nelson <tn...@starpoint.com>
wrote:
> Hi all,
Hi!
> I've spent as much time and brain cells as I can on this.
> Does anyone has a working sample of Zone update based with information
> input by the user?
Always check the Tapestry JumpStart application and samples.
--
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