Are you sure that OnAddBranding is getting called when they add a brand?
If the page doesn't reload, then it sounds like the form isn't submitting.

Here is an example of a select component being updated via AJAX that might
help if you don't want to reload the page:
http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/ajaxselect1
<http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/ajaxselect1>
Mark

On Mon, Oct 25, 2010 at 9:56 AM, hese <1024h...@gmail.com> wrote:

>
> Hi,
>
> I have a select box in my tml -
>
> <select t:type="Select" t:id="adv1"  model="brandModel" value="brandId1" />
>
> I also have an option where values can be added to this select box from
> that
> page.  After the user adds a value I want the select box to repopulate and
> display the new value as well.
>
> To accomplish this, at the end of the event handler for adding the new
> value, I am doing this
>
>  @OnEvent(component = "inPlaceEditorBrand", value =
> InPlaceEditor.SAVE_EVENT)
> Object onAddBrand(Long contextId, String brandName) {
> {
>
> ...
> ...
>
> setupBrandModel(); //here I am creating the 'brandModel' with the new value
> return this;
> }
>
> ...returning 'this' expecting the page to reload again  and have the new
> value.  but the page is not reloading and the select box does not have the
> new value.
>
> What is the mistake?  Is there any other way to reload the select box with
> the new values without reloading the page?
>
> Thanks
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/dynamically-reload-a-select-control-tp3235533p3235533.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to