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 <tnel...@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-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to